for (int i = 0; i < result.length; ++i) {
if (i != 0) {
b.append("|");
}
b.append(result[i]);
}
for (int i = 0; i < components.length; i++) {
if (i != 0) {
sb.append('.');
}
sb.append(components[ 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/util/DeweyDecimal.java
|
Method name: void execute()
|
|
Method name: String toString()
|
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 < components.length; i++) {↵
|
2 | if (i != 0) {↵ | | 2 | if (i != 0) {↵
|
3 | b.append("|");↵ | | 3 | sb.append(↵
|
4 | ↵ | | 4 | '.');↵
|
5 | }↵ | | 5 | }↵
|
6 | b.append(result[i]);↵ | | 6 | sb.append(↵
|
7 | ↵ | | 7 | components[ i ]);↵
|
8 | } | | 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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 5 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.3 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
13 | if (i != 0) | | 3 | if (i != 0) |
| | | 4 | |
14 | | | | |
Precondition Violations (0)
Row |
Violation |