Analyzing Code Evolution
to Uncover Relations
between Bad Smells
Angela Lozano, Kim Mens, Jawira Portugal
@ang_loza #SANER15
PPAP 2015
More info:
alozano@soft.vub.ac.be
Agenda
• Bad smells
• Inter-smell relations
• Experiment
• Results
• Conclusions
Bad smells
Bad smells
• Bad smell?: indicator that points to parts of the code
that may need to be refactored
• Bad smells analyzed:
• Feature Envy (FE)
• Long Method (LM)
• Type Checking (TC)
• God Class (GC)
Inter-smell relations
Why are relations between
smells interesting?
• Easier to detect
• More complex to eliminate
• May indicate “high-level” smells
Inter-smell relations
[Pietrzak & Walter, XP 06]
Plain support a —> b
a = Data Class
b = Feature Envy
Mutual support a <—> b ?
Rejection a -/-> b
a = Lazy Class
b = Large Class
Common refactoring !a —> !b ∨ !a —> b
a = Feature Envy
b = Lazy Class
Inclusion a ==> b
a = Parallel inheritance
b = Shotgun surgery
+Aggregate, +Transitive
Experiment
Data collectedri
ri+1
Log4j 1.2.1 -1.2.17 16 releases
Apr 04 - Feb 13
106 months
JMol 1.0 - 11.0 34 releases
May 01 - Mar 07
70 months
JFreeChart 0.5.6 - 1.0.14 45 releases
Dec 00- Nov 11
131 months
rN
Data collected
ri
ri+1
LM FE TC GC
package1 Class1 method1() X
package1 Class1 method2(int) X
XX
X
package1 Class1 method3(float,int) X X
package1 Class1 method4(String) X X
package2 Class2 method5() X
package2 Class3 method6(Object) X X
Data collected
ri
ri+1
LM FE TC GC
package1 Class1 method1() X
package1 Class1 method2(int) X
XX
X
package1 Class1 method3(float,int) X X
package1 Class1 method4(String) X X
package2 Class2 method5() X
package2 Class3 method6(Object) X X
exist
(LM) = 3
(FE) = 2
(TC) = 1
(GC) = 1
Data collected
ri
ri+1
LM FE TC GC
package1 Class1 method1() X
package1 Class1 method2(int) X
XX
X
package1 Class1 method3(float,int) X X
package1 Class1 method4(String) X X
package2 Class2 method5() X
package2 Class3 method6(Object) X X
exist
(LM) = 3
(FE) = 2
(TC) = 1
(GC) = 1
co-exist
(TC,GC) = 1
(LM,GC) = 1
(FE,GC) = 1
(LM,FE) = 1
(TC,LM) = 0
(TC,FE) = 0
Data collected
ri
ri+1
LM FE TC GC
package1 Class1 method1() X
package1 Class1 method2(int) X
XX
X
package1 Class1 method3(float,int) X X
package1 Class1 method4(String) X X
package2 Class2 method5() X
package2 Class3 method6(Object) X X
LM FE TC GC
package1 Class1 method1()
package1 Class1 method2(int) X
XXpackage1 Class4 method3(float,int) X
package1 Class4 method4(String) X
package2 Class2 method5() X
package2 Class3 method6(Object)
exist
(LM) = 3
(FE) = 2
(TC) = 1
(GC) = 1
co-exist
(TC,GC) = 1
(LM,GC) = 1
(FE,GC) = 1
(LM,FE) = 1
(TC,LM) = 0
(TC,FE) = 0
Data collected
ri
ri+1
LM FE TC GC
package1 Class1 method1() X
package1 Class1 method2(int) X
XX
X
package1 Class1 method3(float,int) X X
package1 Class1 method4(String) X X
package2 Class2 method5() X
package2 Class3 method6(Object) X X
LM FE TC GC
package1 Class1 method1()
package1 Class1 method2(int) X
XXpackage1 Class4 method3(float,int) X
package1 Class4 method4(String) X
package2 Class2 method5() X
package2 Class3 method6(Object)
exist
(LM) = 3
(FE) = 2
(TC) = 1
(GC) = 1
exist
(LM) = 3+2=5
(FE) = 2+1=3
(TC) = 1+1=2
(GC) = 1+0=1
co-exist
(TC,GC) = 1
(LM,GC) = 1
(FE,GC) = 1
(LM,FE) = 1
(TC,LM) = 0
(TC,FE) = 0
Data collected
ri
ri+1
LM FE TC GC
package1 Class1 method1() X
package1 Class1 method2(int) X
XX
X
package1 Class1 method3(float,int) X X
package1 Class1 method4(String) X X
package2 Class2 method5() X
package2 Class3 method6(Object) X X
LM FE TC GC
package1 Class1 method1()
package1 Class1 method2(int) X
XXpackage1 Class4 method3(float,int) X
package1 Class4 method4(String) X
package2 Class2 method5() X
package2 Class3 method6(Object)
exist
(LM) = 3
(FE) = 2
(TC) = 1
(GC) = 1
dissapear
(LM) = 1
(FE) = 1
(GC) = 1
exist
(LM) = 3+2=5
(FE) = 2+1=3
(TC) = 1+1=2
(GC) = 1+0=1
co-exist
(TC,GC) = 1
(LM,GC) = 1
(FE,GC) = 1
(LM,FE) = 1
(TC,LM) = 0
(TC,FE) = 0
Data collected
ri
ri+1
LM FE TC GC
package1 Class1 method1() X
package1 Class1 method2(int) X
XX
X
package1 Class1 method3(float,int) X X
package1 Class1 method4(String) X X
package2 Class2 method5() X
package2 Class3 method6(Object) X X
LM FE TC GC
package1 Class1 method1()
package1 Class1 method2(int) X
XXpackage1 Class4 method3(float,int) X
package1 Class4 method4(String) X
package2 Class2 method5() X
package2 Class3 method6(Object)
exist
(LM) = 3
(FE) = 2
(TC) = 1
(GC) = 1
dissapear
(LM) = 1
(FE) = 1
(GC) = 1
co-dissapear
(LM,FE) = 1
exist
(LM) = 3+2=5
(FE) = 2+1=3
(TC) = 1+1=2
(GC) = 1+0=1
co-exist
(TC,GC) = 1
(LM,GC) = 1
(FE,GC) = 1
(LM,FE) = 1
(TC,LM) = 0
(TC,FE) = 0
Data collected
ri
ri+1
LM FE TC GC
package1 Class1 method1() X
package1 Class1 method2(int) X
XX
X
package1 Class1 method3(float,int) X X
package1 Class1 method4(String) X X
package2 Class2 method5() X
package2 Class3 method6(Object) X X
LM FE TC GC
package1 Class1 method1()
package1 Class1 method2(int) X
XXpackage1 Class4 method3(float,int) X
package1 Class4 method4(String) X
package2 Class2 method5() X
package2 Class3 method6(Object)
exist
(LM) = 3
(FE) = 2
(TC) = 1
(GC) = 1
dissapear
(LM) = 1
(FE) = 1
(GC) = 1
co-dissapear
(LM,FE) = 1
exist
(LM) = 3+2=5
(FE) = 2+1=3
(TC) = 1+1=2
(GC) = 1+0=1
co-exist
(TC,GC) = 1
(LM,GC) = 1
(FE,GC) = 1
(LM,FE) = 1
(TC,LM) = 0
(TC,FE) = 0
Data collected
ri
ri+1
LM FE TC GC
package1 Class1 method1() X
package1 Class1 method2(int) X
XX
X
package1 Class1 method3(float,int) X X
package1 Class1 method4(String) X X
package2 Class2 method5() X
package2 Class3 method6(Object) X X
LM FE TC GC
package1 Class1 method1()
package1 Class1 method2(int) X
XXpackage1 Class4 method3(float,int) X
package1 Class4 method4(String) X
package2 Class2 method5() X
package2 Class3 method6(Object)
exist
(LM) = 3
(FE) = 2
(TC) = 1
(GC) = 1
dissapear
(LM) = 1
(FE) = 1
(GC) = 1
co-dissapear
(LM,FE) = 1
exist
(LM) = 3+2=5
(FE) = 2+1=3
(TC) = 1+1=2
(GC) = 1+0=1
co-exist
(TC,GC) = 1
(LM,GC) = 1
(FE,GC) = 1
(LM,FE) = 1
(TC,LM) = 0
(TC,FE) = 0
Data collected
ri
ri+1
LM FE TC GC
package1 Class1 method1() X
package1 Class1 method2(int) X
XX
X
package1 Class1 method3(float,int) X X
package1 Class1 method4(String) X X
package2 Class2 method5() X
package2 Class3 method6(Object) X X
LM FE TC GC
package1 Class1 method1()
package1 Class1 method2(int) X
XXpackage1 Class4 method3(float,int) X
package1 Class4 method4(String) X
package2 Class2 method5() X
package2 Class3 method6(Object)
exist
(LM) = 3
(FE) = 2
(TC) = 1
(GC) = 1
dissapear
(LM) = 1
(FE) = 1
(GC) = 1
co-dissapear
(LM,FE) = 1
• disappear(BS): number of SCEs (Classes or
Methods) where the bad smell was present in the
previous analyzed version of the source code but is
no longer present in the currently analyzed version
• co-disappear(BS1, BS2): number of SCEs
(Classes or Methods) where both both bad smells BS1
and BS2 disappeared from the analyzed entity with
respect to the previous analyzed version of the source
code
1) Indirect Metrics: Using on these basic metrics we
derive additional metrics:
exist overlap(BS1, BS2) =
co exist(BS1, BS2)
exist(BS1)
disappear overlap(BS1, BS2) =
co disappear(BS1, BS2)
disappear(BS1)
Note that these metrics are not symmetric e.g., exist-
III. RESULTS
Figure 1 shows the amount of bad sme
trough all versions analyzed. The most commo
all case studies were long method (LM) and
The least frequent bad smell is type checking
Fig. 1: Cumulative number of bad smells foun
Table I shows that the number of instances
exist
(LM) = 3+2=5
(FE) = 2+1=3
(TC) = 1+1=2
(GC) = 1+0=1
co-exist
(TC,GC) = 1
(LM,GC) = 1
(FE,GC) = 1
(LM,FE) = 1
(TC,LM) = 0
(TC,FE) = 0
Data collected
ri
ri+1
LM FE TC GC
package1 Class1 method1() X
package1 Class1 method2(int) X
XX
X
package1 Class1 method3(float,int) X X
package1 Class1 method4(String) X X
package2 Class2 method5() X
package2 Class3 method6(Object) X X
LM FE TC GC
package1 Class1 method1()
package1 Class1 method2(int) X
XXpackage1 Class4 method3(float,int) X
package1 Class4 method4(String) X
package2 Class2 method5() X
package2 Class3 method6(Object)
exist
(LM) = 3
(FE) = 2
(TC) = 1
(GC) = 1
dissapear
(LM) = 1
(FE) = 1
(GC) = 1
co-dissapear
(LM,FE) = 1
exist-overlap
(TC,GC) = 1/2
(LM,GC) = 1/5
(FE,GC) = 1/2
(LM,FE) = 1/1
• disappear(BS): number of SCEs (Classes or
Methods) where the bad smell was present in the
previous analyzed version of the source code but is
no longer present in the currently analyzed version
• co-disappear(BS1, BS2): number of SCEs
(Classes or Methods) where both both bad smells BS1
and BS2 disappeared from the analyzed entity with
respect to the previous analyzed version of the source
code
1) Indirect Metrics: Using on these basic metrics we
derive additional metrics:
exist overlap(BS1, BS2) =
co exist(BS1, BS2)
exist(BS1)
disappear overlap(BS1, BS2) =
co disappear(BS1, BS2)
disappear(BS1)
Note that these metrics are not symmetric e.g., exist-
III. RESULTS
Figure 1 shows the amount of bad sme
trough all versions analyzed. The most commo
all case studies were long method (LM) and
The least frequent bad smell is type checking
Fig. 1: Cumulative number of bad smells foun
Table I shows that the number of instances
exist
(LM) = 3+2=5
(FE) = 2+1=3
(TC) = 1+1=2
(GC) = 1+0=1
!
(GC,TC) = 1/1
(GC,LM) = 1/1
(GC,FE) = 1/1
(FE,LM) = 1/3
co-exist
(TC,GC) = 1
(LM,GC) = 1
(FE,GC) = 1
(LM,FE) = 1
(TC,LM) = 0
(TC,FE) = 0
Data collected
ri
ri+1
LM FE TC GC
package1 Class1 method1() X
package1 Class1 method2(int) X
XX
X
package1 Class1 method3(float,int) X X
package1 Class1 method4(String) X X
package2 Class2 method5() X
package2 Class3 method6(Object) X X
LM FE TC GC
package1 Class1 method1()
package1 Class1 method2(int) X
XXpackage1 Class4 method3(float,int) X
package1 Class4 method4(String) X
package2 Class2 method5() X
package2 Class3 method6(Object)
exist
(LM) = 3
(FE) = 2
(TC) = 1
(GC) = 1
dissapear
(LM) = 1
(FE) = 1
(GC) = 1
co-dissapear
(LM,FE) = 1
exist-overlap
(TC,GC) = 1/2
(LM,GC) = 1/5
(FE,GC) = 1/2
(LM,FE) = 1/1
• disappear(BS): number of SCEs (Classes or
Methods) where the bad smell was present in the
previous analyzed version of the source code but is
no longer present in the currently analyzed version
• co-disappear(BS1, BS2): number of SCEs
(Classes or Methods) where both both bad smells BS1
and BS2 disappeared from the analyzed entity with
respect to the previous analyzed version of the source
code
1) Indirect Metrics: Using on these basic metrics we
derive additional metrics:
exist overlap(BS1, BS2) =
co exist(BS1, BS2)
exist(BS1)
disappear overlap(BS1, BS2) =
co disappear(BS1, BS2)
disappear(BS1)
Note that these metrics are not symmetric e.g., exist-
III. RESULTS
Figure 1 shows the amount of bad sme
trough all versions analyzed. The most commo
all case studies were long method (LM) and
The least frequent bad smell is type checking
Fig. 1: Cumulative number of bad smells foun
Table I shows that the number of instances
dissapear-overlap
(LM,FE) = 1/1
exist
(LM) = 3+2=5
(FE) = 2+1=3
(TC) = 1+1=2
(GC) = 1+0=1
!
(GC,TC) = 1/1
(GC,LM) = 1/1
(GC,FE) = 1/1
(FE,LM) = 1/3
!
(FE,LM) = 1/1
co-exist
(TC,GC) = 1
(LM,GC) = 1
(FE,GC) = 1
(LM,FE) = 1
(TC,LM) = 0
(TC,FE) = 0
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Detecting inter-smell relations
exist
(LM) = 3
(FE) = 2
(TC) = 1
(GC) = 1
dissapear
(LM) = 1
(FE) = 1
(GC) = 1
co-dissapear
(LM,FE) = 1
exist
(LM) = 3+2=5
(FE) = 2+1=3
(TC) = 1+1=2
(GC) = 1+0=1
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Detecting inter-smell relations
exist
(LM) = 3
(FE) = 2
(TC) = 1
(GC) = 1
dissapear
(LM) = 1
(FE) = 1
(GC) = 1
co-dissapear
(LM,FE) = 1
exist
(LM) = 3+2=5
(FE) = 2+1=3
(TC) = 1+1=2
(GC) = 1+0=1
exist-overlap
(TC,GC) = 1/2
(LM,GC) = 1/5
(FE,GC) = 1/2
(LM,FE) = 1/1
!
(GC,TC) = 1/1
(GC,LM) = 1/1
(GC,FE) = 1/1
(FE,LM) = 1/3
GC —> LM
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Detecting inter-smell relations
exist
(LM) = 3
(FE) = 2
(TC) = 1
(GC) = 1
dissapear
(LM) = 1
(FE) = 1
(GC) = 1
co-dissapear
(LM,FE) = 1
exist
(LM) = 3+2=5
(FE) = 2+1=3
(TC) = 1+1=2
(GC) = 1+0=1
exist-overlap
(TC,GC) = 1/2
(LM,GC) = 1/5
(FE,GC) = 1/2
(LM,FE) = 1/1
!
(GC,TC) = 1/1
(GC,LM) = 1/1
(GC,FE) = 1/1
(FE,LM) = 1/3
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Detecting inter-smell relations
exist
(LM) = 3
(FE) = 2
(TC) = 1
(GC) = 1
dissapear
(LM) = 1
(FE) = 1
(GC) = 1
co-dissapear
(LM,FE) = 1
exist
(LM) = 3+2=5
(FE) = 2+1=3
(TC) = 1+1=2
(GC) = 1+0=1
exist-overlap
(TC,GC) = 1/2
(LM,GC) = 1/5
(FE,GC) = 1/2
(LM,FE) = 1/1
!
(GC,TC) = 1/1
(GC,LM) = 1/1
(GC,FE) = 1/1
(FE,LM) = 1/3
co-exist
(TC,GC) = 1
(LM,GC) = 1
(FE,GC) = 1
(LM,FE) = 1
(TC,LM) = 0
(TC,FE) = 0
TC -/-> LM
TC -/-> FE
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Detecting inter-smell relations
exist
(LM) = 3
(FE) = 2
(TC) = 1
(GC) = 1
dissapear
(LM) = 1
(FE) = 1
(GC) = 1
co-dissapear
(LM,FE) = 1
exist
(LM) = 3+2=5
(FE) = 2+1=3
(TC) = 1+1=2
(GC) = 1+0=1
exist-overlap
(TC,GC) = 1/2
(LM,GC) = 1/5
(FE,GC) = 1/2
(LM,FE) = 1/1
!
(GC,TC) = 1/1
(GC,LM) = 1/1
(GC,FE) = 1/1
(FE,LM) = 1/3
dissapear-overlap
(LM,FE) = 1/1
!
(FE,LM) = 1/1
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Detecting inter-smell relations
exist
(LM) = 3
(FE) = 2
(TC) = 1
(GC) = 1
dissapear
(LM) = 1
(FE) = 1
(GC) = 1
co-dissapear
(LM,FE) = 1
exist
(LM) = 3+2=5
(FE) = 2+1=3
(TC) = 1+1=2
(GC) = 1+0=1
exist-overlap
(TC,GC) = 1/2
(LM,GC) = 1/5
(FE,GC) = 1/2
(LM,FE) = 1/1
!
(GC,TC) = 1/1
(GC,LM) = 1/1
(GC,FE) = 1/1
(FE,LM) = 1/3
GC ==> FE
GC ==> TC
LM ==> FE
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Detecting inter-smell relations
exist
(LM) = 3
(FE) = 2
(TC) = 1
(GC) = 1
dissapear
(LM) = 1
(FE) = 1
(GC) = 1
co-dissapear
(LM,FE) = 1
exist
(LM) = 3+2=5
(FE) = 2+1=3
(TC) = 1+1=2
(GC) = 1+0=1
exist-overlap
(TC,GC) = 1/2
(LM,GC) = 1/5
(FE,GC) = 1/2
(LM,FE) = 1/1
!
(GC,TC) = 1/1
(GC,LM) = 1/1
(GC,FE) = 1/1
(FE,LM) = 1/3
GC ==> FE
GC ==> TC
LM ==> FE
Results
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Results:
FE ??? LM
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Results:
FE ??? LM
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
=>
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Results:
FE ??? TC
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
! LM) or if there is mutual support (GC $ LM). We
ded that the relation between these two bad smells is
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
that handle multiple abstractions/responsibilities (TC 6!
TC 6! LM, and TC 6! GC). Whenever a met
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Results:
FE ??? TC
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
! LM) or if there is mutual support (GC $ LM). We
ded that the relation between these two bad smells is
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
that handle multiple abstractions/responsibilities (TC 6!
TC 6! LM, and TC 6! GC). Whenever a met
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
-/->
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Results:
FE ??? GCTABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
! LM) or if there is mutual support (GC $ LM). We
ded that the relation between these two bad smells is
l support because there is not enough evidence to con-
a common refactoring (even though some refactorings
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
that handle multiple abstractions/responsibilities (TC 6!
TC 6! LM, and TC 6! GC). Whenever a met
located in the wrong class it is likely to be dealin
separable data/control flow paths (FE ) LM). Metho
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Results:
FE ??? GCTABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
! LM) or if there is mutual support (GC $ LM). We
ded that the relation between these two bad smells is
l support because there is not enough evidence to con-
a common refactoring (even though some refactorings
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
that handle multiple abstractions/responsibilities (TC 6!
TC 6! LM, and TC 6! GC). Whenever a met
located in the wrong class it is likely to be dealin
separable data/control flow paths (FE ) LM). Metho
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
—>
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Results:
GC ??? LM
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
! LM) or if there is mutual support (GC $ LM). We
ded that the relation between these two bad smells is
l support because there is not enough evidence to con-
a common refactoring (even though some refactorings
ate both of them).
scussion
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
that handle multiple abstractions/responsibilities (TC 6!
TC 6! LM, and TC 6! GC). Whenever a met
located in the wrong class it is likely to be dealin
separable data/control flow paths (FE ) LM). Metho
are wrongly located are likely to be a part of a disju
of methods within their class (FE ! GC). Finally, se
methods are likely to belong to classes with disjunct
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Results:
GC ??? LM
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
! LM) or if there is mutual support (GC $ LM). We
ded that the relation between these two bad smells is
l support because there is not enough evidence to con-
a common refactoring (even though some refactorings
ate both of them).
scussion
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
that handle multiple abstractions/responsibilities (TC 6!
TC 6! LM, and TC 6! GC). Whenever a met
located in the wrong class it is likely to be dealin
separable data/control flow paths (FE ) LM). Metho
are wrongly located are likely to be a part of a disju
of methods within their class (FE ! GC). Finally, se
methods are likely to belong to classes with disjunct
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
<—>
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Results:
GC ??? TC
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
! LM) or if there is mutual support (GC $ LM). We
ded that the relation between these two bad smells is
l support because there is not enough evidence to con-
a common refactoring (even though some refactorings
ate both of them).
scussion
is study ignores the analysis of bad smells that cannot
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
that handle multiple abstractions/responsibilities (TC 6!
TC 6! LM, and TC 6! GC). Whenever a met
located in the wrong class it is likely to be dealin
separable data/control flow paths (FE ) LM). Metho
are wrongly located are likely to be a part of a disju
of methods within their class (FE ! GC). Finally, se
methods are likely to belong to classes with disjunct
methods and classes with disjunct sets of methods are
to have methods that are handling more than one data/
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Results:
GC ??? TC
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
! LM) or if there is mutual support (GC $ LM). We
ded that the relation between these two bad smells is
l support because there is not enough evidence to con-
a common refactoring (even though some refactorings
ate both of them).
scussion
is study ignores the analysis of bad smells that cannot
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
that handle multiple abstractions/responsibilities (TC 6!
TC 6! LM, and TC 6! GC). Whenever a met
located in the wrong class it is likely to be dealin
separable data/control flow paths (FE ) LM). Metho
are wrongly located are likely to be a part of a disju
of methods within their class (FE ! GC). Finally, se
methods are likely to belong to classes with disjunct
methods and classes with disjunct sets of methods are
to have methods that are handling more than one data/
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
-/->
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Results:
LM ??? TC
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
! LM) or if there is mutual support (GC $ LM). We
ded that the relation between these two bad smells is
l support because there is not enough evidence to con-
a common refactoring (even though some refactorings
ate both of them).
scussion
is study ignores the analysis of bad smells that cannot
nd by JDeodorant (and their corresponding relations).
s, bad smells for which it could not find an automatic
oring, or whose refactoring does not ’improve’ the source
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
that handle multiple abstractions/responsibilities (TC 6!
TC 6! LM, and TC 6! GC). Whenever a met
located in the wrong class it is likely to be dealin
separable data/control flow paths (FE ) LM). Metho
are wrongly located are likely to be a part of a disju
of methods within their class (FE ! GC). Finally, se
methods are likely to belong to classes with disjunct
methods and classes with disjunct sets of methods are
to have methods that are handling more than one data/
flow path (GC $ LM).
C. Threats to Validity
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a)
Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a)
Rejection a -/-> b co-exist(a, b) ≈ 0
Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a)
Inclusion a ==> b exist-overlap(a, b) ≈ 1
Results:
LM ??? TC
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
! LM) or if there is mutual support (GC $ LM). We
ded that the relation between these two bad smells is
l support because there is not enough evidence to con-
a common refactoring (even though some refactorings
ate both of them).
scussion
is study ignores the analysis of bad smells that cannot
nd by JDeodorant (and their corresponding relations).
s, bad smells for which it could not find an automatic
oring, or whose refactoring does not ’improve’ the source
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
that handle multiple abstractions/responsibilities (TC 6!
TC 6! LM, and TC 6! GC). Whenever a met
located in the wrong class it is likely to be dealin
separable data/control flow paths (FE ) LM). Metho
are wrongly located are likely to be a part of a disju
of methods within their class (FE ! GC). Finally, se
methods are likely to belong to classes with disjunct
methods and classes with disjunct sets of methods are
to have methods that are handling more than one data/
flow path (GC $ LM).
C. Threats to Validity
TABLE II: Median of the metrics used to identify relations
Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A)
A = FE, B = LM
Log4J 0.94 0. 15 15 1 0
Jmol 1 0 27 0 0
JFreechart 0.92 0.1 22 0.14 0
A = FE, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = FE, B = GC
Log4J 0.44 0.16 7 0 0
Jmol 0.85 0.27 28 0.17 0
JFreechart 0.76 0.17 16 0 0
A = GC, B = LM
Log4J 0.75 0.34 33 0 0
Jmol 0.83 0.51 82 0.27 0.39
JFreechart 0.75 0.4 73 0 0.06
A = GC, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
A = LM, B = TC
Log4J 0 0 0 0 0
Jmol 0 0 0 0 0
JFreechart 0 0 0 0 0
is difference between exist-overlaps is lower (40%, 30%,
5%) for god classes co-existing with long methods, so it
cult to decide whether god classes support long methods
there is no reason for methods that should be implemente
the template or the strategy pattern to be longer, requir
services of classes other than its own, or be located in
-/->
Conclusions
Conclusions
• If TC then neither LM, FE or GC. If LM, FE or GC then there is not TC.
• GC indicates LM and FE.
• FE only occurs in LM
LM FE TC GC
LM <== <-/- <—>
FE <-/- <—
TC -/->
GC
a —> b Plain support
a <—> b Mutual support
a -/-> b Rejection
!a —> !b Common
refactoringa ==> b Inclusion
FE: Feature Envy
LM: Long Method
TC: Type Checking
GC: God Class
Conventions
Read the table
in this direction
Conclusions
• If TC then neither LM, FE or GC. If LM, FE or GC then there is not TC.
• GC indicates LM and FE.
• FE only occurs in LM
LM FE TC GC
LM <== <-/- <—>
FE <-/- <—
TC -/->
GC
GC
LM
FE
TC
Detection
a —> b Plain support
a <—> b Mutual support
a -/-> b Rejection
!a —> !b Common
refactoringa ==> b Inclusion
FE: Feature Envy
LM: Long Method
TC: Type Checking
GC: God Class
Conventions
Read the table
in this direction
Conclusions
• If TC then neither LM, FE or GC. If LM, FE or GC then there is not TC.
• GC indicates LM and FE.
• FE only occurs in LM
LM FE TC GC
LM <== <-/- <—>
FE <-/- <—
TC -/->
GC
GC
LM
FE
TC
Detection FE
LM
GC
TCRemoval
a —> b Plain support
a <—> b Mutual support
a -/-> b Rejection
!a —> !b Common
refactoringa ==> b Inclusion
FE: Feature Envy
LM: Long Method
TC: Type Checking
GC: God Class
Conventions
Read the table
in this direction

