encode.order(ByteOrder.LITTLE_ENDIAN); long value = encode.getInt() & 0xFFFFFFFFL; encode.order(ByteOrder.BIG_ENDIAN); return value;
encode.order(ByteOrder.LITTLE_ENDIAN); int value = encode.getInt(); encode.order(ByteOrder.BIG_ENDIAN); return value;
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/util/Pack.java File path: /jruby-1.4.0/src/org/jruby/util/Pack.java
Method name: long decodeIntUnsignedLittleEndian(ByteBuffer) Method name: int decodeIntLittleEndian(ByteBuffer)
Number of AST nodes: 4 Number of AST nodes: 4
1
encode.order(ByteOrder.LITTLE_ENDIAN);
1
encode.order(ByteOrder.LITTLE_ENDIAN);
2
        long value = encode.getInt() & 0xFFFFFFFFL;
2
        int value = encode.getInt();
3
        encode.order(ByteOrder.BIG_ENDIAN);
3
        encode.order(ByteOrder.BIG_ENDIAN);
4
        return value;
4
        return value;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    encode.order(ByteOrder.LITTLE_ENDIAN);
    1
    encode.order(ByteOrder.LITTLE_ENDIAN);
                                                              
    2
    int value = encode.getInt();
    Preondition Violations
    Unmatched statement int value=encode.getInt(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2
    int value = encode.getInt();
    2
    long value = encode.getInt() & 0xFFFFFFFFL;
    2
    long value = encode.getInt() & 0xFFFFFFFFL;
    Preondition Violations
    Unmatched statement long value=encode.getInt() & 0xFFFFFFFFL; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                            
    3
    encode.order(ByteOrder.BIG_ENDIAN);
    3
    encode.order(ByteOrder.BIG_ENDIAN);
                                    
    4
    return value;
    Preondition Violations
    Unmatched return value;
    4
    return value;
    4
    return value;
    4
    return value;
    Preondition Violations
    Unmatched return value;
                                    
    Precondition Violations (4)
    Row Violation
    1Unmatched statement int value=encode.getInt(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement long value=encode.getInt() & 0xFFFFFFFFL; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched return value;
    4Unmatched return value;