SlideShare a Scribd company logo
1 of 66
Eclipse Code
Recommenders




 “IDE 2.0”
 Collective Intelligence in Software Development
 Leveraging the Wisdom of the Crowds
 Marcel Bruch
Eclipse Code Recommenders
 All Frameworks          Code

Code




                                Eclipse Code Recommenders
                                – do what most people do!   (where appropriate)




Developers Who Called “new        Text()” Method Also Called

         setText()          addListener()        setLayout()              setFont()
           89%                   53%                 99%                      35%




  What Do Developers Ultimately Override After Extending This Class?
       100 % overwrote
       PreferencePage.createContents()

       96 % overwrote
       PreferencePage.performOk()

       5 % overwrote
       PreferencePage.performCancel()
“Other developers frequently bought used the following methods…”

INTELLIGENT CODE COMPLETION
Code Completion…




What does the developer need, i.e., which methods
 should the code completion present to the user?
All 164 Methods of Text ?
JButton? 381 Methods.
Code Completion…




What does the developer need, i.e., which methods
 should the code completion present to the user?
Intelligent Code Completion




  … or just the three missing ones?
Eclipse Code Recommenders
Why just one when you can have templates…
How it works – in a nutshell…


                   Framework                          If you
                                                    extend A,
                                                    you should
                                                     call B.c

  Framework                       Framework        Recommender
                       …                              Model
Instantiation 1                 Instantiation n



 extract facts about how the framework is reused




 <extends:A>                    <extends:A>
<overrides:A.b>                <overrides:A.d>
                       …         <calls:B.c>
  <calls:B.c>
       …                              …
                                                      Mining
How it works – in a nutshell…
How it works – in a nutshell…




Observation        Recommendations
“What do Developers Ultimately buy override after extending this class?”

USAGE-DRIVEN JAVADOCS
Some Facts About The
     Documentation of Overridable Methods




overridable                             2074



overridden      623
What Clients Do With Your API…




    overridden                                                                                623



 documented*                    155                                                           478




*: documented as overridable by using phrases like “clients may/should/must override/extend this method”
What documentation would you expect when
         subclassing a Dialog?
What Javadoc gives to you…


A dialog is a specialized window used for narrow-focused
communication with the user.

Dialogs are usually modal. Consequently, it is generally
bad practice to open a dialog without a parent. A modal
dialog without a parent is not prevented from
disappearing behind the application's other
        But what are the
windows, making it very confusing for the user.

If there is more than one modal dialog is open the
second one should be parented offDialog?
   hot-spots of of the shell of the first
one otherwise it is possible that the OS will give focus to
the first dialog potentially blocking the UI.
What Code Completion offers…




Which of the 56 methods
 should we override?
What You Need…
Method-level Subclassing Directives
This way, or that way?
Subclassing Patterns for ViewerSorter
How it works?
          Clustering in a nutshell




http://upload.wikimedia.org/wikipedia/en/2/29/Bernoulli-Mixture-Model.gif
“The good ones in the potty, the bad ones in…
the problem view.”
SMART BUG DETECTION –
DRIVEN BY REAL USAGES
What’s wrong with this code?
At runtime your error log shows…


An error has occurred.
See error log for more details.
org.eclipse.core.runtime.AssertionFailedException

null argument:
At runtime your error log shows…




So what have we missed?
If all of your colleagues do it – why don’t you?
How it works – a conceptual view




  That’s
“strange”
How it works – a conceptual view
Just one formula…

x = {observed method calls on a variable}
E(x) = {exact similar usages for variables of type x in the code base}
A(x) = {almost similar usages, i.e., x+1 method call}




                                         | E ( x) |
        strangeness( x) 1
                                  | E ( x) | | A( x) |
Find your bugs… during development!
Find your bugs… during development!
“Why is Google Codesearch not ‘google for code search’? ”

CODE SEARCH ENGINES – LIFT OFF!
Navigating the API jungle…




How do I get an IStatusLineManager?
When asking Google Codesearch

                          No IDE
                        integration



                       Manual query
                         creation



                        Text-based
                         retrieval



                       Ignores prior
                        knowledge
Code Example Recommender




                     Query
Code Example Recommender
Code Example Recommender
“Why is Google Codesearch not ‘google for code search’? ”

LEVERAGING USER FEEDBACK TO
IMPROVE CODE SEARCH ENGINES
Leveraging User Feedback


     ...


     ...




     ...


     ...




