data = new byte[] {0x75, (byte)0x8E, 0x41, (byte)0xFD, // CRC 0123, (byte)0xA0, // mode 4, 0, 0, 0, // link length 5, 0, 6, 0, // uid, gid (byte)'t', (byte)'e', (byte)'s', (byte)'t'}; a = new AsiExtraField(); a.parseFromLocalFileData(data, 0, data.length); assertEquals("length link", data.length, a.getLocalFileDataLength().getValue());
data = new byte[] {(byte)0x8E, 0x01, (byte)0xBF, (byte)0x0E, // CRC 0123, (byte)0x40, // mode 0, 0, 0, 0, // link 5, 0, 6, 0}; // uid, gid a = new AsiExtraField(); a.parseFromLocalFileData(data, 0, data.length); assertEquals("length dir", data.length, a.getLocalFileDataLength().getValue());
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: 4 Number of AST nodes: 4
1
data = new byte[] {0x75, (byte)0x8E, 0x41, (byte)0xFD, // CRC
1
data = new byte[] {(byte)0x8E, 0x01, (byte)0xBF, (byte)0x0E, // CRC
2
                           0123, (byte)0xA0,                   // mode
2
                           0123, (byte)0x40,                         // mode
3
                           4, 0, 0, 0,                         // link length
3
                           0, 0, 0, 0,                               // link
4
                           5, 0, 6, 0,                         // uid, gid
4
                           5, 0, 6, 0};                          // uid, gid
5
                           (byte)'t', (byte)'e', (byte)'s', (byte)'t'};
6
        a = new AsiExtraField();
5
        a = new AsiExtraField();
7
        a.parseFromLocalFileData(data, 0, data.length);
6
        a.parseFromLocalFileData(data, 0, data.length);
8
        assertEquals("length link", data.length,
7
        assertEquals("length dir", data.length,
9
                     a.getLocalFileDataLength().getValue());
8
                     a.getLocalFileDataLength().getValue());
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in the same method
Number of node comparisons16
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    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'};
    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'};
    20
    data = new byte[] {(byte)0x8E, 0x01, (byte)0xBF, (byte)0x0E, 0123, (byte)0x40, 0, 0, 0, 0, 5, 0, 6, 0};
    Differences
    Expression1Expression2Difference
    {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'}{(byte)0x8E,0x01,(byte)0xBF,(byte)0x0E,0123,(byte)0x40,0,0,0,0,5,0,6,0}ARRAY_INITIALIZER_EXPRESSION_NUMBER_MISMATCH
    {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'}{(byte)0x8E,0x01,(byte)0xBF,(byte)0x0E,0123,(byte)0x40,0,0,0,0,5,0,6,0}ARRAY_INITIALIZER_MISMATCH
    20
    data = new byte[] {(byte)0x8E, 0x01, (byte)0xBF, (byte)0x0E, 0123, (byte)0x40, 0, 0, 0, 0, 5, 0, 6, 0};
    11
    a = new AsiExtraField();
    21
    a = new AsiExtraField();
    12
    a.parseFromLocalFileData(data, 0, data.length);
    22
    a.parseFromLocalFileData(data, 0, data.length);
    13
    assertEquals("length link", data.length, a.getLocalFileDataLength().getValue());
    13
    assertEquals("length link", data.length, a.getLocalFileDataLength().getValue());
    23
    assertEquals("length dir", data.length, a.getLocalFileDataLength().getValue());
    Differences
    Expression1Expression2Difference
    "length link""length dir"LITERAL_VALUE_MISMATCH
    23
    assertEquals("length dir", data.length, a.getLocalFileDataLength().getValue());
    Precondition Violations (0)
    Row Violation