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 regionMatches(char[], int, int, String, int)
|
Method name: boolean regionMatches(char[], int, int, int, int)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | if (offset < 0) return false;↵ | 1 | if (offset < 0) return false;↵ | |
2 | if (limit-offset < partlen)↵ | 2 | if (limit-offset < partlen)↵ | |
3 | return false;↵ | 3 | return false;↵ | |
4 | int i = 0;↵ | 4 | int i = offset2;↵ | |
5 | while (partlen-- > 0) {↵ | 5 | while (partlen-- > 0) {↵ | |
6 | if ( target [ offset++ ] != part.charAt(i++))↵ | 6 | if ( target [ offset++ ] != target [ i++ ] )↵ | |
7 | return false;↵ | 7 | return false;↵ | |
8 | }↵ | 8 | }↵ | |
9 | return true; | 9 |
| |
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.7 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 22 |
Number of mapped statements | 9 |
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) | 1.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (offset < 0) | 1 | if (offset < 0) | |||||||||||||
2 | return false; | 2 | return false; | |||||||||||||
3 | if (limit - offset < partlen) | 3 | if (limit - offset < partlen) | |||||||||||||
4 | return false; | 4 | return false; | |||||||||||||
5 | int i = 0; |
| 5 | int i = offset2; | ||||||||||||
6 | while (partlen-- > 0) | 6 | while (partlen-- > 0) | |||||||||||||
7 | if (target[offset++] != part.charAt(i++)) |
| 7 | if (target[offset++] != target[i++]) | ||||||||||||
8 | return false; | 8 | return false; | |||||||||||||
9 | return true; | 9 | return true; |
Row | Violation |
---|---|
1 | Expression part.charAt(i++) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression target[i++] cannot be parameterized, because it has dependencies to/from statements that will be extracted |