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: 8 | Number of AST nodes: 8 | |||
1 | for (matchStart = con.start; matchStart <= limit; matchStart ++) {↵ | 1 | for (matchStart = con.start; matchStart <= limit; matchStart ++) {↵ | |
2 | int ch = target [ matchStart ] ;↵ | 2 | int ch = target .charAt( matchStart ) ;↵ | |
3 | if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit)↵ | 3 | if (REUtil.isHighSurrogate(ch) && matchStart+1 < con.limit)↵ | |
4 | ch = REUtil.composeFromSurrogates(ch, target [ matchStart+1 ] );↵ | 4 | ch = REUtil.composeFromSurrogates(ch, target .charAt( matchStart+1 ) );↵ | |
5 | if (!range.match(ch)) continue;↵ | 5 | if (!range.match(ch)) continue;↵ | |
6 | if (0 <= (matchEnd = this. matchCharArray (con, this.operations,↵ | 6 | if (0 <= (matchEnd = this. matchString (con, this.operations,↵ | |
7 | matchStart, 1, this.options)))↵ | 7 | matchStart, 1, this.options)))↵ | |
8 | break;↵ | 8 | break;↵ | |
9 | } | 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) | 1.9 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 39 |
Number of mapped statements | 8 |
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) | 2.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
74 | for (matchStart = con.start; matchStart <= limit; matchStart++) | 79 | for (matchStart = con.start; matchStart <= limit; matchStart++) | |||||||||||||
75 | int ch = target[matchStart]; |
| 80 | int ch = target.charAt(matchStart); | ||||||||||||
76 | if (REUtil.isHighSurrogate(ch) && matchStart + 1 < con.limit) | 81 | if (REUtil.isHighSurrogate(ch) && matchStart + 1 < con.limit) | |||||||||||||
77 | ch = REUtil.composeFromSurrogates(ch, target[matchStart + 1]); |
| 82 | ch = REUtil.composeFromSurrogates(ch, target.charAt(matchStart + 1)); | ||||||||||||
78 | if (!range.match(ch)) | 83 | if (!range.match(ch)) | |||||||||||||
79 | continue; | 84 | continue; | |||||||||||||
80 | if (0 <= (matchEnd = this.matchCharArray(con, this.operations, matchStart, 1, this.options))) |
| 85 | if (0 <= (matchEnd = this.matchString(con, this.operations, matchStart, 1, this.options))) | ||||||||||||
81 | break; | 86 | break; |
Row | Violation |
---|---|
1 | Expression target[matchStart] cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression target.charAt(matchStart) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression target[matchStart + 1] cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression target.charAt(matchStart + 1) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression this.matchCharArray(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression this.matchString(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Clone fragment #1 returns variables matchEnd, matchStart , while Clone fragment #2 returns variables matchEnd, matchStart |