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(CharacterIterator, int, int)
|
Method name: int matchesIgnoreCase(String, int, int)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | char ch1 = ch = iterator.setIndex(--index);↵ | 1 | char ch1 = ch = text.charAt(--index);↵ | |
2 | char ch2 = this.pattern[--pindex];↵ | 2 | char ch2 = this.pattern[--pindex];↵ | |
3 | if (ch1 != ch2)↵ | 3 | if (ch1 != ch2)↵ | |
4 | {↵ | 4 | {↵ | |
5 | ch1 = Character.toUpperCase(ch1);↵ | 5 | ch1 = Character.toUpperCase(ch1);↵ | |
6 | ch2 = Character.toUpperCase(ch2);↵ | 6 | ch2 = Character.toUpperCase(ch2);↵ | |
7 | if (ch1 != ch2 && Character.toLowerCase(ch1) != Character.toLowerCase(ch2))↵ | 7 | if (ch1 != ch2 && Character.toLowerCase(ch1) != Character.toLowerCase(ch2))↵ | |
8 | break;↵ | 8 | break;↵ | |
9 | }↵ | 9 | }↵ | |
10 | if (pindex == 0)↵ | 10 | if (pindex == 0)↵ | |
11 | return index; | 11 |
| |
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.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 25 |
Number of mapped statements | 8 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||
---|---|---|---|---|---|---|---|---|---|---|
|
| 9 | char ch1 = ch = text.charAt(--index); | |||||||
9 | char ch1 = ch = iterator.setIndex(--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; |
Row | Violation |
---|---|
1 | Unmatched statement char ch1=ch=text.charAt(--index); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement char ch1=ch=iterator.setIndex(--index); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Statement break; without innermost loop |
4 | Statement break; without innermost loop |