42
Refine the ranking based on feedback
Leveraging User Feedback



     1                              2
                 Support
     2            Vector            1
                 Machine
     3                              3




44
Stackoverflow.com – Reloaded!

WHAT CAUSED
THAT STACKTRACE?
So far we have…

Intelligent Code Completion
                                   Usage-Driven Javadocs




Code Example Recommender            Smart Bug Dectection
But what if you get this?
Debugging – the old way
Debugging – the old way
But more often we get…
How can we fix that?
Don’t stacktraces share some commonalities?
    ExceptionType Feature
    (evaluates identical exception type)              Message Similarity Feature
                                                      (counts of similar words)

org.eclipse.swt.SWTException: Invalid thread access
  at org.eclipse.swt.SWT.error(SWT.java:3884)
  at org.eclipse.swt.SWT.error(SWT.java:3799)
  at org.eclipse.swt.SWT.error(SWT.java:3770)
  at org.eclipse.swt.widgets.Widget.error(Widget.java:463)
  at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:355)
  at org.eclipse.swt.widgets.ProgressBar.setSelection(ProgressBar.java:317)
  at org.eclipselabs.cr.stacktraces.demo.ThreadDemo$1.run(Unknown Source)
  at java.lang.Thread.run(Thread.java:619)




                                    TraceDiff Similarity Feature
                                    (counts similar stackframes per trace)
Having a central exception repository
How about stacktraces.org?
“IDE 2.0? Leveraging the wisdom of the (Eclipse) community…”

LAST.FM 4 ECLIPSE
How It Works Today


                   Framework                          If you
                                                    extend A,
                                                    you should
                                                     call B.c

  Framework                       Framework        Recommender
                       …                              Model
Instantiation 1                 Instantiation n



 extract facts about how the framework is reused




 <extends:A>                    <extends:A>
<overrides:A.b>                <overrides:A.d>
                       …         <calls:B.c>
  <calls:B.c>
       …                              …
                                                      Mining
How it Works Tomorrow


                   Framework                          If you
                                                    extend A,
                                                    you should
                                                     call B.c

  Framework                       Framework        Recommender
                       …                              Model
Instantiation 1                 Instantiation n



 extract facts about how the framework is reused




 <extends:A>                    <extends:A>
<overrides:A.b>                <overrides:A.d>
                       …         <calls:B.c>
  <calls:B.c>
       …                              …
                                                      Mining
Leveraging your IDE’s build environment
                 framework
                                     context
  project         indication
environment




                                               object
                                               usage




                selected proposals
“I’ve seen much but why do you call it IDE 2.0 ?”

WRAP UP
From IDE 1.0 to IDE 2.0
From Web 2.0 to IDE 2.0
Let’s map the Web 2.0 principles to IDE 2.0 to see how
this analogy fits:


  1. The Web as Platform…
  2. Data as “Intel inside”…
  3. Harnessing Collective Intelligence…
  4. Rich User Experiences…
  5. Lightweight Programming Models…
Milestones


           …
                               01.09.2010            01.12.2010
 21.03.2009                     Moving to            Stacktrace
v0.1 Release                   Eclipse.org          Recommender
               01.07.2010
           v0.1 Example Code           01.10.2010
                                        v0.1 Bugs              01.02.2011
             Recommender                                      v0.1 Last.FM
                                      Recommender
Resources
• Contact
   • Marcel Bruch bruch@cs.tu-darmstadt.de
   •




• Project homepage
   • http://www.stg.tu-darmstadt.de/research/core/

• Download Release “LISBON” (V.0.2.105)
   • http://www.stg.tu-darmstadt.de/research/core/download

• Source Code
   • http://eclipselabs.org/p/code-recommenders/
Credits – innumerable hours have spent…
        Peter Schroeder            Daniel Glöckner                   Johannes Lerch
                                                     Maik Görtz
     Mohsen Parisay       Jan Kassens
                                                                  Johannes Born
                          Sebastian Kasten
                                               Daniel Staesche
     Sebastian Ahlfeld                                                  David Kalnischkies
        Sebastian Wörner          Boyan Yurukov
                                                        Jan Stolzenburg
 Florian Jakob               Nico Wombacher                                      Dirk Kröhan
           Christopher Mann                     Julius Rückert
                                 Steffen Remus                     Sebastian Proksch
   Sinem Emeröz       Veronika Kostadinova
                                                 Nikolay Shindov          Tomasz Kalbarczyk
                      Michael Novotny
 Jens Krause                              Michael Kutschke                          Gary Fritz
                                                               Kristijan Madunic
     Sheip Dargutev       David Schuld
                                                                                 Sebastian Denel
