Successfully reported this slideshow.
Predicting Defects for Eclipse for Eclipse <ul><li>Thomas Zimmermann • Rahul Premraj •  Andreas Zeller </li></ul><ul><li>S...
Summary Project   Eclipse (eclipse.org) Content Defect counts Complexity metrics Releases 2.0, 2.1, and 3.0 Level Packages...
Data Source Bugs Changes
Identifying Fixes <ul><li>Change history contains ordinary changes as well as bug fixes </li></ul><ul><li>Use  log message...
Mapping Bugs <ul><li>Each bug report has a unique  bug ID </li></ul><ul><li>Bug reports contain  releases (and sometimes c...
Eclipse Bugs
Obtaining Data
 
<ul><li>Program is open source </li></ul><ul><li>Plenty of data available – automatically </li></ul><ul><li>Program data –...
Predictions at Work
Eclipse Bug Data <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> <!-- comments --> <defects project=&quot;eclip...
Eclipse Bug Data <ul><li>For three Eclipse releases: </li></ul><ul><ul><li>For all Eclipse components: </li></ul></ul><ul>...
Eclipse Bugs
Where do bugs come from?
Is it the Developers? Does experience matter? Bug density correlates with experience!
How about Testing? Does  code coverage  predict bug density? Yes –  the more tests,  the more bugs!
History? I found lots of bugs here.  Will there be more? Yes!
How about Metrics? Do  code metrics  predict bug density? Yes! (but only with history)
Syntactic Tokens? Which  tokens predict bug density? imports • extends • implements
Eclipse Imports import org.eclipse.jdt.internal.compiler.lookup.*; import org.eclipse.jdt.internal.compiler.*; import org....
Eclipse Imports Correlation with failure Correlation with success import org.eclipse.jdt.internal.compiler.lookup.*; impor...
What makes code buggy in the first place?
Eclipse Bug Data <ul><li>For three Eclipse releases: </li></ul><ul><ul><li>For all Eclipse components: </li></ul></ul><ul>...
Prochain SlideShare
Chargement dans…5
×

Predicting Defects for Eclipse

1 512 vues

Publié le

Thomas Zimmermann, Rahul Premraj, Andres Zeller

Publié dans : Technologie
  • Soyez le premier à commenter

Predicting Defects for Eclipse

  1. 1. Predicting Defects for Eclipse for Eclipse <ul><li>Thomas Zimmermann • Rahul Premraj • Andreas Zeller </li></ul><ul><li>Saarland University </li></ul>
  2. 2. Summary Project  Eclipse (eclipse.org) Content Defect counts Complexity metrics Releases 2.0, 2.1, and 3.0 Level Packages and files URL www.st.cs.uni-sb.de/softevo/ More data Eclipse source code
  3. 3. Data Source Bugs Changes
  4. 4. Identifying Fixes <ul><li>Change history contains ordinary changes as well as bug fixes </li></ul><ul><li>Use log messages to discriminate </li></ul><ul><ul><li>Search for keywords – e.g. “bug” “fix” </li></ul></ul><ul><ul><li>Look out for bug IDs – e.g. “#33547” </li></ul></ul>Bugs Changes
  5. 5. Mapping Bugs <ul><li>Each bug report has a unique bug ID </li></ul><ul><li>Bug reports contain releases (and sometimes components) </li></ul><ul><li>Associate bugs with changes via bug ID </li></ul>Bugs Changes
  6. 6. Eclipse Bugs
  7. 7. Obtaining Data
  8. 9. <ul><li>Program is open source </li></ul><ul><li>Plenty of data available – automatically </li></ul><ul><li>Program data – all sorts of code analyses </li></ul><ul><li>Process data – changes, bugs, e-mail, etc. </li></ul><ul><li>Data set provides bugs, metrics, tokens </li></ul>
  9. 10. Predictions at Work
  10. 11. Eclipse Bug Data <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> <!-- comments --> <defects project=&quot;eclipse&quot; release=&quot;2.0&quot; dataversion=&quot;1.0&quot;> <plug-in name=&quot;platform-launcher&quot;> <counts> <count id=&quot;pre&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> <count id=&quot;post&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> </counts> <package name=&quot;org.eclipse&quot;> <counts> <count id=&quot;pre&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> <count id=&quot;post&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> </counts> <package name=&quot;org.eclipse.core&quot;> <counts> <count id=&quot;pre&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> <count id=&quot;post&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> </counts> <package name=&quot;org.eclipse.core.launcher&quot;> <counts> <count id=&quot;pre&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> <count id=&quot;post&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> </counts> <compilationunit dir=&quot;/platform-launcher/library/&quot; base=&quot;Main.java&quot;> <counts> <count id=&quot;pre&quot; value=&quot;0&quot;/> <count id=&quot;post&quot; value=&quot;0&quot;/> </counts> </compilationunit> </package> </package> </package> </plug-in>
  11. 12. Eclipse Bug Data <ul><li>For three Eclipse releases: </li></ul><ul><ul><li>For all Eclipse components: </li></ul></ul><ul><ul><ul><li>Defect counts before and after release </li></ul></ul></ul><ul><ul><ul><li>Complexity metrics </li></ul></ul></ul><ul><ul><ul><li>Syntactic tokens </li></ul></ul></ul><ul><li>Download at http://www.st.cs.uni-sb.de/softevo/ </li></ul><?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> <!-- comments --> <defects project=&quot;eclipse&quot; release=&quot;2.0&quot; dataversion=&quot;1.0&quot;> <plug-in name=&quot;platform-launcher&quot;> <counts> <count id=&quot;pre&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> <count id=&quot;post&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> </counts> <package name=&quot;org.eclipse&quot;> <counts> <count id=&quot;pre&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> <count id=&quot;post&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> </counts> <package name=&quot;org.eclipse.core&quot;> <counts> <count id=&quot;pre&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> <count id=&quot;post&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> </counts> <package name=&quot;org.eclipse.core.launcher&quot;> <counts> <count id=&quot;pre&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> <count id=&quot;post&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> </counts> <compilationunit dir=&quot;/platform-launcher/library/&quot; base=&quot;Main.java&quot;> <counts> <count id=&quot;pre&quot; value=&quot;0&quot;/> <count id=&quot;post&quot; value=&quot;0&quot;/> </counts> </compilationunit> </package> </package> </package> </plug-in>
  12. 13. Eclipse Bugs
  13. 14. Where do bugs come from?
  14. 15. Is it the Developers? Does experience matter? Bug density correlates with experience!
  15. 16. How about Testing? Does code coverage predict bug density? Yes – the more tests, the more bugs!
  16. 17. History? I found lots of bugs here. Will there be more? Yes!
  17. 18. How about Metrics? Do code metrics predict bug density? Yes! (but only with history)
  18. 19. Syntactic Tokens? Which tokens predict bug density? imports • extends • implements
  19. 20. Eclipse Imports import org.eclipse.jdt.internal.compiler.lookup.*; import org.eclipse.jdt.internal.compiler.*; import org.eclipse.jdt.internal.compiler.ast.*; import org.eclipse.jdt.internal.compiler.util.*; ... import org.eclipse.pde.core.*; import org.eclipse.jface.wizard.*; import org.eclipse.ui.*; 14% of all components importing ui show a post-release defect 71% of all components importing compiler show a post-release defect Joint work with Adrian Schröter • Tom Zimmermann
  20. 21. Eclipse Imports Correlation with failure Correlation with success import org.eclipse.jdt.internal.compiler.lookup.*; import org.eclipse.jdt.internal.compiler.*; import org.eclipse.jdt.internal.compiler.ast.*; import org.eclipse.jdt.internal.compiler.util.*; ... import org.eclipse.pde.core.*; import org.eclipse.jface.wizard.*; import org.eclipse.ui.*;
  21. 22. What makes code buggy in the first place?
  22. 23. Eclipse Bug Data <ul><li>For three Eclipse releases: </li></ul><ul><ul><li>For all Eclipse components: </li></ul></ul><ul><ul><ul><li>Defect counts before and after release </li></ul></ul></ul><ul><ul><ul><li>Complexity metrics </li></ul></ul></ul><ul><ul><ul><li>Syntactic tokens </li></ul></ul></ul><ul><li>Download at http://www.st.cs.uni-sb.de/softevo/ </li></ul><?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> <!-- comments --> <defects project=&quot;eclipse&quot; release=&quot;2.0&quot; dataversion=&quot;1.0&quot;> <plug-in name=&quot;platform-launcher&quot;> <counts> <count id=&quot;pre&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> <count id=&quot;post&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> </counts> <package name=&quot;org.eclipse&quot;> <counts> <count id=&quot;pre&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> <count id=&quot;post&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> </counts> <package name=&quot;org.eclipse.core&quot;> <counts> <count id=&quot;pre&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> <count id=&quot;post&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> </counts> <package name=&quot;org.eclipse.core.launcher&quot;> <counts> <count id=&quot;pre&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> <count id=&quot;post&quot; value=&quot;0&quot; avg=&quot;0.0&quot; compilationunits=&quot;1&quot; max=&quot;0&quot;/> </counts> <compilationunit dir=&quot;/platform-launcher/library/&quot; base=&quot;Main.java&quot;> <counts> <count id=&quot;pre&quot; value=&quot;0&quot;/> <count id=&quot;post&quot; value=&quot;0&quot;/> </counts> </compilationunit> </package> </package> </package> </plug-in>

×