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 matchesIgnoreCase(String, int, int)
|
Method name: int matchesIgnoreCase(char[], int, int)
|
|||
Number of AST nodes: 11 | Number of AST nodes: 11 | |||
1 | do↵ | 1 | do↵ | |
2 | {↵ | 2 | {↵ | |
3 | char ch1 = ch = text.charAt(--index);↵ | 3 | char ch1 = ch = chars[--index];↵ | |
4 | char ch2 = this.pattern[--pindex];↵ | 4 | char ch2 = this.pattern[--pindex];↵ | |
5 | if (ch1 != ch2)↵ | 5 | if (ch1 != ch2)↵ | |
6 | {↵ | 6 | {↵ | |
7 | ch1 = Character.toUpperCase(ch1);↵ | 7 | ch1 = Character.toUpperCase(ch1);↵ | |
8 | ch2 = Character.toUpperCase(ch2);↵ | 8 | ch2 = Character.toUpperCase(ch2);↵ | |
9 | if (ch1 != ch2 && Character.toLowerCase(ch1) != Character.toLowerCase(ch2))↵ | 9 | if (ch1 != ch2 && Character.toLowerCase(ch1) != Character.toLowerCase(ch2))↵ | |
10 | break;↵ | 10 | break;↵ | |
11 | }↵ | 11 | }↵ | |
12 | if (pindex == 0)↵ | 12 | if (pindex == 0)↵ | |
13 | return index;↵ | 13 | return index;↵ | |
14 | }↵ | 14 | }↵ | |
15 | while (pindex > 0);↵ | 15 | while (pindex > 0);↵ | |
16 | index += this.shiftTable[ch % this.shiftTable.length] + 1; | 16 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 30 |
Number of mapped statements | 11 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18 | do while(pindex > 0) | 18 | do while(pindex > 0) | |||||||||||||
9 | char ch1 = ch = text.charAt(--index); |
| 9 | char ch1 = ch = chars[--index]; | ||||||||||||
10 | char ch2 = this.pattern[--pindex]; | 10 | char ch2 = this.pattern[--pindex]; | |||||||||||||
11 | if (ch1 != ch2) | 11 | if (ch1 != ch2) | |||||||||||||
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 | if (pindex == 0) | 16 | if (pindex == 0) | |||||||||||||
17 | return index; | 17 | return index; | |||||||||||||
19 | index += this.shiftTable[ch % this.shiftTable.length] + 1; | 19 | index += this.shiftTable[ch % this.shiftTable.length] + 1; |
Row | Violation |
---|---|
1 | Expression text.charAt(--index) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression chars[--index] cannot be parameterized, because it has dependencies to/from statements that will be extracted |