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(String, int, int, Match)
|
Method name: boolean matches(CharacterIterator, Match)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | int ch = target .charAt( matchStart ) ;↵ | 1 | int ch = target .setIndex( 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 .charAt( matchStart+1 ) );↵ | 3 | ch = REUtil.composeFromSurrogates(ch, target .setIndex( matchStart+1 ) );↵ | |
4 | if (!range.match(ch)) continue;↵ | 4 | if (!range.match(ch)) continue;↵ | |
5 | if (0 <= (matchEnd = this. matchString (con, this.operations,↵ | 5 | if (0 <= (matchEnd = this. matchCharacterIterator (con, this.operations,↵ | |
6 | matchStart, 1, this.options)))↵ | 6 | matchStart, 1, this.options)))↵ | |
7 | break; | 7 |
| |
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 29 |
Number of mapped statements | 7 |
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.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
80 | int ch = target.charAt(matchStart); |
| 77 | int ch = target.setIndex(matchStart); | ||||||||||||||||
81 | if (REUtil.isHighSurrogate(ch) && matchStart + 1 < con.limit) | 78 | if (REUtil.isHighSurrogate(ch) && matchStart + 1 < con.limit) | |||||||||||||||||
82 | ch = REUtil.composeFromSurrogates(ch, target.charAt(matchStart + 1)); |
| 79 | ch = REUtil.composeFromSurrogates(ch, target.setIndex(matchStart + 1)); | ||||||||||||||||
83 | if (!range.match(ch)) | 80 | if (!range.match(ch)) | |||||||||||||||||
84 | continue; |
| 81 | continue; | ||||||||||||||||
85 | if (0 <= (matchEnd = this.matchString(con, this.operations, matchStart, 1, this.options))) |
| 82 | if (0 <= (matchEnd = this.matchCharacterIterator(con, this.operations, matchStart, 1, this.options))) | ||||||||||||||||
86 | break; |
| 83 | break; |
Row | Violation |
---|---|
1 | Expression target.setIndex(matchStart) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Type java.lang.String of variable target does not match with type java.text.CharacterIterator of variable target |
3 | Expression target.charAt(matchStart + 1) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression target.setIndex(matchStart + 1) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Type java.lang.String of variable target does not match with type java.text.CharacterIterator of variable target |
6 | Statement continue; without innermost loop |
7 | Statement continue; without innermost loop |
8 | Statement break; without innermost loop |
9 | Statement break; without innermost loop |