for (int i = 0; i < result.length; ++i) {
if (i != 0) {
b.append("|");
}
b.append(result[i]);
}
for (int i = 0; i < RMIC_CLASSNAMES.length; i++) {
if (i != 0) {
buf.append(", ");
}
buf.append(RMIC_CLASSNAMES[i]);
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/mappers/MapperResult.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/rmic/KaffeRmic.java
|
Method name: void execute()
|
|
Method name: boolean execute()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | for (int i = 0; i < result.length; ++i) {↵ | | 1 | for (int i = 0; i < RMIC_CLASSNAMES.length; i++) {↵
|
2 | if (i != 0) {↵ | | 2 | if (i != 0) {↵
|
3 | b.append("|");↵ | | 3 | buf.append(", ");↵
|
4 | }↵ | | 4 | }↵
|
|
5 | b.append(result[i]);↵ | | 5 | buf.append(RMIC_CLASSNAMES[i]);↵
|
6 | } | | 6 | }
|
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 5 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 2 |
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) | 0.4 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
13 | if (i != 0) | | 7 | if (i != 0) |
14 | | | 8 | |
Precondition Violations (0)
Row |
Violation |