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 matchString(Context, Op, int, int, int)
|
Method name: int matchCharacterIterator(Context, Op, int, int, int)
|
|||
Number of AST nodes: 17 | Number of AST nodes: 17 | |||
1 | String literal = op.getString();↵ | 1 | String literal = op.getString();↵ | |
2 | int literallen = literal.length();↵ | 2 | int literallen = literal.length();↵ | |
3 | if (!isSet(opts, IGNORE_CASE)) {↵ | 3 | if (!isSet(opts, IGNORE_CASE)) {↵ | |
4 | if (dx > 0) {↵ | 4 | if (dx > 0) {↵ | |
5 | if (!regionMatches(target, offset, con.limit, literal, literallen))↵ | 5 | if (!regionMatches(target, offset, con.limit, literal, literallen))↵ | |
6 | return -1;↵ | 6 | return -1;↵ | |
7 | offset += literallen;↵ | 7 | offset += literallen;↵ | |
8 | } else {↵ | 8 | } else {↵ | |
9 | if (!regionMatches(target, offset-literallen, con.limit, literal, literallen))↵ | 9 | if (!regionMatches(target, offset-literallen, con.limit, literal, literallen))↵ | |
10 | return -1;↵ | 10 | return -1;↵ | |
11 | offset -= literallen;↵ | 11 | offset -= literallen;↵ | |
12 | }↵ | 12 | }↵ | |
13 | } else {↵ | 13 | } else {↵ | |
14 | if (dx > 0) {↵ | 14 | if (dx > 0) {↵ | |
15 | if (!regionMatchesIgnoreCase(target, offset, con.limit, literal, literallen))↵ | 15 | if (!regionMatchesIgnoreCase(target, offset, con.limit, literal, literallen))↵ | |
16 | return -1;↵ | 16 | return -1;↵ | |
17 | offset += literallen;↵ | 17 | offset += literallen;↵ | |
18 | } else {↵ | 18 | } else {↵ | |
19 | if (!regionMatchesIgnoreCase(target, offset-literallen, con.limit,↵ | 19 | if (!regionMatchesIgnoreCase(target, offset-literallen, con.limit,↵ | |
20 | literal, literallen))↵ | 20 | literal, literallen))↵ | |
21 | return -1;↵ | 21 | return -1;↵ | |
22 | offset -= literallen;↵ | 22 | offset -= literallen;↵ | |
23 | }↵ | 23 | }↵ | |
24 | } | 24 |
| |
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) | 2.8 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 68 |
Number of mapped statements | 17 |
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) | 135.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
188 | String literal = op.getString(); | 188 | String literal = op.getString(); | ||||||||||||
189 | int literallen = literal.length(); | 189 | int literallen = literal.length(); | ||||||||||||
190 | if (!isSet(opts, IGNORE_CASE)) | 190 | if (!isSet(opts, IGNORE_CASE)) | ||||||||||||
191 | if (dx > 0) | 191 | if (dx > 0) | ||||||||||||
192 | if (!regionMatches(target, offset, con.limit, literal, literallen)) |
| 192 | if (!regionMatches(target, offset, con.limit, literal, literallen)) | |||||||||||
193 | return -1; | 193 | return -1; | ||||||||||||
194 | offset += literallen; | 194 | offset += literallen; | ||||||||||||
else | else | ||||||||||||||
195 | if (!regionMatches(target, offset - literallen, con.limit, literal, literallen)) |
| 195 | if (!regionMatches(target, offset - literallen, con.limit, literal, literallen)) | |||||||||||
196 | return -1; | 196 | return -1; | ||||||||||||
197 | offset -= literallen; | 197 | offset -= literallen; | ||||||||||||
else | else | ||||||||||||||
198 | if (dx > 0) | 198 | if (dx > 0) | ||||||||||||
199 | if (!regionMatchesIgnoreCase(target, offset, con.limit, literal, literallen)) |
| 199 | if (!regionMatchesIgnoreCase(target, offset, con.limit, literal, literallen)) | |||||||||||
200 | return -1; | 200 | return -1; | ||||||||||||
201 | offset += literallen; | 201 | offset += literallen; | ||||||||||||
else | else | ||||||||||||||
202 | if (!regionMatchesIgnoreCase(target, offset - literallen, con.limit, literal, literallen)) |
| 202 | if (!regionMatchesIgnoreCase(target, offset - literallen, con.limit, literal, literallen)) | |||||||||||
203 | return -1; | 203 | return -1; | ||||||||||||
204 | offset -= literallen; | 204 | offset -= literallen; |
Row | Violation |
---|---|
1 | Type java.lang.String of variable target does not match with type java.text.CharacterIterator of variable target |
2 | Type java.lang.String of variable target does not match with type java.text.CharacterIterator of variable target |
3 | Type java.lang.String of variable target does not match with type java.text.CharacterIterator of variable target |
4 | Type java.lang.String of variable target does not match with type java.text.CharacterIterator of variable target |