Johannes Kastl                         Roman Getto Daniel Brandtner
                   Christian Kilb
     Florian Nöll                                                            Laura Altmüller
                                     Dennis Sänger      Tjark Vandommele
       Dennis Siebert
                             Markus Migenda                             Minh Hoang Nguyen
                                                  Peter Sinzig
                                 Paul Schatygin
     Jan-Michael Heller                                     Sascha Nordquist
Q&A
Summary

Intelligent Code Completion
                                        Usage-Driven Javadocs




Code Example Recommender                 Smart Bug Dectection
Affiliation
Prof. Dr. Mira Mezini
Software Technology Group
Fachbereich Informatik
Technische Universität Darmstadt

More Related Content

What's hot

關於測試,我說的其實是......
關於測試,我說的其實是......關於測試,我說的其實是......
關於測試,我說的其實是......hugo lu
 
Eric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemEric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemGuardSquare
 
ProGuard / DexGuard Tips and Tricks
ProGuard / DexGuard Tips and TricksProGuard / DexGuard Tips and Tricks
ProGuard / DexGuard Tips and Tricksnetomi
 
Eric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemEric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemGuardSquare
 
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres..."The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...Edge AI and Vision Alliance
 
Eric Lafortune - Fighting application size with ProGuard and beyond
Eric Lafortune - Fighting application size with ProGuard and beyondEric Lafortune - Fighting application size with ProGuard and beyond
Eric Lafortune - Fighting application size with ProGuard and beyondGuardSquare
 
Eric Lafortune - ProGuard: Optimizer and obfuscator in the Android SDK
Eric Lafortune - ProGuard: Optimizer and obfuscator in the Android SDKEric Lafortune - ProGuard: Optimizer and obfuscator in the Android SDK
Eric Lafortune - ProGuard: Optimizer and obfuscator in the Android SDKGuardSquare
 
Dependency Injection Why is it awesome and Why should I care?
Dependency Injection Why is it awesome and Why should I care?Dependency Injection Why is it awesome and Why should I care?
Dependency Injection Why is it awesome and Why should I care?ColdFusionConference
 
Extension and Evolution
Extension and EvolutionExtension and Evolution
Extension and EvolutionEelco Visser
 
Lego For Engineers - Dependency Injection for LIDNUG (2011-06-03)
Lego For Engineers - Dependency Injection for LIDNUG (2011-06-03)Lego For Engineers - Dependency Injection for LIDNUG (2011-06-03)
Lego For Engineers - Dependency Injection for LIDNUG (2011-06-03)Theo Jungeblut
 
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...OWASP
 
OWF12/PAUG Conf Days Pro guard optimizer and obfuscator for android, eric l...
OWF12/PAUG Conf Days Pro guard   optimizer and obfuscator for android, eric l...OWF12/PAUG Conf Days Pro guard   optimizer and obfuscator for android, eric l...
OWF12/PAUG Conf Days Pro guard optimizer and obfuscator for android, eric l...Paris Open Source Summit
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy CodeNaresh Jain
 
ScalaMatsuri 2016 ドワンゴアカウントシステムを支えるScala技術
ScalaMatsuri 2016 ドワンゴアカウントシステムを支えるScala技術ScalaMatsuri 2016 ドワンゴアカウントシステムを支えるScala技術
ScalaMatsuri 2016 ドワンゴアカウントシステムを支えるScala技術Seitaro Yuuki
 
Groovy 3 and the new Groovy Meta Object Protocol in examples
Groovy 3 and the new Groovy Meta Object Protocol in examplesGroovy 3 and the new Groovy Meta Object Protocol in examples
Groovy 3 and the new Groovy Meta Object Protocol in examplesGR8Conf
 
Using the android ndk - DroidCon Paris 2014
Using the android ndk - DroidCon Paris 2014Using the android ndk - DroidCon Paris 2014
Using the android ndk - DroidCon Paris 2014Paris Android User Group
 

What's hot (19)

關於測試,我說的其實是......
關於測試,我說的其實是......關於測試,我說的其實是......
關於測試,我說的其實是......
 
Eric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemEric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build system
 
ProGuard / DexGuard Tips and Tricks
ProGuard / DexGuard Tips and TricksProGuard / DexGuard Tips and Tricks
ProGuard / DexGuard Tips and Tricks
 
