char ch1 = target [ offset++ ] ; char ch2 = part.charAt(i++); if (ch1 == ch2) continue; char uch1 = Character.toUpperCase(ch1); char uch2 = Character.toUpperCase(ch2); if (uch1 == uch2) continue; if (Character.toLowerCase(uch1) != Character.toLowerCase(uch2)) return false;
char ch1 = target [ offset++ ] ; char ch2 = target [ i++ ] ; if (ch1 == ch2) continue; char uch1 = Character.toUpperCase(ch1); char uch2 = Character.toUpperCase(ch2); if (uch1 == uch2) continue; if (Character.toLowerCase(uch1) != Character.toLowerCase(uch2)) return false;
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 regionMatchesIgnoreCase(char[], int, int, String, int) Method name: boolean regionMatchesIgnoreCase(char[], int, int, int, int)
Number of AST nodes: 10 Number of AST nodes: 10
1
char ch1 =  target [  offset++ ] ;
1
char ch1 =  target [  offset++ ] ;
2
              char ch2 = part.charAt(i++);
2
              char ch2 =  target [  i++ ] ;
3
              if (ch1 == ch2)
3
              if (ch1 == ch2)
4
                  continue;
4
                  continue;
5
              char uch1 = Character.toUpperCase(ch1);
5
              char uch1 = Character.toUpperCase(ch1);
6
              char uch2 = Character.toUpperCase(ch2);
6
              char uch2 = Character.toUpperCase(ch2);
7
              if (uch1 == uch2)
7
              if (uch1 == uch2)
8
                  continue;
8
                  continue;
9
              if (Character.toLowerCase(uch1) != Character.toLowerCase(uch2))
9
              if (Character.toLowerCase(uch1) != Character.toLowerCase(uch2))
10
                  return false;
10
                  return false;
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.6
Clones locationClones are declared in the same class
Number of node comparisons44
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements10
    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.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    char ch1 = target[offset++];
    7
    char ch1 = target[offset++];
    8
    char ch2 = part.charAt(i++);
    8
    char ch2 = part.charAt(i++);
    8
    char ch2 = target[i++];
    Differences
    Expression1Expression2Difference
    part.charAt(i++)target[i++]TYPE_COMPATIBLE_REPLACEMENT
    8
    char ch2 = target[i++];
    9
    if (ch1 == ch2)
    9
    if (ch1 == ch2)
    10
    continue;
    10
    continue;
    10
    continue;
    Preondition Violations
    Statement continue; without innermost loop
    Statement continue; without innermost loop
    10
    continue;
    11
    char uch1 = Character.toUpperCase(ch1);
    11
    char uch1 = Character.toUpperCase(ch1);
    12
    char uch2 = Character.toUpperCase(ch2);
    12
    char uch2 = Character.toUpperCase(ch2);
    13
    if (uch1 == uch2)
    13
    if (uch1 == uch2)
    14
    continue;
    14
    continue;
    14
    continue;
    Preondition Violations
    Statement continue; without innermost loop
    Statement continue; without innermost loop
    14
    continue;
    15
    if (Character.toLowerCase(uch1) != Character.toLowerCase(uch2))
    15
    if (Character.toLowerCase(uch1) != Character.toLowerCase(uch2))
    16
    return false;
    16
    return false;
    16
    return false;
    Preondition Violations
    Conditional return false;
    Conditional return false;
    16
    return false;
    Precondition Violations (7)
    Row Violation
    1Statement continue; without innermost loop
    2Statement continue; without innermost loop
    3Statement continue; without innermost loop
    4Statement continue; without innermost loop
    5Clone fragment #1 returns variables offset, i , while Clone fragment #2 returns variables offset, i
    6Conditional return false;
    7Conditional return false;