int ch = target [ matchStart ] ; if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) ch = REUtil.composeFromSurrogates(ch, target [ matchStart+1 ] ); if (!range.match(ch)) continue; if (0 <= (matchEnd = this. matchCharArray (con, this.operations, matchStart, 1, this.options))) break;
int ch = target .charAt( matchStart ) ; if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) ch = REUtil.composeFromSurrogates(ch, target .charAt( matchStart+1 ) ); if (!range.match(ch)) continue; if (0 <= (matchEnd = this. matchString (con, this.operations, matchStart, 1, this.options))) break;
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: boolean matches(char[], int, int, Match) Method name: boolean matches(String, int, int, Match)
Number of AST nodes: 7 Number of AST nodes: 7
1
int ch =  target [  matchStart ] ;
1
int ch =  target .charAt(  matchStart ) ;
2
                      if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit)
2
                      if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit)
3
                          ch = REUtil.composeFromSurrogates(ch,  target [  matchStart+1 ] );
3
                          ch = REUtil.composeFromSurrogates(ch,  target .charAt(  matchStart+1 ) );
4
                      if (!range.match(ch))  continue;
4
                      if (!range.match(ch))  continue;
5
                      if (0 <= (matchEnd = this. matchCharArray (con, this.operations,
5
                      if (0 <= (matchEnd = this. matchString (con, this.operations,
6
                                                                 matchStart, 1, this.options)))
6
                                                              matchStart, 1, this.options)))
7
                          break;
7
                          break;
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 declared in the same class
Number of node comparisons29
  1. {Non-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.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    75
    int ch = target[matchStart];
    75
    int ch = target[matchStart];
    80
    int ch = target.charAt(matchStart);
    Differences
    Expression1Expression2Difference
    target[matchStart]target.charAt(matchStart)TYPE_COMPATIBLE_REPLACEMENT
    80
    int ch = target.charAt(matchStart);
    76
    if (REUtil.isHighSurrogate(ch) && matchStart + 1 < con.limit)
    81
    if (REUtil.isHighSurrogate(ch) && matchStart + 1 < con.limit)
    77
    ch = REUtil.composeFromSurrogates(ch, target[matchStart + 1]);
    77
    ch = REUtil.composeFromSurrogates(ch, target[matchStart + 1]);
    82
    ch = REUtil.composeFromSurrogates(ch, target.charAt(matchStart + 1));
    Differences
    Expression1Expression2Difference
    target[matchStart + 1]target.charAt(matchStart + 1)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression target[matchStart + 1] cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression target.charAt(matchStart + 1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    82
    ch = REUtil.composeFromSurrogates(ch, target.charAt(matchStart + 1));
    78
    if (!range.match(ch))
    83
    if (!range.match(ch))
    79
    continue;
    79
    continue;
    84
    continue;
    Preondition Violations
    Statement continue; without innermost loop
    Statement continue; without innermost loop
    84
    continue;
    80
    if (0 <= (matchEnd = this.matchCharArray(con, this.operations, matchStart, 1, this.options)))
    80
    if (0 <= (matchEnd = this.matchCharArray(con, this.operations, matchStart, 1, this.options)))
    85
    if (0 <= (matchEnd = this.matchString(con, this.operations, matchStart, 1, this.options)))
    Differences
    Expression1Expression2Difference
    matchCharArraymatchStringMETHOD_INVOCATION_NAME_MISMATCH
    85
    if (0 <= (matchEnd = this.matchString(con, this.operations, matchStart, 1, this.options)))
    81
    break;
    81
    break;
    86
    break;
    Preondition Violations
    Statement break; without innermost loop
    Statement break; without innermost loop
    86
    break;
    Precondition Violations (6)
    Row Violation
    1Expression target[matchStart + 1] cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression target.charAt(matchStart + 1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Statement continue; without innermost loop
    4Statement continue; without innermost loop
    5Statement break; without innermost loop
    6Statement break; without innermost loop