a.parseFromLocalFileData(data, 0, data.length);
assertEquals("length plain file", data.length,
a.getLocalFileDataLength().getValue());
assertTrue("plain file, no link", !a.isLink());
a = new AsiExtraField();
a.parseFromLocalFileData(data, 0, data.length);
assertEquals("length dir", data.length,
a.getLocalFileDataLength().getValue());
assertTrue("dir, no link", !a.isLink());
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/zip/AsiExtraFieldTest.java
|
|
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/zip/AsiExtraFieldTest.java
|
Method name: void testReparse()
|
|
Method name: void testReparse()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 4
|
|
| | | 1 | a = new AsiExtraField();↵
|
1 | a.parseFromLocalFileData(data, 0, data.length);↵ | | 2 | a.parseFromLocalFileData(data, 0, data.length);↵
|
2 | assertEquals("length plain file", data.length,↵ | | 3 | assertEquals("length dir", data.length,↵
|
3 | a.getLocalFileDataLength().getValue());↵ | | 4 | a.getLocalFileDataLength().getValue());↵
|
4 | assertTrue("plain file, no link", !a.isLink()); | | 5 | assertTrue("dir, no link", !a.isLink());
|
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.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 12 |
-
{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 | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 21 | a = new AsiExtraField(); |
3 | a.parseFromLocalFileData(data, 0, data.length); | | 22 | a.parseFromLocalFileData(data, 0, data.length); |
4 | assertEquals("length plain file", data.length, a.getLocalFileDataLength().getValue()); | | 23 | assertEquals("length dir", data.length, a.getLocalFileDataLength().getValue()); |
5 | assertTrue("plain file, no link", !a.isLink()); | | 24 | assertTrue("dir, no link", !a.isLink()); |
Precondition Violations (0)
Row |
Violation |