Path cp = new Path(project);
Path bp = getBootClassPath();
if (bp.size() > 0) {
cp.append(bp);
}
if (extdirs != null) {
cp.addExtdirs(extdirs);
}
cp.append(classpath);
Path cp = new Path(project);
// kjc don't have bootclasspath option.
Path p = getBootClassPath();
if (p.size() > 0) {
cp.append(p);
}
if (extdirs != null) {
cp.addExtdirs(extdirs);
}
cp.append(classpath);
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/compilers/Kjc.java
|
Method name: Commandline setupJavacCommandlineSwitches(Commandline, boolean)
|
|
Method name: Commandline setupKjcCommand()
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | Path cp = new Path(project);↵ | | 1 | Path cp = new Path(project);↵
|
|
2 | ↵ | | 2 | // kjc don't have bootclasspath option.↵
|
3 | Path bp = getBootClassPath();↵ | | 3 | Path p = getBootClassPath();↵
|
4 | if (bp.size() > 0) {↵ | | 4 | if (p.size() > 0) {↵
|
5 | cp.append(bp);↵ | | 5 | cp.append(p);↵
|
6 | }↵ | | 6 | }↵
|
|
7 | if (extdirs != null) {↵ | | 7 | if (extdirs != null) {↵
|
8 | cp.addExtdirs(extdirs);↵ | | 8 | cp.addExtdirs(extdirs);↵
|
9 | }↵ | | 9 | ↵
|
10 | ↵ | | 10 | }↵
|
|
11 | cp.append(classpath); | | 11 | cp.append(classpath);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 16.6 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 15 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 13.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
24 | Path cp = new Path(project); | | 9 | Path cp = new Path(project); |
25 | Path bp = getBootClassPath(); | | 10 | Path p = getBootClassPath(); |
26 | if (bp.size() > 0) | | 11 | if (p.size() > 0) |
27 | | | 12 | |
28 | if (extdirs != null) | | 13 | if (extdirs != null) |
29 | | | 14 | |
30 | cp.append(classpath); | | 15 | cp.append(classpath); |
Precondition Violations (0)
Row |
Violation |