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()
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
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”
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.
27. At runtime your error log shows…
An error has occurred.
See error log for more details.
org.eclipse.core.runtime.AssertionFailedException
null argument:
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) |
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)
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
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…
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