while (off < this.regexlen && (ch = this.regex.charAt(off++)) >= '0' && ch <= '9') { min = min*10 +ch-'0'; if (min < 0) throw ex("parser.quantifier.5", this.offset); }
while (off < this.regexlen && (ch = this.regex.charAt(off++)) >= '0' && ch <= '9') { max = max*10 +ch-'0'; if (max < 0) throw ex("parser.quantifier.5", this.offset); }
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: Token parseFactor() Method name: Token parseFactor()
Number of AST nodes: 4 Number of AST nodes: 4
1
while (off < this.regexlen
1
while (off < this.regexlen
2
                             && (ch = this.regex.charAt(off++)) >= '0'
2
                                 && (ch = this.regex.charAt(off++)) >= '0'
3
 && ch <= '9') {
3
                                 && ch <= '9') {
4
                          min = min*10 +ch-'0';
4
                              max = max*10 +ch-'0';
5
                          if (min < 0)
5
                              if (max < 0)
6
                              throw ex("parser.quantifier.5", this.offset);
6
                                  throw ex("parser.quantifier.5", this.offset);
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)1.0
Clones locationClones are in the same method
Number of node comparisons9
  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)1.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    50
    while (off < this.regexlen && (ch = this.regex.charAt(off++)) >= '0' && ch <= '9')
    61
    while (off < this.regexlen && (ch = this.regex.charAt(off++)) >= '0' && ch <= '9')
    51
    min = min * 10 + ch - '0';
    51
    min = min * 10 + ch - '0';
    62
    max = max * 10 + ch - '0';
    Differences
    Expression1Expression2Difference
    minmaxVARIABLE_NAME_MISMATCH
    minmaxVARIABLE_NAME_MISMATCH
    62
    max = max * 10 + ch - '0';
    52
    if (min < 0)
    52
    if (min < 0)
    63
    if (max < 0)
    Differences
    Expression1Expression2Difference
    minmaxVARIABLE_NAME_MISMATCH
    63
    if (max < 0)
    53
    throw ex("parser.quantifier.5", this.offset);
    64
    throw ex("parser.quantifier.5", this.offset);
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables min, ch, off , while Clone fragment #2 returns variables max, ch, off