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 matches(char[], int, int, Match)
|
Method name: boolean matches(String, int, int, Match)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
1 | int ch = target [ matchStart ] ;↵ | 1 | int ch = target .charAt( matchStart ) ;↵ | |
2 | if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) {↵ | 2 | if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit) {↵ | |
3 | ch = REUtil.composeFromSurrogates(ch, target [ matchStart+1 ] );↵ | 3 | ch = REUtil.composeFromSurrogates(ch, target .charAt( matchStart+1 ) );↵ | |
4 | if (!range.match(ch)) continue;↵ | 4 | if (!range.match(ch)) continue;↵ | |
5 | } else {↵ | 5 | } else {↵ | |
6 | if (!range.match(ch)) {↵ | 6 | if (!range.match(ch)) {↵ | |
7 | char ch1 = Character.toUpperCase((char)ch);↵ | 7 | char ch1 = Character.toUpperCase((char)ch);↵ | |
8 | if (!range.match(ch1))↵ | 8 | if (!range.match(ch1))↵ | |
9 | if (!range.match(Character.toLowerCase(ch1)))↵ | 9 | if (!range.match(Character.toLowerCase(ch1)))↵ | |
10 | continue;↵ | 10 | continue;↵ | |
11 | }↵ | 11 | }↵ | |
12 | }↵ | 12 | }↵ | |
13 | if (0 <= (matchEnd = this. matchCharArray (con, this.operations,↵ | 13 | if (0 <= (matchEnd = this. matchString (con, this.operations,↵ | |
14 | matchStart, 1, this.options)))↵ | 14 | matchStart, 1, this.options)))↵ | |
15 | break; | 15 |
| |
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) | 1.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 27 |
Number of mapped statements | 12 |
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) | 3.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
62 | int ch = target[matchStart]; |
| 67 | int ch = target.charAt(matchStart); | ||||||||||||
63 | if (REUtil.isHighSurrogate(ch) && matchStart + 1 < con.limit) | 68 | if (REUtil.isHighSurrogate(ch) && matchStart + 1 < con.limit) | |||||||||||||
64 | ch = REUtil.composeFromSurrogates(ch, target[matchStart + 1]); |
| 69 | ch = REUtil.composeFromSurrogates(ch, target.charAt(matchStart + 1)); | ||||||||||||
65 | if (!range.match(ch)) | 70 | if (!range.match(ch)) | |||||||||||||
66 | continue; |
| 71 | continue; | ||||||||||||
else | else | |||||||||||||||
67 | if (!range.match(ch)) | 72 | if (!range.match(ch)) | |||||||||||||
68 | char ch1 = Character.toUpperCase((char)ch); | 73 | char ch1 = Character.toUpperCase((char)ch); | |||||||||||||
69 | if (!range.match(ch1)) | 74 | if (!range.match(ch1)) | |||||||||||||
70 | if (!range.match(Character.toLowerCase(ch1))) | 75 | if (!range.match(Character.toLowerCase(ch1))) | |||||||||||||
71 | continue; |
| 76 | continue; | ||||||||||||
72 | if (0 <= (matchEnd = this.matchCharArray(con, this.operations, matchStart, 1, this.options))) |
| 77 | if (0 <= (matchEnd = this.matchString(con, this.operations, matchStart, 1, this.options))) | ||||||||||||
73 | break; |
| 78 | break; |
Row | Violation |
---|---|
1 | Expression target[matchStart + 1] cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression target.charAt(matchStart + 1) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Statement continue; without innermost loop |
4 | Statement continue; without innermost loop |
5 | Statement continue; without innermost loop |
6 | Statement continue; without innermost loop |
7 | Statement break; without innermost loop |
8 | Statement break; without innermost loop |