super(); this.adler=adler; this.intern = new Adler32(); setAdlerRef(this.adler);
super(); this.crc=crc; this.intern = new CRC32(); setCRCRef(this.crc);
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/util/Adler32Ext.java File path: /jruby-1.4.0/src/org/jruby/util/CRC32Ext.java
Method name: void Adler32Ext(int) Method name: void CRC32Ext(int)
Number of AST nodes: 4 Number of AST nodes: 4
1
super();
1
super();
2
        this.adler=adler;
2
        this.crc=crc;
3
        this.intern = new Adler32();
3
        this.intern = new CRC32();
4
        setAdlerRef(this.adler);
4
        setCRCRef(this.crc);
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 in different classes
Number of node comparisons7
  1. {Non-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
    1
    super();
    1
    super();
    2
    this.adler = adler;
    2
    this.adler = adler;
    2
    this.crc = crc;
    Differences
    Expression1Expression2Difference
    adlercrcVARIABLE_NAME_MISMATCH
    adlercrcVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.adler is a field being modified, and thus it cannot be parameterized
    Expression this.crc is a field being modified, and thus it cannot be parameterized
    2
    this.crc = crc;
    3
    this.intern = new Adler32();
    3
    this.intern = new CRC32();
    4
    setAdlerRef(this.adler);
    4
    setAdlerRef(this.adler);
    4
    setCRCRef(this.crc);
    Differences
    Expression1Expression2Difference
    setAdlerRefsetCRCRefMETHOD_INVOCATION_NAME_MISMATCH
    adlercrcVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression setAdlerRef(this.adler) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method setAdlerRef
    Expression setCRCRef(this.crc) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method setCRCRef
    Expression setAdlerRef(this.adler) is a void method call, and thus it cannot be parameterized
    Expression setCRCRef(this.crc) is a void method call, and thus it cannot be parameterized
    Expression this.adler cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression this.crc cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4
    setCRCRef(this.crc);
    Precondition Violations (8)
    Row Violation
    1Expression this.adler is a field being modified, and thus it cannot be parameterized
    2Expression this.crc is a field being modified, and thus it cannot be parameterized
    3Expression setAdlerRef(this.adler) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression setCRCRef(this.crc) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression setAdlerRef(this.adler) is a void method call, and thus it cannot be parameterized
    6Expression setCRCRef(this.crc) is a void method call, and thus it cannot be parameterized
    7Expression this.adler cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression this.crc cannot be parameterized, because it has dependencies to/from statements that will be extracted