assertEquals(expected.length, s.length);
for (int j = 1; j < expected.length; j++) {
assertEquals(expected[j], s[j]);
}
assertEquals(expected.length, s.length);
for (int j = 1; j < expected.length; j++) {
assertEquals(expected[j], s[j]);
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/CommandlineJavaTest.java
|
|
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/CommandlineJavaTest.java
|
Method name: void testAssertions()
|
|
Method name: void testAssertions()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | assertEquals(expected.length, s.length);↵ | | 1 | assertEquals(expected.length, s.length);↵
|
2 | for (int j = 1; j < expected.length; j++) {↵ | | 2 | for (int j = 1; j < expected.length; j++) {↵
|
3 | assertEquals(expected[j], s[j]);↵ | | 3 | assertEquals(expected[j], s[j]);↵
|
4 | } | | 4 | }
|
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 the same method |
Number of node comparisons | 6 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 1.8 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
16 | assertEquals(expected.length, s.length); | | 21 | assertEquals(expected.length, s.length); |
17 | for (int j = 1; j < expected.length; j++) | | 22 | for (int j = 1; j < expected.length; j++) |
18 | assertEquals(expected[j], s[j]); | | 23 | assertEquals(expected[j], s[j]); |
Precondition Violations (0)
Row |
Violation |