if (this.beginpos == null) throw new IllegalStateException("A result is not set."); if (index < 0 || this.nofgroups <= index) throw new IllegalArgumentException("The parameter must be less than " +this.nofgroups+": "+index); return this.beginpos[index];
if (this.endpos == null) throw new IllegalStateException("A result is not set."); if (index < 0 || this.nofgroups <= index) throw new IllegalArgumentException("The parameter must be less than " +this.nofgroups+": "+index); return this.endpos[index];
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/internal/RegEx.java File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/internal/RegEx.java
Method name: int getBeginning(int) Method name: int getEnd(int)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (this.beginpos == null)
1
if (this.endpos == null)
2
            throw new IllegalStateException("A result is not set.");
2
            throw new IllegalStateException("A result is not set.");
3
        if (index < 0 || this.nofgroups <= index)
3
        if (index < 0 || this.nofgroups <= index)
4
            throw new IllegalArgumentException("The parameter must be less than "
4
            throw new IllegalArgumentException("The parameter must be less than "
5
                                               +this.nofgroups+": "+index);
5
                                               +this.nofgroups+": "+index);
6
        return this.beginpos[index];
6
        return this.endpos[index];
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.4
Clones locationClones are declared in the same class
Number of node comparisons14
  1. {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)0.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (this.beginpos == null)
    1
    if (this.beginpos == null)
    1
    if (this.endpos == null)
    Differences
    Expression1Expression2Difference
    beginposendposVARIABLE_NAME_MISMATCH
    1
    if (this.endpos == null)
    2
    throw new IllegalStateException("A result is not set.");
    2
    throw new IllegalStateException("A result is not set.");
    3
    if (index < 0 || this.nofgroups <= index)
    3
    if (index < 0 || this.nofgroups <= index)
    4
    throw new IllegalArgumentException("The parameter must be less than " + this.nofgroups + ": " + index);
    4
    throw new IllegalArgumentException("The parameter must be less than " + this.nofgroups + ": " + index);
    5
    return this.beginpos[index];
    5
    return this.beginpos[index];
    5
    return this.endpos[index];
    Differences
    Expression1Expression2Difference
    beginposendposVARIABLE_NAME_MISMATCH
    5
    return this.endpos[index];
    Precondition Violations (0)
    Row Violation