if (CHECK) { if (label.owner == null) { label.owner = this; } else if (label.owner != this) { throw new IllegalArgumentException(); } }
if (CodeWriter.CHECK) { if (this.owner == null) { this.owner = owner; } else if (this.owner != owner) { throw new IllegalArgumentException(); } }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/objectweb/asm/CodeWriter.java File path: /jEdit-4.2/src/org/objectweb/asm/Label.java
Method name: void visitJumpInsn(int, Label) Method name: void put(CodeWriter, ByteVector, int, boolean)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (CHECK) {
1
if (CodeWriter.CHECK) {
2
      if (label.owner == null) {
2
      if (this.owner == null) {
3
        label.owner = this;
3
        this.owner = owner;
4
      } else if (label.owner != this) {
4
      } else if (this.owner != owner) {
5
        throw new IllegalArgumentException();
5
        throw new IllegalArgumentException();
6
      }
6
      }
7
    }
7
    }
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.5
Clones locationClones are in different classes
Number of node comparisons14
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (CHECK)
    1
    if (CHECK)
    1
    if (CodeWriter.CHECK)
    Differences
    Expression1Expression2Difference
    CHECKCodeWriter.CHECKTYPE_COMPATIBLE_REPLACEMENT
    1
    if (CodeWriter.CHECK)
    2
    if (label.owner == null)
    2
    if (label.owner == null)
    2
    if (this.owner == null)
    Differences
    Expression1Expression2Difference
    label.ownerthis.ownerTYPE_COMPATIBLE_REPLACEMENT
    2
    if (this.owner == null)
    3
    label.owner = this;
    3
    label.owner = this;
    3
    this.owner = owner;
    Differences
    Expression1Expression2Difference
    label.ownerthis.ownerTYPE_COMPATIBLE_REPLACEMENT
    thisownerTYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression this.owner is a field being modified, and thus it cannot be parameterized
    3
    this.owner = owner;
    4
    else if (label.owner != this)
    4
    else if (label.owner != this)
    4
    else if (this.owner != owner)
    Differences
    Expression1Expression2Difference
    label.ownerthis.ownerTYPE_COMPATIBLE_REPLACEMENT
    thisownerTYPE_COMPATIBLE_REPLACEMENT
    4
    else if (this.owner != owner)
    5
    throw new IllegalArgumentException();
    5
    throw new IllegalArgumentException();
    Precondition Violations (1)
    Row Violation
    1Expression this.owner is a field being modified, and thus it cannot be parameterized