byte[] temp = new byte[ classBytes.length + buffer.length ]; System.arraycopy( classBytes, 0, temp, 0, classBytes.length ); System.arraycopy( buffer, 0, temp, classBytes.length, buffer.length ); classBytes = temp;
byte[] temp = new byte[ classBytes.length + r ]; System.arraycopy( classBytes, 0, temp, 0, classBytes.length ); System.arraycopy( buffer, 0, temp, classBytes.length, r ); classBytes = temp;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/bytecode/util/ByteCodeHelper.java File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/bytecode/util/ByteCodeHelper.java
Method name: byte[] readByteCode(InputStream) Method name: byte[] readByteCode(InputStream)
Number of AST nodes: 4 Number of AST nodes: 4
1
byte[] temp = new byte[ classBytes.length + buffer.length ];
1
byte[] temp = new byte[ classBytes.length + r ];
2
				System.arraycopy( classBytes, 0, temp, 0, classBytes.length );
2
				System.arraycopy( classBytes, 0, temp, 0, classBytes.length );
3
				System.arraycopy( buffer, 0, temp, classBytes.length, buffer.length );
3
				System.arraycopy( buffer, 0, temp, classBytes.length, r );
4
				classBytes = temp;
4
				classBytes = temp;
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 comparisons17
  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
    9
    byte[] temp = new byte[classBytes.length + buffer.length];
    9
    byte[] temp = new byte[classBytes.length + buffer.length];
    14
    byte[] temp = new byte[classBytes.length + r];
    Differences
    Expression1Expression2Difference
    buffer.lengthrTYPE_COMPATIBLE_REPLACEMENT
    14
    byte[] temp = new byte[classBytes.length + r];
    10
    System.arraycopy(classBytes, 0, temp, 0, classBytes.length);
    15
    System.arraycopy(classBytes, 0, temp, 0, classBytes.length);
    11
    System.arraycopy(buffer, 0, temp, classBytes.length, buffer.length);
    11
    System.arraycopy(buffer, 0, temp, classBytes.length, buffer.length);
    16
    System.arraycopy(buffer, 0, temp, classBytes.length, r);
    Differences
    Expression1Expression2Difference
    buffer.lengthrTYPE_COMPATIBLE_REPLACEMENT
    16
    System.arraycopy(buffer, 0, temp, classBytes.length, r);
    12
    classBytes = temp;
    17
    classBytes = temp;
    Precondition Violations (0)
    Row Violation