21. Clone set Reasons
Cforig-only
Too small after decomp.
Too diff. after decomp.
Smaller after decomp. higher dissimilarity
Unknown
Cfdecomp-only
Having deleted/added stmt., type cast, package
name.
Different if-else statements
Different loop statements
Inner class methods
Unknown
Characteristics of Disjoint Clones
22. Clone set Reasons
Cforig-only Too small after decomp.
Too diff. after decomp.
Smaller after decomp. higher
dissimilarity
Unknown
Cfdecomp-only
Having deleted/added stmt., type
cast, package name.
Different if-else statements
Different loop statements
Inner class methods
Unknown
JFreeChart
0 10 20 30 40 50
5
11
32
6
9
T1 T2 T3
0 2 4 6 8 10 12 14 16
12
4
3
8
12
53
23. Clone set Reasons
Cforig-only Too small after decomp.
Too diff. after decomp.
Smaller after decomp. higher
dissimilarity
Unknown
Cfdecomp-only
Having deleted/added stmt., type
cast, package name.
Different if-else statements
Different loop statements
Inner class methods
Unknown
Tomcat
0 28 56 84 112 140
16
5
120
19
6
T1 T2 T3
0 5 10 15 20 25 30
20
2
1
3
2
24. @Override
public Range findRangeBounds(XYDataset dataset) {
if (dataset != null) {
Range r = DatasetUtilities.findRangeBounds(dataset, false);
if (r == null) {
return null;
} else {
return new Range(r.getLowerBound() + this.yOffset,
r.getUpperBound() + this.blockHeight + this.yOffset);
}
} else {
return null;
}
}
@Override
public Range findDomainBounds(XYDataset dataset) {
if (dataset == null) {
return null;
}
Range r = DatasetUtilities.findDomainBounds(dataset, false);
if (r == null) {
return null;
}
return new Range(r.getLowerBound() + this.xOffset,
r.getUpperBound() + this.blockWidth + this.xOffset);
}
O
R
I
G
I
N
A
L
25. @Override
public Range findRangeBounds(XYDataset dataset) {
if (dataset != null) {
Range r = DatasetUtilities.findRangeBounds(dataset, false);
if (r == null) {
return null;
} else {
return new Range(r.getLowerBound() + this.yOffset,
r.getUpperBound() + this.blockHeight + this.yOffset);
}
} else {
return null;
}
}
@Override
public Range findDomainBounds(XYDataset dataset) {
if (dataset == null) {
return null;
}
Range r = DatasetUtilities.findDomainBounds(dataset, false);
if (r == null) {
return null;
}
return new Range(r.getLowerBound() + this.xOffset,
r.getUpperBound() + this.blockWidth + this.xOffset);
}
O
R
I
G
I
N
A
L
26. @Override
public Range findDomainBounds(final XYDataset dataset) {
if (dataset == null) {
return null;
}
final Range r = DatasetUtilities.findDomainBounds(dataset, false);
if (r == null) {
return null;
}
return new Range(r.getLowerBound() + this.xOffset,
r.getUpperBound() + this.blockWidth + this.xOffset);
}
@Override
public Range findRangeBounds(final XYDataset dataset) {
if (dataset == null) {
return null;
}
final Range r = DatasetUtilities.findRangeBounds(dataset, false);
if (r == null) {
return null;
}
return new Range(r.getLowerBound() + this.yOffset,
r.getUpperBound() + this.blockHeight + this.yOffset);
}
D
E
C
O
M
P
I
L
E
D
30. 26
Study on 3 real-world systems: JUnit, JFreeChart, Tomcat
Using Compilation/Decompilation
to Enhance Clone Detection
1 Clone pairs before and after decompilation are mostly
similar for all three clone types.
Findings:
2 One can complement the original clone results by
incorporating clones after decompilation.
Characteristics of disjoint clones3
C. Ragkhitwetsagul, J. Krinke
cragkhit.github.io/crjk-iwsc17