Eric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemEric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build system
 
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres..."The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
"The OpenCV Open Source Computer Vision Library: Latest Developments," a Pres...
 
Eric Lafortune - Fighting application size with ProGuard and beyond
Eric Lafortune - Fighting application size with ProGuard and beyondEric Lafortune - Fighting application size with ProGuard and beyond
Eric Lafortune - Fighting application size with ProGuard and beyond
 
Eric Lafortune - ProGuard: Optimizer and obfuscator in the Android SDK
Eric Lafortune - ProGuard: Optimizer and obfuscator in the Android SDKEric Lafortune - ProGuard: Optimizer and obfuscator in the Android SDK
Eric Lafortune - ProGuard: Optimizer and obfuscator in the Android SDK
 
Dependency Injection Why is it awesome and Why should I care?
Dependency Injection Why is it awesome and Why should I care?Dependency Injection Why is it awesome and Why should I care?
Dependency Injection Why is it awesome and Why should I care?
 
Robots in Swift
Robots in SwiftRobots in Swift
Robots in Swift
 
Extension and Evolution
Extension and EvolutionExtension and Evolution
Extension and Evolution
 
Lego For Engineers - Dependency Injection for LIDNUG (2011-06-03)
Lego For Engineers - Dependency Injection for LIDNUG (2011-06-03)Lego For Engineers - Dependency Injection for LIDNUG (2011-06-03)
Lego For Engineers - Dependency Injection for LIDNUG (2011-06-03)
 
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
 
OWF12/PAUG Conf Days Pro guard optimizer and obfuscator for android, eric l...
OWF12/PAUG Conf Days Pro guard   optimizer and obfuscator for android, eric l...OWF12/PAUG Conf Days Pro guard   optimizer and obfuscator for android, eric l...
OWF12/PAUG Conf Days Pro guard optimizer and obfuscator for android, eric l...
 
Thinking In Swift
Thinking In SwiftThinking In Swift
Thinking In Swift
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy Code
 
ScalaMatsuri 2016 ドワンゴアカウントシステムを支えるScala技術
ScalaMatsuri 2016 ドワンゴアカウントシステムを支えるScala技術ScalaMatsuri 2016 ドワンゴアカウントシステムを支えるScala技術
ScalaMatsuri 2016 ドワンゴアカウントシステムを支えるScala技術
 
Groovy 3 and the new Groovy Meta Object Protocol in examples
Groovy 3 and the new Groovy Meta Object Protocol in examplesGroovy 3 and the new Groovy Meta Object Protocol in examples
Groovy 3 and the new Groovy Meta Object Protocol in examples
 
Using the android ndk - DroidCon Paris 2014
Using the android ndk - DroidCon Paris 2014Using the android ndk - DroidCon Paris 2014
Using the android ndk - DroidCon Paris 2014
 
Concurrency on the JVM
Concurrency on the JVMConcurrency on the JVM
Concurrency on the JVM
 

Similar to 2010 06-24 karlsruher entwicklertag

Framework engineering JCO 2011
Framework engineering JCO 2011Framework engineering JCO 2011
Framework engineering JCO 2011YoungSu Son
 
Weave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 RecapWeave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 RecapPatrick Chanezon
 
Neal Ford Emergent Design And Evolutionary Architecture
Neal Ford Emergent Design And Evolutionary ArchitectureNeal Ford Emergent Design And Evolutionary Architecture
Neal Ford Emergent Design And Evolutionary ArchitectureThoughtworks
 
Groovy In the Cloud
Groovy In the CloudGroovy In the Cloud
Groovy In the CloudJim Driscoll
 
Lunch and learn as3_frameworks
Lunch and learn as3_frameworksLunch and learn as3_frameworks
Lunch and learn as3_frameworksYuri Visser
 
Software Design Patterns. Part I :: Structural Patterns
Software Design Patterns. Part I :: Structural PatternsSoftware Design Patterns. Part I :: Structural Patterns
Software Design Patterns. Part I :: Structural PatternsSergey Aganezov
 
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them allEclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them allMarc Dutoo
 
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware
 
Automated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsAutomated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsJelastic Multi-Cloud PaaS
 
WWCode Dallas - Kubernetes: Learning from Zero to Production
WWCode Dallas - Kubernetes: Learning from Zero to ProductionWWCode Dallas - Kubernetes: Learning from Zero to Production
WWCode Dallas - Kubernetes: Learning from Zero to ProductionRosemary Wang
 
01 Introduction to programming
01 Introduction to programming01 Introduction to programming
01 Introduction to programmingmaznabili
 
