Download presentation
Presentation is loading. Please wait.
Published byCorey Hamilton Modified over 9 years ago
1
Ehsan Salamati Taba, Foutse Khomh, Ying Zou, Meiyappan Nagappan, Ahmed E. Hassan 1
2
2
3
Predict Bugs Model 3 Past Defects, History of Churn (Zimmermann, Hassan et al.) Topic Modeling (Chen et al.)
4
4
5
not technically incorrect and don't prevent a system from functioning weaknesses in design 5
6
Indicate a deeper problem in the system 6
7
Antipatterns indicate weaknesses in the design that may increase the risk for bugs in the future. (Fowler 1999) 7
8
There is not a lot of refactoring activities when developing a system. (Olbrich et al.) 8
9
CVS Repository Mining Source Code Repositories Detecting Antipatterns Mining Bug Repositories Bugzilla Calculating Metrics Analyzing RQ1 RQ2 RQ3 9
10
10 SystemsRelease(#)ChurnLOCs Eclipse2.0 - 3.3.1(12)148,45426,209,669 ArgoUML0.12 - 0.26.2(9)21,4272,025,730 Studied Systems
11
CVS Repository Mining Source Code Repositories Detecting Antipatterns Mining Bug Repositories Bugzilla Calculating Metrics Analyzing RQ1 RQ2 RQ3 11
12
12 13 different antipatterns DECOR (Moha et al.) # of Antipatterns # Files Systems#Antipatterns Eclipse273,766 ArgoUML15,100
13
CVS Repository Mining Source Code Repositories Detecting Antipatterns Mining Bug Repositories Bugzilla Calculating Metrics Analyzing RQ1 RQ2 RQ3 13 Systems#Post Bugs#Pre Bugs Eclipse27,40623,554 ArgoUML2,5492,569
14
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? 14
15
15
16
16 SystemsReleases(#)D A – D NA > 0p-value<0.05 Eclipse1288 ArgoUML966 Files with Antipatterns Density of Bugs Files without Antipatterns Density of Bugs
17
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
18
Average Number of Antipatterns (ANA) Antipattern Cumulative Pairwise Differences (ACPD) 18 Antipattern Recurrence Length(ARL) Antipattern Complexity Metric (ACM)
19
19 1.02.0 3.04.0 5.06.0 a.java b.java c.java 3 4 02 1 3 4 5 10 0 3 0 6 54 5 4 ANA(a.java) =2.16, ARL(a.java) = 18.76, ACPD(a.java) = 0
20
20
21
21 Provide additional explanatory power over traditional metrics ARL shows the biggest improvement
22
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? 22
23
Step-wise analysis 1)Removing Independent Variables 2)Collinearity Analysis 23 Metric nameDescription LOCSource lines of codes MLOCExecutable lines of codes PARNumber of parameters NOFNumber of attributes NOMNumber of methods NOCNumber of children VGCyclomatic complexity DITDepth of inheritance tree LCOMLack of cohesion of methods NOTNumber of classes WMCNumber of weighted methods per class PRENumber of pre-released bugs ChurnNumber of lines of code added modified or deleted
24
24 ARL remained statistically significant and had a low collinearity with other metrics # Versions
25
F-measure 25 ARL can improve cross- system bug prediction on the two studied systems
27
Backup Slides 27
28
28 1.02.0 3.04.0 5.06.0 a.java b.java c.java 3 4 02 1 3 4 5 10 0 3 0 6 54 5 4 ANA(a.java) =2.16, ARL(a.java) = 18.76, ACPD(a.java) = 0
29
29 Anti SingletonBlobClass Data Should be PrivateComplex ClassLarge Class Lazy ClassLPLLong MethodMessage ChainRPB Spaghetti CodeSGSwissArmyKnife--
30
30
31
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). Findings In general, the density of bugs in a file with antipatterns is higher than the density of bugs in a file without antipatterns. 31
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.