while (index <= limit) { int pindex = plength; int nindex = index + 1; char ch; do { char ch1 = ch = iterator.setIndex(--index); char ch2 = this.pattern[--pindex]; if (ch1 != ch2) { ch1 = Character.toUpperCase(ch1); ch2 = Character.toUpperCase(ch2); if (ch1 != ch2 && Character.toLowerCase(ch1) != Character.toLowerCase(ch2)) break; } if (pindex == 0) return index; } while (pindex > 0); index += this.shiftTable[ch % this.shiftTable.length] + 1; if (index < nindex) index = nindex; }
while (index <= limit) { int pindex = plength; int nindex = index + 1; char ch; do { char ch1 = ch = text.charAt(--index); char ch2 = this.pattern[--pindex]; if (ch1 != ch2) { ch1 = Character.toUpperCase(ch1); ch2 = Character.toUpperCase(ch2); if (ch1 != ch2 && Character.toLowerCase(ch1) != Character.toLowerCase(ch2)) break; } if (pindex == 0) return index; } while (pindex > 0); index += this.shiftTable[ch % this.shiftTable.length] + 1; if (index < nindex) index = nindex; }
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: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
while (index <= limit)
1
while (index <= limit)
2
      {
2
      {
3
        int pindex = plength;
3
        int pindex = plength;
4
        int nindex = index + 1;
4
        int nindex = index + 1;
5
        char ch;
5
        char ch;
6
        do
6
        do
7
        {
7
        {
8
          char ch1 = ch = iterator.setIndex(--index);
8
          char ch1 = ch = text.charAt(--index);
9
          char ch2 = this.pattern[--pindex];
9
          char ch2 = this.pattern[--pindex];
10
          if (ch1 != ch2)
10
          if (ch1 != ch2)
11
          {
11
          {
12
            ch1 = Character.toUpperCase(ch1);
12
            ch1 = Character.toUpperCase(ch1);
13
            ch2 = Character.toUpperCase(ch2);
13
            ch2 = Character.toUpperCase(ch2);
14
            if (ch1 != ch2 && Character.toLowerCase(ch1) != Character.toLowerCase(ch2))
14
            if (ch1 != ch2 && Character.toLowerCase(ch1) != Character.toLowerCase(ch2))
15
              break;
15
              break;
16
          }
16
          }
17
          if (pindex == 0)
17
          if (pindex == 0)
18
            return index;
18
            return index;
19
        }
19
        }
20
        while (pindex > 0);
20
        while (pindex > 0);
21
        index += this.shiftTable[ch % this.shiftTable.length] + 1;
21
        index += this.shiftTable[ch % this.shiftTable.length] + 1;
22
        if (index < nindex)
22
        if (index < nindex)
23
          index = nindex;
23
          index = nindex;
24
      }
24
      }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0