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 matchCharArray(Context, Op, int, int, int)
|
Method name: int matchCharacterIterator(Context, Op, int, int, int)
|
|||
Number of AST nodes: 14 | Number of AST nodes: 14 | |||
1 | int id = op.getData();↵ | 1 | int id = op.getData();↵ | |
2 | if (id >= 0) {↵ | 2 | if (id >= 0) {↵ | |
3 | int previousOffset = con.offsets[id];↵ | 3 | int previousOffset = con.offsets[id];↵ | |
4 | if (previousOffset < 0 || previousOffset != offset) {↵ | 4 | if (previousOffset < 0 || previousOffset != offset) {↵ | |
5 | con.offsets[id] = offset;↵ | 5 | con.offsets[id] = offset;↵ | |
6 | } else {↵ | 6 | } else {↵ | |
7 | con.offsets[id] = -1;↵ | 7 | con.offsets[id] = -1;↵ | |
8 | op = op.next;↵ | 8 | op = op.next;↵ | |
9 | break;↵ | 9 | break;↵ | |
10 | }↵ | 10 | }↵ | |
11 | }↵ | 11 | }↵ | |
12 | ↵ | |||
12 | int ret = this. matchCharArray (con, op.getChild(), offset, dx, opts);↵ | 13 | int ret = this. matchCharacterIterator (con, op.getChild(), offset, dx, opts);↵ | |
13 | if (id >= 0) con.offsets[id] = -1;↵ | 14 | if (id >= 0) con.offsets[id] = -1;↵ | |
14 | if (ret >= 0) return ret;↵ | 15 | if (ret >= 0) return ret;↵ | |
15 | op = op.next; | 16 |
| |
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.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 55 |
Number of mapped statements | 14 |
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) | 57.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
208 | int id = op.getData(); | 208 | int id = op.getData(); | |||||||||||||
209 | if (id >= 0) | 209 | if (id >= 0) | |||||||||||||
210 | int previousOffset = con.offsets[id]; | 210 | int previousOffset = con.offsets[id]; | |||||||||||||
211 | if (previousOffset < 0 || previousOffset != offset) | 211 | if (previousOffset < 0 || previousOffset != offset) | |||||||||||||
212 | con.offsets[id] = offset; | 212 | con.offsets[id] = offset; | |||||||||||||
else | else | |||||||||||||||
213 | con.offsets[id] = -1; | 213 | con.offsets[id] = -1; | |||||||||||||
214 | op = op.next; | 214 | op = op.next; | |||||||||||||
215 | break; | 215 | break; | |||||||||||||
216 | int ret = this.matchCharArray(con, op.getChild(), offset, dx, opts); |
| 216 | int ret = this.matchCharacterIterator(con, op.getChild(), offset, dx, opts); | ||||||||||||
217 | if (id >= 0) | 217 | if (id >= 0) | |||||||||||||
218 | con.offsets[id] = -1; | 218 | con.offsets[id] = -1; | |||||||||||||
219 | if (ret >= 0) | 219 | if (ret >= 0) | |||||||||||||
220 | return ret; | 220 | return ret; | |||||||||||||
221 | op = op.next; | 221 | op = op.next; |
Row | Violation |
---|---|
1 | Expression this.matchCharArray(con,op.getChild(),offset,dx,opts) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression this.matchCharacterIterator(con,op.getChild(),offset,dx,opts) cannot be parameterized, because it has dependencies to/from statements that will be extracted |