More Related Content

PPT
Learning Algorithms For Life Scientists
PDF
A Special Type Of Differential Polynomial And Its Comparative Growth Properties
PDF
Polynomial Operations
PPS
dont worry my child
PPTX
Colombia yelsi arias 7-3
PPT
Mock up cover
DOCX
RICK Updated Resume-ACCT Final
DOCX
Homework
Learning Algorithms For Life Scientists
A Special Type Of Differential Polynomial And Its Comparative Growth Properties
Polynomial Operations
dont worry my child
Colombia yelsi arias 7-3
Mock up cover
RICK Updated Resume-ACCT Final
Homework

Viewers also liked (7)

DOCX
Las tics en el proceso de cambio de la Educación
PDF
DOCX
Промежуточный отчет по НИМР
PPTX
Infograma tecnologia e informatica 9°1
DOCX
Schnakenberg_CV_06-09-16
DOC
Ejercicios de estequiometría primero
PDF
Comparison of modelling ann and elm to estimate solar radiation over turkey u...
Las tics en el proceso de cambio de la Educación
Промежуточный отчет по НИМР
Infograma tecnologia e informatica 9°1
Schnakenberg_CV_06-09-16
Ejercicios de estequiometría primero
Comparison of modelling ann and elm to estimate solar radiation over turkey u...
Ad

