if (this.getMin() == this.getMax()) { ret = this.child.toString(options)+"{"+this.getMin()+"}"; } else if (this.getMin() >= 0 && this.getMax() >= 0) { ret = this.child.toString(options)+"{"+this.getMin()+","+this.getMax()+"}"; } else if (this.getMin() >= 0 && this.getMax() < 0) { ret = this.child.toString(options)+"{"+this.getMin()+",}"; } else throw new RuntimeException("Token#toString(): CLOSURE " +this.getMin()+", "+this.getMax());
if (this.getMin() == this.getMax()) { ret = this.child.toString(options)+"{"+this.getMin()+"}?"; } else if (this.getMin() >= 0 && this.getMax() >= 0) { ret = this.child.toString(options)+"{"+this.getMin()+","+this.getMax()+"}?"; } else if (this.getMin() >= 0 && this.getMax() < 0) { ret = this.child.toString(options)+"{"+this.getMin()+",}?"; } else throw new RuntimeException("Token#toString(): NONGREEDYCLOSURE " + this.getMin() + ", " + this.getMax());
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: String toString(int) Method name: String toString(int)
Number of AST nodes: 7 Number of AST nodes: 7
1
if (this.getMin() == this.getMax()) {
1
if (this.getMin() == this.getMax()) {
2
                      ret = this.child.toString(options)+"{"+this.getMin()+"}";
2
                      ret = this.child.toString(options)+"{"+this.getMin()+"}?";
3
                  } else if (this.getMin() >= 0 && this.getMax() >= 0) {
3
                  } else if (this.getMin() >= 0 && this.getMax() >= 0) {
4
                      ret = this.child.toString(options)+"{"+this.getMin()+","+this.getMax()+"}";
4
                      ret = this.child.toString(options)+"{"+this.getMin()+","+this.getMax()+"}?";
5
                  } else if (this.getMin() >= 0 && this.getMax() < 0) {
5
                  } else if (this.getMin() >= 0 && this.getMax() < 0) {
6
                      ret = this.child.toString(options)+"{"+this.getMin()+",}";
6
                      ret = this.child.toString(options)+"{"+this.getMin()+",}?";
7
                  } else
7
                  } else
8
                      throw new RuntimeException("Token#toString(): CLOSURE "
8
                      throw new RuntimeException("Token#toString(): NONGREEDYCLOSURE "
9
                                                 +this.getMin()+", "+this.getMax());
9
                                                 + this.getMin() + ", " + this.getMax());
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.9
Clones locationClones are in the same method
Number of node comparisons36
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    else if (this.getMin() == this.getMax())
    14
    else if (this.getMin() == this.getMax())
    6
    ret = this.child.toString(options) + "{" + this.getMin() + "}";
    6
    ret = this.child.toString(options) + "{" + this.getMin() + "}";
    15
    ret = this.child.toString(options) + "{" + this.getMin() + "}?";
    Differences
    Expression1Expression2Difference
    "}""}?"LITERAL_VALUE_MISMATCH
    15
    ret = this.child.toString(options) + "{" + this.getMin() + "}?";
    7
    else if (this.getMin() >= 0 && this.getMax() >= 0)
    16
    else if (this.getMin() >= 0 && this.getMax() >= 0)
    8
    ret = this.child.toString(options) + "{" + this.getMin() + "," + this.getMax() + "}";
    8
    ret = this.child.toString(options) + "{" + this.getMin() + "," + this.getMax() + "}";
    17
    ret = this.child.toString(options) + "{" + this.getMin() + "," + this.getMax() + "}?";
    Differences
    Expression1Expression2Difference
    "}""}?"LITERAL_VALUE_MISMATCH
    17
    ret = this.child.toString(options) + "{" + this.getMin() + "," + this.getMax() + "}?";
    9
    else if (this.getMin() >= 0 && this.getMax() < 0)
    18
    else if (this.getMin() >= 0 && this.getMax() < 0)
    10
    ret = this.child.toString(options) + "{" + this.getMin() + ",}";
    10
    ret = this.child.toString(options) + "{" + this.getMin() + ",}";
    19
    ret = this.child.toString(options) + "{" + this.getMin() + ",}?";
    Differences
    Expression1Expression2Difference
    ",}"",}?"LITERAL_VALUE_MISMATCH
    19
    ret = this.child.toString(options) + "{" + this.getMin() + ",}?";
    else
    else
    11
    throw new RuntimeException("Token#toString(): CLOSURE " + this.getMin() + ", " + this.getMax());
    11
    throw new RuntimeException("Token#toString(): CLOSURE " + this.getMin() + ", " + this.getMax());
    20
    throw new RuntimeException("Token#toString(): NONGREEDYCLOSURE " + this.getMin() + ", " + this.getMax());
    Differences
    Expression1Expression2Difference
    "Token#toString(): CLOSURE ""Token#toString(): NONGREEDYCLOSURE "LITERAL_VALUE_MISMATCH
    20
    throw new RuntimeException("Token#toString(): NONGREEDYCLOSURE " + this.getMin() + ", " + this.getMax());
    Precondition Violations (0)
    Row Violation