1 / 28

Predicting Bugs Using Antipatterns

Predicting Bugs Using Antipatterns. Ehsan Salamati Taba , Foutse Khomh , Ying Zou , Meiyappan Nagappan , Ahmed E. Hassan. Past Defects, History of Churn (Zimmermann, Hassan et al.). Model. Predict Bugs. Code. Antipatterns. Topic Modeling (Chen et al.). Antipatterns.

zaria
Download Presentation

Predicting Bugs Using Antipatterns

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Predicting Bugs Using Antipatterns Ehsan SalamatiTaba, FoutseKhomh, Ying Zou, MeiyappanNagappan, Ahmed E. Hassan

  2. Past Defects, History of Churn (Zimmermann, Hassan et al.) Model Predict Bugs Code Antipatterns Topic Modeling (Chen et al.)

  3. Antipatterns • weaknesses in design • not technically incorrectand don't prevent a system from functioning

  4. Indicate a deeper problem in the system

  5. Motivation Antipatterns indicate weaknessesin the design that may increase the risk for bugs in the future. (Fowler 1999)

  6. Approach RQ1 Mining Source Code Repositories CVS Repository Detecting Antipatterns RQ2 Analyzing Calculating Metrics Mining Bug Repositories Bugzilla RQ3

  7. Mining Source Code Repositories Studied Systems Studied Systems

  8. Detecting Antipatterns • DECOR (Moha et al.) • 13 different antipatterns # of Antipatterns # Files

  9. Research Questions RQ1:Do antipatterns affect the density of bugs in files? RQ2: Do the proposed antipattern based metrics provide additional explanatory power over traditional metrics? RQ3: Can we improve traditional bug prediction models with antipatterns information?

  10. RQ1:Do antipatterns affect the density of bugs in files? • Null Hypothesis • Density of bugs in the files with antipatterns and the other files without antipatterns is the same. Wilcoxon rank sum test

  11. RQ1: Do antipatterns affect the density of bugs in files? Files with Antipatterns Files without Antipatterns Density of Bugs Density of Bugs

  12. Research Questions RQ1:Do antipatterns affect the density of bugs in files? RQ2:Do the proposed antipattern based metrics provide additional explanatory power over traditional metrics? RQ3: Can we improve traditional bug prediction models with antipatterns information?

  13. RQ2: Metrics • Average Number of Antipatterns (ANA) • Antipattern Recurrence Length(ARL) • AntipatternCumulative Pairwise Differences (ACPD) • Antipattern Complexity Metric (ACM)

  14. RQ2: Example 3.0 4.0 5.0 6.0 1.0 2.0 3 0 2 3 4 1 a.java 4 1 0 3 5 0 b.java 0 5 4 4 6 5 c.java ANA(a.java) =2.16, ARL(a.java) = 18.76, ACPD(a.java) = 0

  15. Provide additional explanatory power over traditional metrics • ARL shows the biggest improvement

  16. Research Questions RQ1:Do antipatterns affect the density of bugs in files? RQ2: Do the proposed antipattern based metrics provide additional explanatory power over traditional metrics? RQ3:Can we improve traditional bug prediction models with antipatterns information?

  17. RQ3: Can we improve traditional bug prediction models with antipatterns information? Intra System Models Step-wise analysis Removing Independent Variables Collinearity Analysis

  18. ARL remained statistically significant and had a low collinearity with other metrics # Versions # Versions

  19. RQ3: Can we improve traditional bug prediction models with antipatterns information? • ARL can improve cross-system bug prediction on the two studied systems F-measure

  20. Backup Slides

  21. RQ2) Example 3.0 4.0 5.0 6.0 1.0 2.0 3 0 2 3 4 1 a.java 4 1 0 3 5 0 b.java 0 5 4 4 6 5 c.java ANA(a.java) =2.16, ARL(a.java) = 18.76, ACPD(a.java) = 0

  22. RQ1) Do antipatterns affect the density of bugs in files? Hypothesis There is no difference between the density of future bugs of the files with antipatterns and the other files without antipatterns. Wilcoxon rank sum test Findings In general, the density of bugs in a file with antipatterns is higher than the density of bugs in a file without antipatterns. Hypothesis There is no difference between the density of future bugs of the files with antipatterns and the other files without antipatterns. Wilcoxon rank sum test We perform a Wilcoxon rank sum test to accept or refuse the hypothesis, using the 5% level (i.e., p-value < 0:05).

More Related