Similar to Analyzing Code Evolution to Uncover Relations between Bad Smells (19)

PPTX
FACTORING.pptx grade 8 mathematics ppptd
PPTX
FACTORING.pptxgrade 8 mathematics powerp
PDF
Mathematical formula tables
DOCX
Chapter 1 review topic in algebra 1
PPTX
Are there trends, changes in the mi.pptx
DOCX
PPT
Factoring GCF difference of squares.ppt
PPTX
PDF
University of manchester mathematical formula tables
DOC
Math34 Trigonometric Formulas
PPTX
Fourier series
PDF
A class of a stable order four and six linear multistep methods for stiff ini...
PPT
Introduction to Algorithm for computer engineering students
PPT
Introduction to Algorithm for computer engineering students
PPTX
1. Week 1_ Functions and Evaluate Functions.pptx
PPT
lagrange and newton divided differences.ppt
PPT
Pre Calculus Math.. Proving
FACTORING.pptx grade 8 mathematics ppptd
FACTORING.pptxgrade 8 mathematics powerp
Mathematical formula tables
Chapter 1 review topic in algebra 1
Are there trends, changes in the mi.pptx
Factoring GCF difference of squares.ppt
University of manchester mathematical formula tables
Math34 Trigonometric Formulas
Fourier series
A class of a stable order four and six linear multistep methods for stiff ini...
Introduction to Algorithm for computer engineering students
Introduction to Algorithm for computer engineering students
1. Week 1_ Functions and Evaluate Functions.pptx
lagrange and newton divided differences.ppt
Pre Calculus Math.. Proving
Ad