David Nuescheler: Igniting CQ 5.3: What's New and Roadmap
David Nuescheler: Igniting CQ 5.3: What's New and RoadmapDavid Nuescheler: Igniting CQ 5.3: What's New and Roadmap
David Nuescheler: Igniting CQ 5.3: What's New and RoadmapDay Software
 
Oscon 2014 def core review
Oscon 2014 def core reviewOscon 2014 def core review
Oscon 2014 def core reviewrhirschfeld
 
How to really obfuscate your pdf malware
How to really obfuscate   your pdf malwareHow to really obfuscate   your pdf malware
How to really obfuscate your pdf malwarezynamics GmbH
 

Similar to 2010 06-24 karlsruher entwicklertag (20)

Need 4 Speed FI
Need 4 Speed FINeed 4 Speed FI
Need 4 Speed FI
 
Framework engineering JCO 2011
Framework engineering JCO 2011Framework engineering JCO 2011
Framework engineering JCO 2011
 
Weave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 RecapWeave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 Recap
 
Neal Ford Emergent Design And Evolutionary Architecture
Neal Ford Emergent Design And Evolutionary ArchitectureNeal Ford Emergent Design And Evolutionary Architecture
Neal Ford Emergent Design And Evolutionary Architecture
 
Groovy In the Cloud
Groovy In the CloudGroovy In the Cloud
Groovy In the Cloud
 
Lunch and learn as3_frameworks
Lunch and learn as3_frameworksLunch and learn as3_frameworks
Lunch and learn as3_frameworks
 
10 Ways To Improve Your Code
10 Ways To Improve Your Code10 Ways To Improve Your Code
10 Ways To Improve Your Code
 
Software Design Patterns. Part I :: Structural Patterns
Software Design Patterns. Part I :: Structural PatternsSoftware Design Patterns. Part I :: Structural Patterns
Software Design Patterns. Part I :: Structural Patterns
 
Django in the Real World
Django in the Real WorldDjango in the Real World
Django in the Real World
 
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them allEclipseCon 2016 - OCCIware : one Cloud API to rule them all
EclipseCon 2016 - OCCIware : one Cloud API to rule them all
 
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open WideOCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
OCCIware Project at EclipseCon France 2016, by Marc Dutoo, Open Wide
 
Automated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsAutomated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE Applications
 
WWCode Dallas - Kubernetes: Learning from Zero to Production
WWCode Dallas - Kubernetes: Learning from Zero to ProductionWWCode Dallas - Kubernetes: Learning from Zero to Production
WWCode Dallas - Kubernetes: Learning from Zero to Production
 
Introduction to Programming Lesson 01
Introduction to Programming Lesson 01Introduction to Programming Lesson 01
Introduction to Programming Lesson 01
 
Understanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual MachineUnderstanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual Machine
 
Effective Java
Effective JavaEffective Java
Effective Java
 
01 Introduction to programming
01 Introduction to programming01 Introduction to programming
01 Introduction to programming
 
David Nuescheler: Igniting CQ 5.3: What's New and Roadmap
David Nuescheler: Igniting CQ 5.3: What's New and RoadmapDavid Nuescheler: Igniting CQ 5.3: What's New and Roadmap
David Nuescheler: Igniting CQ 5.3: What's New and Roadmap
 
Oscon 2014 def core review
Oscon 2014 def core reviewOscon 2014 def core review
Oscon 2014 def core review
 
How to really obfuscate your pdf malware
How to really obfuscate   your pdf malwareHow to really obfuscate   your pdf malware
How to really obfuscate your pdf malware
 

More from Marcel Bruch

Setting up Automated Error Reporting for your Eclipse RCP App and Eclipse IDE...
Setting up Automated Error Reporting for your Eclipse RCP App and Eclipse IDE...Setting up Automated Error Reporting for your Eclipse RCP App and Eclipse IDE...
Setting up Automated Error Reporting for your Eclipse RCP App and Eclipse IDE...Marcel Bruch
 
Eclipse Neon Webinar Automated Error Reporting
Eclipse Neon Webinar Automated Error ReportingEclipse Neon Webinar Automated Error Reporting
Eclipse Neon Webinar Automated Error ReportingMarcel Bruch
 
Because you can’t fix what you don’t know is broken...
Because you can’t fix what you don’t know is broken...Because you can’t fix what you don’t know is broken...
Because you can’t fix what you don’t know is broken...Marcel Bruch
 
