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);
Path cp = new Path(project);
Path bp = getBootClassPath();
if (bp.size() > 0) {
cp.append(bp);
}
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/Kjc.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
|
Method name: Commandline setupKjcCommand()
|
|
Method name: Commandline setupJavacCommandlineSwitches(Commandline, boolean)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | Path cp = new Path(project);↵ | | 1 | Path cp = new Path(project);↵
|
|
2 | // kjc don't have bootclasspath option.↵ | | 2 | ↵
|
3 | Path p = getBootClassPath();↵ | | 3 | Path bp = getBootClassPath();↵
|
4 | if (p.size() > 0) {↵ | | 4 | if (bp.size() > 0) {↵
|
5 | cp.append(p);↵ | | 5 | cp.append(bp);↵
|
6 | }↵ | | 6 | }↵
|
|
7 | if (extdirs != null) {↵ | | 7 | if (extdirs != null) {↵
|
8 | cp.addExtdirs(extdirs);↵ | | 8 | cp.addExtdirs(extdirs);↵
|
9 | }↵ | | 9 | ↵
|
|
| | | 10 | }↵
|
10 | 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) | 18.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) | 15.3 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
9 | Path cp = new Path(project); | | 24 | Path cp = new Path(project); |
10 | Path p = getBootClassPath(); | | 25 | Path bp = getBootClassPath(); |
11 | if (p.size() > 0) | | 26 | if (bp.size() > 0) |
12 | | | 27 | |
13 | if (extdirs != null) | | 28 | if (extdirs != null) |
14 | | | 29 | |
15 | cp.append(classpath); | | 30 | cp.append(classpath); |
Precondition Violations (0)
Row |
Violation |