More from Angela Lozano (7)

PDF
An overview of techniques for detecting software variability concepts in sour...
PDF
UContracts a DSL to document and validate structural requirements of frameworks
PDF
Matraca industrial evaluation (Cha-Q tool demo event Dec 2016)
PDF
Clones & Macro-Co-Changes
PDF
Explaining why methods change together
PDF
Words Associated with Questions about Macros in Tex
PDF
Co occurring code critics
An overview of techniques for detecting software variability concepts in sour...
UContracts a DSL to document and validate structural requirements of frameworks
Matraca industrial evaluation (Cha-Q tool demo event Dec 2016)
Clones & Macro-Co-Changes
Explaining why methods change together
Words Associated with Questions about Macros in Tex
Co occurring code critics

Recently uploaded (20)

PDF
AI Guide for Business Growth - Arna Softech
PDF
Visual explanation of Dijkstra's Algorithm using Python
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
PDF
Topaz Photo AI Crack New Download (Latest 2025)
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PPTX
CNN LeNet5 Architecture: Neural Networks
PDF
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
PDF
Website Design Services for Small Businesses.pdf
PDF
iTop VPN Crack Latest Version Full Key 2025
PDF
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
DOCX
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
PDF
Salesforce Agentforce AI Implementation.pdf
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PDF
Types of Token_ From Utility to Security.pdf
PDF
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
PPTX
Trending Python Topics for Data Visualization in 2025
PPTX
Patient Appointment Booking in Odoo with online payment
PDF
Autodesk AutoCAD Crack Free Download 2025
AI Guide for Business Growth - Arna Softech
Visual explanation of Dijkstra's Algorithm using Python
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
Topaz Photo AI Crack New Download (Latest 2025)
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
CNN LeNet5 Architecture: Neural Networks
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
Website Design Services for Small Businesses.pdf
iTop VPN Crack Latest Version Full Key 2025
EaseUS PDF Editor Pro 6.2.0.2 Crack with License Key 2025
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Modern SharePoint Intranet Templates That Boost Employee Engagement in 2025.docx
Salesforce Agentforce AI Implementation.pdf
Oracle Fusion HCM Cloud Demo for Beginners
Types of Token_ From Utility to Security.pdf
AI/ML Infra Meetup | LLM Agents and Implementation Challenges
Trending Python Topics for Data Visualization in 2025
Patient Appointment Booking in Odoo with online payment
Autodesk AutoCAD Crack Free Download 2025

