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 | if (dx > 0) {↵ | 1 | if (dx > 0) {↵ | |
2 | if (!regionMatches(target, offset, con.limit, literal, literallen))↵ | 2 | if (!regionMatchesIgnoreCase(target, offset, con.limit, o2, literallen))↵ | |
3 | return -1;↵ | 3 | return -1;↵ | |
4 | offset += literallen;↵ | 4 | offset += literallen;↵ | |
5 | } else {↵ | 5 | } else {↵ | |
6 | if (!regionMatches(target, offset-literallen, con.limit, literal↵ | 6 | if (!regionMatchesIgnoreCase(target, offset-literallen, con.limit,↵ | |
7 | , literallen))↵ | 7 | o2, literallen))↵ | |
8 | return -1;↵ | 8 | return -1;↵ | |
9 | offset -= literallen;↵ | 9 | offset -= literallen;↵ | |
10 | } | 10 |
| |
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.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 17 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 10.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
191 | if (dx > 0) |
| 178 | if (dx > 0) | |||||||||||||||
|
| 181 | offset += literallen; | ||||||||||||||||
192 | if (!regionMatches(target, offset, con.limit, literal, literallen)) |
| 182 | if (!regionMatchesIgnoreCase(target, offset - literallen, con.limit, o2, literallen)) | |||||||||||||||
193 | return -1; | 183 | return -1; | ||||||||||||||||
194 | offset += literallen; |
| | ||||||||||||||||
else | else | ||||||||||||||||||
195 | if (!regionMatches(target, offset - literallen, con.limit, literal, literallen)) |
| 179 | if (!regionMatchesIgnoreCase(target, offset, con.limit, o2, literallen)) | |||||||||||||||
196 | return -1; | 180 | return -1; | ||||||||||||||||
|
| 184 | offset -= literallen; | ||||||||||||||||
197 | offset -= literallen; |
| |
Row | Violation |
---|---|
1 | Unmatched statement offset+=literallen; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Expression regionMatches(target,offset,con.limit,literal,literallen) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type java.text.CharacterIterator of variable target does not match with type java.lang.String of variable target |
4 | Unmatched statement offset+=literallen; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Expression regionMatches(target,offset - literallen,con.limit,literal,literallen) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Type java.text.CharacterIterator of variable target does not match with type java.lang.String of variable target |
7 | Unmatched statement offset-=literallen; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
8 | Unmatched statement offset-=literallen; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |