cmd.createArgument().setPath(classpath);
if (encoding != null) {
cmd.createArgument().setValue("-encoding");
cmd.createArgument().setValue(encoding);
}
cmd.createArgument().setPath(cp);
// kjc-1.5A doesn't support -encoding option now.
// but it will be supported near the feature.
if (encoding != null) {
cmd.createArgument().setValue("-encoding");
cmd.createArgument().setValue(encoding);
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/compilers/Jikes.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/compilers/Kjc.java
|
Method name: boolean execute()
|
|
Method name: Commandline setupKjcCommand()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | cmd.createArgument().setPath(classpath);↵ | | 1 | cmd.createArgument().setPath(c↵
|
| | | 2 | p);↵
|
|
| | | 3 | // kjc-1.5A doesn't support -encoding option now.↵
|
| | | 4 | // but it will be supported near the feature.↵
|
2 | if (encoding != null) {↵ | | 5 | if (encoding != null) {↵
|
3 | cmd.createArgument().setValue("-encoding");↵ | | 6 | cmd.createArgument().setValue("-encoding");↵
|
4 | cmd.createArgument().setValue(encoding);↵ | | 7 | cmd.createArgument().setValue(encoding);↵
|
5 | } | | 8 | }
|
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) | 0.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 2.2 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
28 | cmd.createArgument().setPath(classpath); | | 19 | cmd.createArgument().setPath(cp); |
29 | if (encoding != null) | | 20 | if (encoding != null) |
30 | cmd.createArgument().setValue("-encoding"); | | 21 | cmd.createArgument().setValue("-encoding"); |
31 | cmd.createArgument().setValue(encoding); | | 22 | cmd.createArgument().setValue(encoding); |
Precondition Violations (0)
Row |
Violation |