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: 9 | Number of AST nodes: 9 | |||
1 | boolean previousIsEOL = true;↵ | 1 | boolean previousIsEOL = true;↵ | |
2 | for (matchStart = con.start; matchStart <= limit; matchStart ++) {↵ | 2 | for (matchStart = con.start; matchStart <= limit; matchStart ++) {↵ | |
3 | int ch = target .charAt( matchStart ) ;↵ | 3 | int ch = target .setIndex( matchStart ) ;↵ | |
4 | if (isEOLChar(ch)) {↵ | 4 | if (isEOLChar(ch)) {↵ | |
5 | previousIsEOL = true;↵ | 5 | previousIsEOL = true;↵ | |
6 | } else {↵ | 6 | } else {↵ | |
7 | if (previousIsEOL) {↵ | 7 | if (previousIsEOL) {↵ | |
8 | if (0 <= (matchEnd = this. matchString (con, this.operations,↵ | 8 | if (0 <= (matchEnd = this. matchCharacterIterator (con, this.operations,↵ | |
9 | matchStart, 1, this.options)))↵ | 9 | matchStart, 1, this.options)))↵ | |
10 | break;↵ | 10 | break;↵ | |
11 | }↵ | 11 | }↵ | |
12 | previousIsEOL = false;↵ | 12 | previousIsEOL = false;↵ | |
13 | }↵ | 13 | }↵ | |
14 | } | 14 |
| |
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 | 20 |
Number of mapped statements | 9 |
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.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
53 | boolean previousIsEOL = true; | 50 | boolean previousIsEOL = true; | |||||||||||||||||
54 | for (matchStart = con.start; matchStart <= limit; matchStart++) | 51 | for (matchStart = con.start; matchStart <= limit; matchStart++) | |||||||||||||||||
55 | int ch = target.charAt(matchStart); |
| 52 | int ch = target.setIndex(matchStart); | ||||||||||||||||
56 | if (isEOLChar(ch)) | 53 | if (isEOLChar(ch)) | |||||||||||||||||
57 | previousIsEOL = true; | 54 | previousIsEOL = true; | |||||||||||||||||
else | else | |||||||||||||||||||
58 | if (previousIsEOL) | 55 | if (previousIsEOL) | |||||||||||||||||
59 | if (0 <= (matchEnd = this.matchString(con, this.operations, matchStart, 1, this.options))) |
| 56 | if (0 <= (matchEnd = this.matchCharacterIterator(con, this.operations, matchStart, 1, this.options))) | ||||||||||||||||
60 | break; | 57 | break; | |||||||||||||||||
61 | previousIsEOL = false; | 58 | previousIsEOL = false; |
Row | Violation |
---|---|
1 | Expression target.charAt(matchStart) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression target.setIndex(matchStart) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type java.lang.String of variable target does not match with type java.text.CharacterIterator of variable target |
4 | Expression this.matchString(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression this.matchCharacterIterator(con,this.operations,matchStart,1,this.options) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Clone fragment #1 returns variables matchEnd, matchStart , while Clone fragment #2 returns variables matchEnd, matchStart |