The Sin City of Code - No Images
The Sin City of Code - No ImagesThe Sin City of Code - No Images
The Sin City of Code - No ImagesMarcel Bruch
 
Eclipse DemoCamp Zurich - SnipMatch in Recommenders 2.1
Eclipse DemoCamp Zurich - SnipMatch in Recommenders 2.1Eclipse DemoCamp Zurich - SnipMatch in Recommenders 2.1
Eclipse DemoCamp Zurich - SnipMatch in Recommenders 2.1Marcel Bruch
 
JUG Münster 2014 - Code Recommenders & Codetrails - Wissenstransfer 2.0
JUG Münster 2014 - Code Recommenders & Codetrails - Wissenstransfer 2.0JUG Münster 2014 - Code Recommenders & Codetrails - Wissenstransfer 2.0
JUG Münster 2014 - Code Recommenders & Codetrails - Wissenstransfer 2.0Marcel Bruch
 
Being Amazon for Software Developers - IDE 2.0: Crowdsourcing mal anders #Jav...
Being Amazon for Software Developers - IDE 2.0: Crowdsourcing mal anders #Jav...Being Amazon for Software Developers - IDE 2.0: Crowdsourcing mal anders #Jav...
Being Amazon for Software Developers - IDE 2.0: Crowdsourcing mal anders #Jav...Marcel Bruch
 
Snipmatch - Snippets for the World
Snipmatch - Snippets for the WorldSnipmatch - Snippets for the World
Snipmatch - Snippets for the WorldMarcel Bruch
 
2013-06 - Eclipse Kepler Democamps
2013-06 - Eclipse Kepler Democamps2013-06 - Eclipse Kepler Democamps
2013-06 - Eclipse Kepler DemocampsMarcel Bruch
 
IDE 2.0 & Research at Eclipse - ECOOP 2011
IDE 2.0 & Research at Eclipse - ECOOP 2011IDE 2.0 & Research at Eclipse - ECOOP 2011
IDE 2.0 & Research at Eclipse - ECOOP 2011Marcel Bruch
 

More from Marcel Bruch (10)

Setting up Automated Error Reporting for your Eclipse RCP App and Eclipse IDE...
Setting up Automated Error Reporting for your Eclipse RCP App and Eclipse IDE...Setting up Automated Error Reporting for your Eclipse RCP App and Eclipse IDE...
Setting up Automated Error Reporting for your Eclipse RCP App and Eclipse IDE...
 
Eclipse Neon Webinar Automated Error Reporting
Eclipse Neon Webinar Automated Error ReportingEclipse Neon Webinar Automated Error Reporting
Eclipse Neon Webinar Automated Error Reporting
 
Because you can’t fix what you don’t know is broken...
Because you can’t fix what you don’t know is broken...Because you can’t fix what you don’t know is broken...
Because you can’t fix what you don’t know is broken...
 
The Sin City of Code - No Images
The Sin City of Code - No ImagesThe Sin City of Code - No Images
The Sin City of Code - No Images
 
Eclipse DemoCamp Zurich - SnipMatch in Recommenders 2.1
Eclipse DemoCamp Zurich - SnipMatch in Recommenders 2.1Eclipse DemoCamp Zurich - SnipMatch in Recommenders 2.1
Eclipse DemoCamp Zurich - SnipMatch in Recommenders 2.1
 
JUG Münster 2014 - Code Recommenders & Codetrails - Wissenstransfer 2.0
JUG Münster 2014 - Code Recommenders & Codetrails - Wissenstransfer 2.0JUG Münster 2014 - Code Recommenders & Codetrails - Wissenstransfer 2.0
JUG Münster 2014 - Code Recommenders & Codetrails - Wissenstransfer 2.0
 
Being Amazon for Software Developers - IDE 2.0: Crowdsourcing mal anders #Jav...
Being Amazon for Software Developers - IDE 2.0: Crowdsourcing mal anders #Jav...Being Amazon for Software Developers - IDE 2.0: Crowdsourcing mal anders #Jav...
Being Amazon for Software Developers - IDE 2.0: Crowdsourcing mal anders #Jav...
 
Snipmatch - Snippets for the World
Snipmatch - Snippets for the WorldSnipmatch - Snippets for the World
Snipmatch - Snippets for the World
 
2013-06 - Eclipse Kepler Democamps
2013-06 - Eclipse Kepler Democamps2013-06 - Eclipse Kepler Democamps
2013-06 - Eclipse Kepler Democamps
 
