tok = tok.getCaseInsensitiveToken(); if (!tok.match(ch)) { if (ch >= 0x10000) return -1; char uch; if (!tok.match(uch = Character.toUpperCase((char)ch)) && !tok.match(Character.toLowerCase(uch))) return -1; }
tok = tok.getCaseInsensitiveToken(); if (!tok.match(ch)) { if (ch >= 0x10000) return -1; char uch; if (!tok.match(uch = Character.toUpperCase((char)ch)) && !tok.match(Character.toLowerCase(uch))) return -1; }
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: int matchCharacterIterator(Context, Op, int, int, int) Method name: int matchString(Context, Op, int, int, int)
Number of AST nodes: 7 Number of AST nodes: 7
1
tok = tok.getCaseInsensitiveToken();
1
tok = tok.getCaseInsensitiveToken();
2
                          if (!tok.match(ch)) {
2
                          if (!tok.match(ch)) {
3
                              if (ch >= 0x10000)  return -1;
3
                              if (ch >= 0x10000)  return -1;
4
                              char uch;
4
                              char uch;
5
                              if (!tok.match(uch = Character.toUpperCase((char)ch))
5
                              if (!tok.match(uch = Character.toUpperCase((char)ch))
6
                                  && !tok.match(Character.toLowerCase(uch)))
6
                                  && !tok.match(Character.toLowerCase(uch)))
7
                                  return -1;
7
                                  return -1;
8
                          }
8
                          }
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.8
Clones locationClones are declared in the same class
Number of node comparisons20
  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)4.2
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    67
    tok = tok.getCaseInsensitiveToken();
    67
    tok = tok.getCaseInsensitiveToken();
    68
    if (!tok.match(ch))
    68
    if (!tok.match(ch))
    69
    if (ch >= 0x10000)
    69
    if (ch >= 0x10000)
    70
    return -1;
    70
    return -1;
    71
    char uch;
    71
    char uch;
    72
    if (!tok.match(uch = Character.toUpperCase((char)ch)) && !tok.match(Character.toLowerCase(uch)))
    72
    if (!tok.match(uch = Character.toUpperCase((char)ch)) && !tok.match(Character.toLowerCase(uch)))
    73
    return -1;
    73
    return -1;
    Precondition Violations (0)
    Row Violation