Analyzing Code Evolution to Uncover Relations between Bad Smells

  • 1. Analyzing Code Evolution to Uncover Relations between Bad Smells Angela Lozano, Kim Mens, Jawira Portugal @ang_loza #SANER15 PPAP 2015 More info: alozano@soft.vub.ac.be
  • 2. Agenda • Bad smells • Inter-smell relations • Experiment • Results • Conclusions
  • 4. Bad smells • Bad smell?: indicator that points to parts of the code that may need to be refactored • Bad smells analyzed: • Feature Envy (FE) • Long Method (LM) • Type Checking (TC) • God Class (GC)
  • 6. Why are relations between smells interesting? • Easier to detect • More complex to eliminate • May indicate “high-level” smells
  • 7. Inter-smell relations [Pietrzak & Walter, XP 06] Plain support a —> b a = Data Class b = Feature Envy Mutual support a <—> b ? Rejection a -/-> b a = Lazy Class b = Large Class Common refactoring !a —> !b ∨ !a —> b a = Feature Envy b = Lazy Class Inclusion a ==> b a = Parallel inheritance b = Shotgun surgery +Aggregate, +Transitive
  • 9. Data collectedri ri+1 Log4j 1.2.1 -1.2.17 16 releases Apr 04 - Feb 13 106 months JMol 1.0 - 11.0 34 releases May 01 - Mar 07 70 months JFreeChart 0.5.6 - 1.0.14 45 releases Dec 00- Nov 11 131 months rN
  • 10. Data collected ri ri+1 LM FE TC GC package1 Class1 method1() X package1 Class1 method2(int) X XX X package1 Class1 method3(float,int) X X package1 Class1 method4(String) X X package2 Class2 method5() X package2 Class3 method6(Object) X X
  • 11. Data collected ri ri+1 LM FE TC GC package1 Class1 method1() X package1 Class1 method2(int) X XX X package1 Class1 method3(float,int) X X package1 Class1 method4(String) X X package2 Class2 method5() X package2 Class3 method6(Object) X X exist (LM) = 3 (FE) = 2 (TC) = 1 (GC) = 1
  • 12. Data collected ri ri+1 LM FE TC GC package1 Class1 method1() X package1 Class1 method2(int) X XX X package1 Class1 method3(float,int) X X package1 Class1 method4(String) X X package2 Class2 method5() X package2 Class3 method6(Object) X X exist (LM) = 3 (FE) = 2 (TC) = 1 (GC) = 1 co-exist (TC,GC) = 1 (LM,GC) = 1 (FE,GC) = 1 (LM,FE) = 1 (TC,LM) = 0 (TC,FE) = 0
  • 13. Data collected ri ri+1 LM FE TC GC package1 Class1 method1() X package1 Class1 method2(int) X XX X package1 Class1 method3(float,int) X X package1 Class1 method4(String) X X package2 Class2 method5() X package2 Class3 method6(Object) X X LM FE TC GC package1 Class1 method1() package1 Class1 method2(int) X XXpackage1 Class4 method3(float,int) X package1 Class4 method4(String) X package2 Class2 method5() X package2 Class3 method6(Object) exist (LM) = 3 (FE) = 2 (TC) = 1 (GC) = 1 co-exist (TC,GC) = 1 (LM,GC) = 1 (FE,GC) = 1 (LM,FE) = 1 (TC,LM) = 0 (TC,FE) = 0
  • 14. Data collected ri ri+1 LM FE TC GC package1 Class1 method1() X package1 Class1 method2(int) X XX X package1 Class1 method3(float,int) X X package1 Class1 method4(String) X X package2 Class2 method5() X package2 Class3 method6(Object) X X LM FE TC GC package1 Class1 method1() package1 Class1 method2(int) X XXpackage1 Class4 method3(float,int) X package1 Class4 method4(String) X package2 Class2 method5() X package2 Class3 method6(Object) exist (LM) = 3 (FE) = 2 (TC) = 1 (GC) = 1 exist (LM) = 3+2=5 (FE) = 2+1=3 (TC) = 1+1=2 (GC) = 1+0=1 co-exist (TC,GC) = 1 (LM,GC) = 1 (FE,GC) = 1 (LM,FE) = 1 (TC,LM) = 0 (TC,FE) = 0
  • 15. Data collected ri ri+1 LM FE TC GC package1 Class1 method1() X package1 Class1 method2(int) X XX X package1 Class1 method3(float,int) X X package1 Class1 method4(String) X X package2 Class2 method5() X package2 Class3 method6(Object) X X LM FE TC GC package1 Class1 method1() package1 Class1 method2(int) X XXpackage1 Class4 method3(float,int) X package1 Class4 method4(String) X package2 Class2 method5() X package2 Class3 method6(Object) exist (LM) = 3 (FE) = 2 (TC) = 1 (GC) = 1 dissapear (LM) = 1 (FE) = 1 (GC) = 1 exist (LM) = 3+2=5 (FE) = 2+1=3 (TC) = 1+1=2 (GC) = 1+0=1 co-exist (TC,GC) = 1 (LM,GC) = 1 (FE,GC) = 1 (LM,FE) = 1 (TC,LM) = 0 (TC,FE) = 0
  • 16. Data collected ri ri+1 LM FE TC GC package1 Class1 method1() X package1 Class1 method2(int) X XX X package1 Class1 method3(float,int) X X package1 Class1 method4(String) X X package2 Class2 method5() X package2 Class3 method6(Object) X X LM FE TC GC package1 Class1 method1() package1 Class1 method2(int) X XXpackage1 Class4 method3(float,int) X package1 Class4 method4(String) X package2 Class2 method5() X package2 Class3 method6(Object) exist (LM) = 3 (FE) = 2 (TC) = 1 (GC) = 1 dissapear (LM) = 1 (FE) = 1 (GC) = 1 co-dissapear (LM,FE) = 1 exist (LM) = 3+2=5 (FE) = 2+1=3 (TC) = 1+1=2 (GC) = 1+0=1 co-exist (TC,GC) = 1 (LM,GC) = 1 (FE,GC) = 1 (LM,FE) = 1 (TC,LM) = 0 (TC,FE) = 0
  • 17. Data collected ri ri+1 LM FE TC GC package1 Class1 method1() X package1 Class1 method2(int) X XX X package1 Class1 method3(float,int) X X package1 Class1 method4(String) X X package2 Class2 method5() X package2 Class3 method6(Object) X X LM FE TC GC package1 Class1 method1() package1 Class1 method2(int) X XXpackage1 Class4 method3(float,int) X package1 Class4 method4(String) X package2 Class2 method5() X package2 Class3 method6(Object) exist (LM) = 3 (FE) = 2 (TC) = 1 (GC) = 1 dissapear (LM) = 1 (FE) = 1 (GC) = 1 co-dissapear (LM,FE) = 1 exist (LM) = 3+2=5 (FE) = 2+1=3 (TC) = 1+1=2 (GC) = 1+0=1 co-exist (TC,GC) = 1 (LM,GC) = 1 (FE,GC) = 1 (LM,FE) = 1 (TC,LM) = 0 (TC,FE) = 0
  • 18. Data collected ri ri+1 LM FE TC GC package1 Class1 method1() X package1 Class1 method2(int) X XX X package1 Class1 method3(float,int) X X package1 Class1 method4(String) X X package2 Class2 method5() X package2 Class3 method6(Object) X X LM FE TC GC package1 Class1 method1() package1 Class1 method2(int) X XXpackage1 Class4 method3(float,int) X package1 Class4 method4(String) X package2 Class2 method5() X package2 Class3 method6(Object) exist (LM) = 3 (FE) = 2 (TC) = 1 (GC) = 1 dissapear (LM) = 1 (FE) = 1 (GC) = 1 co-dissapear (LM,FE) = 1 exist (LM) = 3+2=5 (FE) = 2+1=3 (TC) = 1+1=2 (GC) = 1+0=1 co-exist (TC,GC) = 1 (LM,GC) = 1 (FE,GC) = 1 (LM,FE) = 1 (TC,LM) = 0 (TC,FE) = 0
  • 19. Data collected ri ri+1 LM FE TC GC package1 Class1 method1() X package1 Class1 method2(int) X XX X package1 Class1 method3(float,int) X X package1 Class1 method4(String) X X package2 Class2 method5() X package2 Class3 method6(Object) X X LM FE TC GC package1 Class1 method1() package1 Class1 method2(int) X XXpackage1 Class4 method3(float,int) X package1 Class4 method4(String) X package2 Class2 method5() X package2 Class3 method6(Object) exist (LM) = 3 (FE) = 2 (TC) = 1 (GC) = 1 dissapear (LM) = 1 (FE) = 1 (GC) = 1 co-dissapear (LM,FE) = 1 • disappear(BS): number of SCEs (Classes or Methods) where the bad smell was present in the previous analyzed version of the source code but is no longer present in the currently analyzed version • co-disappear(BS1, BS2): number of SCEs (Classes or Methods) where both both bad smells BS1 and BS2 disappeared from the analyzed entity with respect to the previous analyzed version of the source code 1) Indirect Metrics: Using on these basic metrics we derive additional metrics: exist overlap(BS1, BS2) = co exist(BS1, BS2) exist(BS1) disappear overlap(BS1, BS2) = co disappear(BS1, BS2) disappear(BS1) Note that these metrics are not symmetric e.g., exist- III. RESULTS Figure 1 shows the amount of bad sme trough all versions analyzed. The most commo all case studies were long method (LM) and The least frequent bad smell is type checking Fig. 1: Cumulative number of bad smells foun Table I shows that the number of instances exist (LM) = 3+2=5 (FE) = 2+1=3 (TC) = 1+1=2 (GC) = 1+0=1 co-exist (TC,GC) = 1 (LM,GC) = 1 (FE,GC) = 1 (LM,FE) = 1 (TC,LM) = 0 (TC,FE) = 0
  • 20. Data collected ri ri+1 LM FE TC GC package1 Class1 method1() X package1 Class1 method2(int) X XX X package1 Class1 method3(float,int) X X package1 Class1 method4(String) X X package2 Class2 method5() X package2 Class3 method6(Object) X X LM FE TC GC package1 Class1 method1() package1 Class1 method2(int) X XXpackage1 Class4 method3(float,int) X package1 Class4 method4(String) X package2 Class2 method5() X package2 Class3 method6(Object) exist (LM) = 3 (FE) = 2 (TC) = 1 (GC) = 1 dissapear (LM) = 1 (FE) = 1 (GC) = 1 co-dissapear (LM,FE) = 1 exist-overlap (TC,GC) = 1/2 (LM,GC) = 1/5 (FE,GC) = 1/2 (LM,FE) = 1/1 • disappear(BS): number of SCEs (Classes or Methods) where the bad smell was present in the previous analyzed version of the source code but is no longer present in the currently analyzed version • co-disappear(BS1, BS2): number of SCEs (Classes or Methods) where both both bad smells BS1 and BS2 disappeared from the analyzed entity with respect to the previous analyzed version of the source code 1) Indirect Metrics: Using on these basic metrics we derive additional metrics: exist overlap(BS1, BS2) = co exist(BS1, BS2) exist(BS1) disappear overlap(BS1, BS2) = co disappear(BS1, BS2) disappear(BS1) Note that these metrics are not symmetric e.g., exist- III. RESULTS Figure 1 shows the amount of bad sme trough all versions analyzed. The most commo all case studies were long method (LM) and The least frequent bad smell is type checking Fig. 1: Cumulative number of bad smells foun Table I shows that the number of instances exist (LM) = 3+2=5 (FE) = 2+1=3 (TC) = 1+1=2 (GC) = 1+0=1 ! (GC,TC) = 1/1 (GC,LM) = 1/1 (GC,FE) = 1/1 (FE,LM) = 1/3 co-exist (TC,GC) = 1 (LM,GC) = 1 (FE,GC) = 1 (LM,FE) = 1 (TC,LM) = 0 (TC,FE) = 0
  • 21. Data collected ri ri+1 LM FE TC GC package1 Class1 method1() X package1 Class1 method2(int) X XX X package1 Class1 method3(float,int) X X package1 Class1 method4(String) X X package2 Class2 method5() X package2 Class3 method6(Object) X X LM FE TC GC package1 Class1 method1() package1 Class1 method2(int) X XXpackage1 Class4 method3(float,int) X package1 Class4 method4(String) X package2 Class2 method5() X package2 Class3 method6(Object) exist (LM) = 3 (FE) = 2 (TC) = 1 (GC) = 1 dissapear (LM) = 1 (FE) = 1 (GC) = 1 co-dissapear (LM,FE) = 1 exist-overlap (TC,GC) = 1/2 (LM,GC) = 1/5 (FE,GC) = 1/2 (LM,FE) = 1/1 • disappear(BS): number of SCEs (Classes or Methods) where the bad smell was present in the previous analyzed version of the source code but is no longer present in the currently analyzed version • co-disappear(BS1, BS2): number of SCEs (Classes or Methods) where both both bad smells BS1 and BS2 disappeared from the analyzed entity with respect to the previous analyzed version of the source code 1) Indirect Metrics: Using on these basic metrics we derive additional metrics: exist overlap(BS1, BS2) = co exist(BS1, BS2) exist(BS1) disappear overlap(BS1, BS2) = co disappear(BS1, BS2) disappear(BS1) Note that these metrics are not symmetric e.g., exist- III. RESULTS Figure 1 shows the amount of bad sme trough all versions analyzed. The most commo all case studies were long method (LM) and The least frequent bad smell is type checking Fig. 1: Cumulative number of bad smells foun Table I shows that the number of instances dissapear-overlap (LM,FE) = 1/1 exist (LM) = 3+2=5 (FE) = 2+1=3 (TC) = 1+1=2 (GC) = 1+0=1 ! (GC,TC) = 1/1 (GC,LM) = 1/1 (GC,FE) = 1/1 (FE,LM) = 1/3 ! (FE,LM) = 1/1 co-exist (TC,GC) = 1 (LM,GC) = 1 (FE,GC) = 1 (LM,FE) = 1 (TC,LM) = 0 (TC,FE) = 0
  • 22. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Detecting inter-smell relations exist (LM) = 3 (FE) = 2 (TC) = 1 (GC) = 1 dissapear (LM) = 1 (FE) = 1 (GC) = 1 co-dissapear (LM,FE) = 1 exist (LM) = 3+2=5 (FE) = 2+1=3 (TC) = 1+1=2 (GC) = 1+0=1
  • 23. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Detecting inter-smell relations exist (LM) = 3 (FE) = 2 (TC) = 1 (GC) = 1 dissapear (LM) = 1 (FE) = 1 (GC) = 1 co-dissapear (LM,FE) = 1 exist (LM) = 3+2=5 (FE) = 2+1=3 (TC) = 1+1=2 (GC) = 1+0=1 exist-overlap (TC,GC) = 1/2 (LM,GC) = 1/5 (FE,GC) = 1/2 (LM,FE) = 1/1 ! (GC,TC) = 1/1 (GC,LM) = 1/1 (GC,FE) = 1/1 (FE,LM) = 1/3 GC —> LM
  • 24. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Detecting inter-smell relations exist (LM) = 3 (FE) = 2 (TC) = 1 (GC) = 1 dissapear (LM) = 1 (FE) = 1 (GC) = 1 co-dissapear (LM,FE) = 1 exist (LM) = 3+2=5 (FE) = 2+1=3 (TC) = 1+1=2 (GC) = 1+0=1 exist-overlap (TC,GC) = 1/2 (LM,GC) = 1/5 (FE,GC) = 1/2 (LM,FE) = 1/1 ! (GC,TC) = 1/1 (GC,LM) = 1/1 (GC,FE) = 1/1 (FE,LM) = 1/3
  • 25. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Detecting inter-smell relations exist (LM) = 3 (FE) = 2 (TC) = 1 (GC) = 1 dissapear (LM) = 1 (FE) = 1 (GC) = 1 co-dissapear (LM,FE) = 1 exist (LM) = 3+2=5 (FE) = 2+1=3 (TC) = 1+1=2 (GC) = 1+0=1 exist-overlap (TC,GC) = 1/2 (LM,GC) = 1/5 (FE,GC) = 1/2 (LM,FE) = 1/1 ! (GC,TC) = 1/1 (GC,LM) = 1/1 (GC,FE) = 1/1 (FE,LM) = 1/3 co-exist (TC,GC) = 1 (LM,GC) = 1 (FE,GC) = 1 (LM,FE) = 1 (TC,LM) = 0 (TC,FE) = 0 TC -/-> LM TC -/-> FE
  • 26. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Detecting inter-smell relations exist (LM) = 3 (FE) = 2 (TC) = 1 (GC) = 1 dissapear (LM) = 1 (FE) = 1 (GC) = 1 co-dissapear (LM,FE) = 1 exist (LM) = 3+2=5 (FE) = 2+1=3 (TC) = 1+1=2 (GC) = 1+0=1 exist-overlap (TC,GC) = 1/2 (LM,GC) = 1/5 (FE,GC) = 1/2 (LM,FE) = 1/1 ! (GC,TC) = 1/1 (GC,LM) = 1/1 (GC,FE) = 1/1 (FE,LM) = 1/3 dissapear-overlap (LM,FE) = 1/1 ! (FE,LM) = 1/1
  • 27. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Detecting inter-smell relations exist (LM) = 3 (FE) = 2 (TC) = 1 (GC) = 1 dissapear (LM) = 1 (FE) = 1 (GC) = 1 co-dissapear (LM,FE) = 1 exist (LM) = 3+2=5 (FE) = 2+1=3 (TC) = 1+1=2 (GC) = 1+0=1 exist-overlap (TC,GC) = 1/2 (LM,GC) = 1/5 (FE,GC) = 1/2 (LM,FE) = 1/1 ! (GC,TC) = 1/1 (GC,LM) = 1/1 (GC,FE) = 1/1 (FE,LM) = 1/3 GC ==> FE GC ==> TC LM ==> FE
  • 28. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Detecting inter-smell relations exist (LM) = 3 (FE) = 2 (TC) = 1 (GC) = 1 dissapear (LM) = 1 (FE) = 1 (GC) = 1 co-dissapear (LM,FE) = 1 exist (LM) = 3+2=5 (FE) = 2+1=3 (TC) = 1+1=2 (GC) = 1+0=1 exist-overlap (TC,GC) = 1/2 (LM,GC) = 1/5 (FE,GC) = 1/2 (LM,FE) = 1/1 ! (GC,TC) = 1/1 (GC,LM) = 1/1 (GC,FE) = 1/1 (FE,LM) = 1/3 GC ==> FE GC ==> TC LM ==> FE
  • 30. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Results: FE ??? LM TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in
  • 31. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Results: FE ??? LM TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in =>
  • 32. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Results: FE ??? TC TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods ! LM) or if there is mutual support (GC $ LM). We ded that the relation between these two bad smells is there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in that handle multiple abstractions/responsibilities (TC 6! TC 6! LM, and TC 6! GC). Whenever a met TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in
  • 33. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Results: FE ??? TC TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods ! LM) or if there is mutual support (GC $ LM). We ded that the relation between these two bad smells is there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in that handle multiple abstractions/responsibilities (TC 6! TC 6! LM, and TC 6! GC). Whenever a met TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in -/->
  • 34. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Results: FE ??? GCTABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods ! LM) or if there is mutual support (GC $ LM). We ded that the relation between these two bad smells is l support because there is not enough evidence to con- a common refactoring (even though some refactorings there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in that handle multiple abstractions/responsibilities (TC 6! TC 6! LM, and TC 6! GC). Whenever a met located in the wrong class it is likely to be dealin separable data/control flow paths (FE ) LM). Metho TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in
  • 35. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Results: FE ??? GCTABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods ! LM) or if there is mutual support (GC $ LM). We ded that the relation between these two bad smells is l support because there is not enough evidence to con- a common refactoring (even though some refactorings there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in that handle multiple abstractions/responsibilities (TC 6! TC 6! LM, and TC 6! GC). Whenever a met located in the wrong class it is likely to be dealin separable data/control flow paths (FE ) LM). Metho TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in —>
  • 36. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Results: GC ??? LM TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods ! LM) or if there is mutual support (GC $ LM). We ded that the relation between these two bad smells is l support because there is not enough evidence to con- a common refactoring (even though some refactorings ate both of them). scussion there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in that handle multiple abstractions/responsibilities (TC 6! TC 6! LM, and TC 6! GC). Whenever a met located in the wrong class it is likely to be dealin separable data/control flow paths (FE ) LM). Metho are wrongly located are likely to be a part of a disju of methods within their class (FE ! GC). Finally, se methods are likely to belong to classes with disjunct TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in
  • 37. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Results: GC ??? LM TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods ! LM) or if there is mutual support (GC $ LM). We ded that the relation between these two bad smells is l support because there is not enough evidence to con- a common refactoring (even though some refactorings ate both of them). scussion there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in that handle multiple abstractions/responsibilities (TC 6! TC 6! LM, and TC 6! GC). Whenever a met located in the wrong class it is likely to be dealin separable data/control flow paths (FE ) LM). Metho are wrongly located are likely to be a part of a disju of methods within their class (FE ! GC). Finally, se methods are likely to belong to classes with disjunct TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in <—>
  • 38. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Results: GC ??? TC TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods ! LM) or if there is mutual support (GC $ LM). We ded that the relation between these two bad smells is l support because there is not enough evidence to con- a common refactoring (even though some refactorings ate both of them). scussion is study ignores the analysis of bad smells that cannot there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in that handle multiple abstractions/responsibilities (TC 6! TC 6! LM, and TC 6! GC). Whenever a met located in the wrong class it is likely to be dealin separable data/control flow paths (FE ) LM). Metho are wrongly located are likely to be a part of a disju of methods within their class (FE ! GC). Finally, se methods are likely to belong to classes with disjunct methods and classes with disjunct sets of methods are to have methods that are handling more than one data/ TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in
  • 39. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Results: GC ??? TC TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods ! LM) or if there is mutual support (GC $ LM). We ded that the relation between these two bad smells is l support because there is not enough evidence to con- a common refactoring (even though some refactorings ate both of them). scussion is study ignores the analysis of bad smells that cannot there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in that handle multiple abstractions/responsibilities (TC 6! TC 6! LM, and TC 6! GC). Whenever a met located in the wrong class it is likely to be dealin separable data/control flow paths (FE ) LM). Metho are wrongly located are likely to be a part of a disju of methods within their class (FE ! GC). Finally, se methods are likely to belong to classes with disjunct methods and classes with disjunct sets of methods are to have methods that are handling more than one data/ TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in -/->
  • 40. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Results: LM ??? TC TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods ! LM) or if there is mutual support (GC $ LM). We ded that the relation between these two bad smells is l support because there is not enough evidence to con- a common refactoring (even though some refactorings ate both of them). scussion is study ignores the analysis of bad smells that cannot nd by JDeodorant (and their corresponding relations). s, bad smells for which it could not find an automatic oring, or whose refactoring does not ’improve’ the source there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in that handle multiple abstractions/responsibilities (TC 6! TC 6! LM, and TC 6! GC). Whenever a met located in the wrong class it is likely to be dealin separable data/control flow paths (FE ) LM). Metho are wrongly located are likely to be a part of a disju of methods within their class (FE ! GC). Finally, se methods are likely to belong to classes with disjunct methods and classes with disjunct sets of methods are to have methods that are handling more than one data/ flow path (GC $ LM). C. Threats to Validity TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in
  • 41. Plain support a —> b exist-overlap(a, b) >> exist-overlap(b, a) Mutual support a <—> b exist-overlap(a, b) ≈ exist-overlap(b, a) Rejection a -/-> b co-exist(a, b) ≈ 0 Common refactoring !a —> !b disappear-overlap(a, b) >> dissappear-overlap(b, a) Inclusion a ==> b exist-overlap(a, b) ≈ 1 Results: LM ??? TC TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods ! LM) or if there is mutual support (GC $ LM). We ded that the relation between these two bad smells is l support because there is not enough evidence to con- a common refactoring (even though some refactorings ate both of them). scussion is study ignores the analysis of bad smells that cannot nd by JDeodorant (and their corresponding relations). s, bad smells for which it could not find an automatic oring, or whose refactoring does not ’improve’ the source there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in that handle multiple abstractions/responsibilities (TC 6! TC 6! LM, and TC 6! GC). Whenever a met located in the wrong class it is likely to be dealin separable data/control flow paths (FE ) LM). Metho are wrongly located are likely to be a part of a disju of methods within their class (FE ! GC). Finally, se methods are likely to belong to classes with disjunct methods and classes with disjunct sets of methods are to have methods that are handling more than one data/ flow path (GC $ LM). C. Threats to Validity TABLE II: Median of the metrics used to identify relations Bad Smells App exist-overlap(A, B) exist-overlap(B, A) co-exist(A, B) disappear-overlap(A, B) disappear-overlap(B, A) A = FE, B = LM Log4J 0.94 0. 15 15 1 0 Jmol 1 0 27 0 0 JFreechart 0.92 0.1 22 0.14 0 A = FE, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = FE, B = GC Log4J 0.44 0.16 7 0 0 Jmol 0.85 0.27 28 0.17 0 JFreechart 0.76 0.17 16 0 0 A = GC, B = LM Log4J 0.75 0.34 33 0 0 Jmol 0.83 0.51 82 0.27 0.39 JFreechart 0.75 0.4 73 0 0.06 A = GC, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 A = LM, B = TC Log4J 0 0 0 0 0 Jmol 0 0 0 0 0 JFreechart 0 0 0 0 0 is difference between exist-overlaps is lower (40%, 30%, 5%) for god classes co-existing with long methods, so it cult to decide whether god classes support long methods there is no reason for methods that should be implemente the template or the strategy pattern to be longer, requir services of classes other than its own, or be located in -/->
  • 43. Conclusions • If TC then neither LM, FE or GC. If LM, FE or GC then there is not TC. • GC indicates LM and FE. • FE only occurs in LM LM FE TC GC LM <== <-/- <—> FE <-/- <— TC -/-> GC a —> b Plain support a <—> b Mutual support a -/-> b Rejection !a —> !b Common refactoringa ==> b Inclusion FE: Feature Envy LM: Long Method TC: Type Checking GC: God Class Conventions Read the table in this direction
  • 44. Conclusions • If TC then neither LM, FE or GC. If LM, FE or GC then there is not TC. • GC indicates LM and FE. • FE only occurs in LM LM FE TC GC LM <== <-/- <—> FE <-/- <— TC -/-> GC GC LM FE TC Detection a —> b Plain support a <—> b Mutual support a -/-> b Rejection !a —> !b Common refactoringa ==> b Inclusion FE: Feature Envy LM: Long Method TC: Type Checking GC: God Class Conventions Read the table in this direction
  • 45. Conclusions • If TC then neither LM, FE or GC. If LM, FE or GC then there is not TC. • GC indicates LM and FE. • FE only occurs in LM LM FE TC GC LM <== <-/- <—> FE <-/- <— TC -/-> GC GC LM FE TC Detection FE LM GC TCRemoval a —> b Plain support a <—> b Mutual support a -/-> b Rejection !a —> !b Common refactoringa ==> b Inclusion FE: Feature Envy LM: Long Method TC: Type Checking GC: God Class Conventions Read the table in this direction