IDE 2.0 & Research at Eclipse - ECOOP 2011
IDE 2.0 & Research at Eclipse - ECOOP 2011IDE 2.0 & Research at Eclipse - ECOOP 2011
IDE 2.0 & Research at Eclipse - ECOOP 2011
 

2010 06-24 karlsruher entwicklertag

  • 1. Eclipse Code Recommenders “IDE 2.0” Collective Intelligence in Software Development Leveraging the Wisdom of the Crowds Marcel Bruch
  • 2.
  • 3. Eclipse Code Recommenders All Frameworks Code Code Eclipse Code Recommenders – do what most people do! (where appropriate) Developers Who Called “new Text()” Method Also Called setText() addListener() setLayout() setFont() 89% 53% 99% 35% What Do Developers Ultimately Override After Extending This Class? 100 % overwrote PreferencePage.createContents() 96 % overwrote PreferencePage.performOk() 5 % overwrote PreferencePage.performCancel()
  • 4. “Other developers frequently bought used the following methods…” INTELLIGENT CODE COMPLETION
  • 5. Code Completion… What does the developer need, i.e., which methods should the code completion present to the user?
  • 6. All 164 Methods of Text ?
  • 8. Code Completion… What does the developer need, i.e., which methods should the code completion present to the user?
  • 9. Intelligent Code Completion … or just the three missing ones?
  • 11. Why just one when you can have templates…
  • 12. How it works – in a nutshell… Framework If you extend A, you should call B.c Framework Framework Recommender … Model Instantiation 1 Instantiation n extract facts about how the framework is reused <extends:A> <extends:A> <overrides:A.b> <overrides:A.d> … <calls:B.c> <calls:B.c> … … Mining
  • 13. How it works – in a nutshell…
  • 14. How it works – in a nutshell… Observation Recommendations
  • 15. “What do Developers Ultimately buy override after extending this class?” USAGE-DRIVEN JAVADOCS
  • 16. Some Facts About The Documentation of Overridable Methods overridable 2074 overridden 623
  • 17. What Clients Do With Your API… overridden 623 documented* 155 478 *: documented as overridable by using phrases like “clients may/should/must override/extend this method”
  • 18. What documentation would you expect when subclassing a Dialog?
  • 19. What Javadoc gives to you… A dialog is a specialized window used for narrow-focused communication with the user. Dialogs are usually modal. Consequently, it is generally bad practice to open a dialog without a parent. A modal dialog without a parent is not prevented from disappearing behind the application's other But what are the windows, making it very confusing for the user. If there is more than one modal dialog is open the second one should be parented offDialog? hot-spots of of the shell of the first one otherwise it is possible that the OS will give focus to the first dialog potentially blocking the UI.
  • 20. What Code Completion offers… Which of the 56 methods should we override?
  • 23. This way, or that way? Subclassing Patterns for ViewerSorter
  • 24. How it works? Clustering in a nutshell http://upload.wikimedia.org/wikipedia/en/2/29/Bernoulli-Mixture-Model.gif
  • 25. “The good ones in the potty, the bad ones in… the problem view.” SMART BUG DETECTION – DRIVEN BY REAL USAGES
  • 26. What’s wrong with this code?
  • 27. At runtime your error log shows… An error has occurred. See error log for more details. org.eclipse.core.runtime.AssertionFailedException null argument:
  • 28. At runtime your error log shows… So what have we missed?
  • 29. If all of your colleagues do it – why don’t you?
  • 30. How it works – a conceptual view That’s “strange”
  • 31. How it works – a conceptual view
  • 32. Just one formula… x = {observed method calls on a variable} E(x) = {exact similar usages for variables of type x in the code base} A(x) = {almost similar usages, i.e., x+1 method call} | E ( x) | strangeness( x) 1 | E ( x) | | A( x) |
  • 33. Find your bugs… during development!
  • 34. Find your bugs… during development!
  • 35. “Why is Google Codesearch not ‘google for code search’? ” CODE SEARCH ENGINES – LIFT OFF!
  • 36. Navigating the API jungle… How do I get an IStatusLineManager?
  • 37. When asking Google Codesearch No IDE integration Manual query creation Text-based retrieval Ignores prior knowledge
  • 41. “Why is Google Codesearch not ‘google for code search’? ” LEVERAGING USER FEEDBACK TO IMPROVE CODE SEARCH ENGINES
  • 42. Leveraging User Feedback ... ... ... ... 42
  • 43. Refine the ranking based on feedback
  • 44. Leveraging User Feedback 1 2 Support 2 Vector 1 Machine 3 3 44
  • 45. Stackoverflow.com – Reloaded! WHAT CAUSED THAT STACKTRACE?
  • 46. So far we have… Intelligent Code Completion Usage-Driven Javadocs Code Example Recommender Smart Bug Dectection
  • 47. But what if you get this?
  • 48. Debugging – the old way
  • 49. Debugging – the old way
  • 50. But more often we get…
  • 51. How can we fix that? Don’t stacktraces share some commonalities? ExceptionType Feature (evaluates identical exception type) Message Similarity Feature (counts of similar words) org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:3884) at org.eclipse.swt.SWT.error(SWT.java:3799) at org.eclipse.swt.SWT.error(SWT.java:3770) at org.eclipse.swt.widgets.Widget.error(Widget.java:463) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:355) at org.eclipse.swt.widgets.ProgressBar.setSelection(ProgressBar.java:317) at org.eclipselabs.cr.stacktraces.demo.ThreadDemo$1.run(Unknown Source) at java.lang.Thread.run(Thread.java:619) TraceDiff Similarity Feature (counts similar stackframes per trace)
  • 52. Having a central exception repository
  • 54. “IDE 2.0? Leveraging the wisdom of the (Eclipse) community…” LAST.FM 4 ECLIPSE
  • 55. How It Works Today Framework If you extend A, you should call B.c Framework Framework Recommender … Model Instantiation 1 Instantiation n extract facts about how the framework is reused <extends:A> <extends:A> <overrides:A.b> <overrides:A.d> … <calls:B.c> <calls:B.c> … … Mining
  • 56. How it Works Tomorrow Framework If you extend A, you should call B.c Framework Framework Recommender … Model Instantiation 1 Instantiation n extract facts about how the framework is reused <extends:A> <extends:A> <overrides:A.b> <overrides:A.d> … <calls:B.c> <calls:B.c> … … Mining
  • 57. Leveraging your IDE’s build environment framework context project indication environment object usage selected proposals
  • 58. “I’ve seen much but why do you call it IDE 2.0 ?” WRAP UP
  • 59. From IDE 1.0 to IDE 2.0
  • 60. From Web 2.0 to IDE 2.0 Let’s map the Web 2.0 principles to IDE 2.0 to see how this analogy fits: 1. The Web as Platform… 2. Data as “Intel inside”… 3. Harnessing Collective Intelligence… 4. Rich User Experiences… 5. Lightweight Programming Models…
  • 61. Milestones … 01.09.2010 01.12.2010 21.03.2009 Moving to Stacktrace v0.1 Release Eclipse.org Recommender 01.07.2010 v0.1 Example Code 01.10.2010 v0.1 Bugs 01.02.2011 Recommender v0.1 Last.FM Recommender
  • 62. Resources • Contact • Marcel Bruch bruch@cs.tu-darmstadt.de • • Project homepage • http://www.stg.tu-darmstadt.de/research/core/ • Download Release “LISBON” (V.0.2.105) • http://www.stg.tu-darmstadt.de/research/core/download • Source Code • http://eclipselabs.org/p/code-recommenders/
  • 63. Credits – innumerable hours have spent… Peter Schroeder Daniel Glöckner Johannes Lerch Maik Görtz Mohsen Parisay Jan Kassens Johannes Born Sebastian Kasten Daniel Staesche Sebastian Ahlfeld David Kalnischkies Sebastian Wörner Boyan Yurukov Jan Stolzenburg Florian Jakob Nico Wombacher Dirk Kröhan Christopher Mann Julius Rückert Steffen Remus Sebastian Proksch Sinem Emeröz Veronika Kostadinova Nikolay Shindov Tomasz Kalbarczyk Michael Novotny Jens Krause Michael Kutschke Gary Fritz Kristijan Madunic Sheip Dargutev David Schuld Sebastian Denel Johannes Kastl Roman Getto Daniel Brandtner Christian Kilb Florian Nöll Laura Altmüller Dennis Sänger Tjark Vandommele Dennis Siebert Markus Migenda Minh Hoang Nguyen Peter Sinzig Paul Schatygin Jan-Michael Heller Sascha Nordquist
  • 64. Q&A
  • 65. Summary Intelligent Code Completion Usage-Driven Javadocs Code Example Recommender Smart Bug Dectection
  • 66. Affiliation Prof. Dr. Mira Mezini Software Technology Group Fachbereich Informatik Technische Universität Darmstadt