if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) { ch = REUtil.composeFromSurrogates(ch, target [ matchStart+1 ] ); if (!range.match(ch)) continue; } else { if (!range.match(ch)) { char ch1 = Character.toUpperCase((char)ch); if (!range.match(ch1)) if (!range.match(Character.toLowerCase(ch1))) continue; } }
if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) { ch = REUtil.composeFromSurrogates(ch, target .charAt( matchStart+1 ) ); if (!range.match(ch)) continue; } else { if (!range.match(ch)) { char ch1 = Character.toUpperCase((char)ch); if (!range.match(ch1)) if (!range.match(Character.toLowerCase(ch1))) continue; } }
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: 9 Number of AST nodes: 9
1
if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) {
1
if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) {
2
                          ch = REUtil.composeFromSurrogates(ch,  target [  matchStart+1 ] );
2
                          ch = REUtil.composeFromSurrogates(ch,  target .charAt(  matchStart+1 ) );
3
                          if (!range.match(ch))  continue;
3
                          if (!range.match(ch))  continue;
4
                      } else {
4
                      } else {
5
                          if (!range.match(ch)) {
5
                          if (!range.match(ch)) {
6
                              char ch1 = Character.toUpperCase((char)ch);
6
                              char ch1 = Character.toUpperCase((char)ch);
7
                              if (!range.match(ch1))
7
                              if (!range.match(ch1))
8
                                  if (!range.match(Character.toLowerCase(ch1)))
8
                                  if (!range.match(Character.toLowerCase(ch1)))
9
                                      continue;
9
                                      continue;
10
                          }
10
                          }
11
                      }
11
                      }
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.9
Clones locationClones are declared in the same class
Number of node comparisons20
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements9
    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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    63
    if (REUtil.isHighSurrogate(ch) && matchStart + 1 < con.limit)
    68
    if (REUtil.isHighSurrogate(ch) && matchStart + 1 < con.limit)
    64
    ch = REUtil.composeFromSurrogates(ch, target[matchStart + 1]);
    64
    ch = REUtil.composeFromSurrogates(ch, target[matchStart + 1]);
    69
    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
    69
    ch = REUtil.composeFromSurrogates(ch, target.charAt(matchStart + 1));
    65
    if (!range.match(ch))
    70
    if (!range.match(ch))
    66
    continue;
    66
    continue;
    71
    continue;
    Preondition Violations
    Statement continue; without innermost loop
    Statement continue; without innermost loop
    71
    continue;
    else
    else
    67
    if (!range.match(ch))
    72
    if (!range.match(ch))
    68
    char ch1 = Character.toUpperCase((char)ch);
    73
    char ch1 = Character.toUpperCase((char)ch);
    69
    if (!range.match(ch1))
    74
    if (!range.match(ch1))
    70
    if (!range.match(Character.toLowerCase(ch1)))
    75
    if (!range.match(Character.toLowerCase(ch1)))
    71
    continue;
    71
    continue;
    76
    continue;
    Preondition Violations
    Statement continue; without innermost loop
    Statement continue; without innermost loop
    76
    continue;
    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 continue; without innermost loop
    6Statement continue; without innermost loop