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: 5 | Number of AST nodes: 5 | |||
1 | assertEquals("mode plain file", FILE_FLAG | 0123, a.getMode());↵ | 1 | assertEquals("mode dir", DIR_FLAG | 0123, a.getMode());↵ | |
2 | assertEquals("uid plain file", 5, a.getUserId());↵ | 2 | assertEquals("uid dir", 5, a.getUserId());↵ | |
3 | assertEquals("gid plain file", 6, a.getGroupId());↵ | 3 | assertEquals("gid dir", 6, a.getGroupId());↵ | |
4 | data = new byte[] {0x75, (byte)0x8E, 0x41, (byte)0xFD, // CRC↵ | 4 | data = new byte[] {0, 0, 0, 0, // bad CRC↵ | |
5 | 0123, (byte)0xA0, // mode↵ | 5 | 0123, (byte)0x40, // mode↵ | |
6 | 4, 0, 0, 0, // link length↵ | 6 | 0, 0, 0, 0, // link↵ | |
7 | 5, 0, 6, 0, // uid, gid↵ | 7 | 5, 0, 6, 0}; // uid, gid↵ | |
8 | (byte)'t', (byte)'e', (byte)'s', (byte)'t'};↵ | |||
9 | a = new AsiExtraField(); | 8 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 25 |
Number of mapped statements | 5 |
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.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | assertEquals("mode plain file", FILE_FLAG | 0123, a.getMode()); |
| 26 | assertEquals("mode dir", DIR_FLAG | 0123, a.getMode()); | |||||||||||||
8 | assertEquals("uid plain file", 5, a.getUserId()); |
| 27 | assertEquals("uid dir", 5, a.getUserId()); | |||||||||||||
9 | assertEquals("gid plain file", 6, a.getGroupId()); |
| 28 | assertEquals("gid dir", 6, a.getGroupId()); | |||||||||||||
10 | data = new byte[] {0x75, (byte)0x8E, 0x41, (byte)0xFD, 0123, (byte)0xA0, 4, 0, 0, 0, 5, 0, 6, 0, (byte)'t', (byte)'e', (byte)'s', (byte)'t'}; |
| 29 | data = new byte[] {0, 0, 0, 0, 0123, (byte)0x40, 0, 0, 0, 0, 5, 0, 6, 0}; | |||||||||||||
11 | a = new AsiExtraField(); | 30 | a = new AsiExtraField(); |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables data, a , while Clone fragment #2 returns variables data, a |