File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/zip/ExtraFieldUtilsTest.java | File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/zip/ExtraFieldUtilsTest.java | |||
Method name: void testMerge()
|
Method name: void testMerge()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | byte[] central =↵ | 1 | byte[] local =↵ | |
2 | ExtraFieldUtils.mergeCentralDirectoryData(new ZipExtraField[] {a, dummy});↵ | 2 | ExtraFieldUtils.mergeLocalFileDataData(new ZipExtraField[] {a, dummy});↵ | |
3 | assertEquals("central length", data2.length, central.length);↵ | 3 | assertEquals("local length", data.length, local.length);↵ | |
4 | for (int i=0; i<central.length; i++) {↵ | 4 | for (int i=0; i<local.length; i++) {↵ | |
5 | assertEquals("central byte "+i, data2[i], central[i]);↵ | 5 | assertEquals("local byte "+i, data[i], local[i]);↵ | |
6 | } | 6 |
| |
See real code fragment | See real code fragment |
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 | 8 |
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) | 6.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10 | byte[] central = ExtraFieldUtils.mergeCentralDirectoryData(new ZipExtraField[] {a, dummy}); |
| 1 | byte[] local = ExtraFieldUtils.mergeLocalFileDataData(new ZipExtraField[] {a, dummy}); | ||||||||||||||||
11 | assertEquals("central length", data2.length, central.length); |
| 2 | assertEquals("local length", data.length, local.length); | ||||||||||||||||
12 | for (int i = 0; i < central.length; i++) |
| 3 | for (int i = 0; i < local.length; i++) | ||||||||||||||||
13 | assertEquals("central byte " + i, data2[i], central[i]); |
| 4 | assertEquals("local byte " + i, data[i], local[i]); |
Row | Violation |
---|