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: 12 | Number of AST nodes: 12 | |||
1 | Op.ConditionOp cop = (Op.ConditionOp)op;↵ | 1 | Op.ConditionOp cop = (Op.ConditionOp)op;↵ | |
2 | boolean matchp = false;↵ | 2 | boolean matchp = false;↵ | |
3 | if (cop.refNumber > 0) {↵ | 3 | if (cop.refNumber > 0) {↵ | |
4 | if (cop.refNumber >= this.nofparen)↵ | 4 | if (cop.refNumber >= this.nofparen)↵ | |
5 | throw new RuntimeException("Internal Error: Reference number must be more than zero: "+cop.refNumber);↵ | 5 | throw new RuntimeException("Internal Error: Reference number must be more than zero: "+cop.refNumber);↵ | |
6 | matchp = con.match.getBeginning(cop.refNumber) >= 0↵ | 6 | matchp = con.match.getBeginning(cop.refNumber) >= 0↵ | |
7 | && con.match.getEnd(cop.refNumber) >= 0;↵ | 7 | && con.match.getEnd(cop.refNumber) >= 0;↵ | |
8 | } else {↵ | 8 | } else {↵ | |
9 | matchp = 0 <= this. matchCharArray (con, cop.condition, offset, dx, opts);↵ | 9 | matchp = 0 <= this. matchCharacterIterator (con, cop.condition, offset, dx, opts);↵ | |
10 | }↵ | 10 | }↵ | |
11 | if (matchp) {↵ | 11 | if (matchp) {↵ | |
12 | op = cop.yes;↵ | 12 | op = cop.yes;↵ | |
13 | } else if (cop.no != null) {↵ | 13 | } else if (cop.no != null) {↵ | |
14 | op = cop.no;↵ | 14 | op = cop.no;↵ | |
15 | } else {↵ | 15 | } else {↵ | |
16 | op = cop.next;↵ | 16 | op = cop.next;↵ | |
17 | } | 17 |
| |
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 | 41 |
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) | 60.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
301 | Op.ConditionOp cop = (Op.ConditionOp)op; | 301 | Op.ConditionOp cop = (Op.ConditionOp)op; | |||||||||||||
302 | boolean matchp = false; | 302 | boolean matchp = false; | |||||||||||||
303 | if (cop.refNumber > 0) | 303 | if (cop.refNumber > 0) | |||||||||||||
304 | if (cop.refNumber >= this.nofparen) | 304 | if (cop.refNumber >= this.nofparen) | |||||||||||||
305 | throw new RuntimeException("Internal Error: Reference number must be more than zero: " + cop.refNumber); | 305 | throw new RuntimeException("Internal Error: Reference number must be more than zero: " + cop.refNumber); | |||||||||||||
306 | matchp = con.match.getBeginning(cop.refNumber) >= 0 && con.match.getEnd(cop.refNumber) >= 0; | 306 | matchp = con.match.getBeginning(cop.refNumber) >= 0 && con.match.getEnd(cop.refNumber) >= 0; | |||||||||||||
else | else | |||||||||||||||
307 | matchp = 0 <= this.matchCharArray(con, cop.condition, offset, dx, opts); |
| 307 | matchp = 0 <= this.matchCharacterIterator(con, cop.condition, offset, dx, opts); | ||||||||||||
308 | if (matchp) | 308 | if (matchp) | |||||||||||||
309 | op = cop.yes; | 309 | op = cop.yes; | |||||||||||||
310 | else if (cop.no != null) | 310 | else if (cop.no != null) | |||||||||||||
311 | op = cop.no; | 311 | op = cop.no; | |||||||||||||
else | else | |||||||||||||||
312 | op = cop.next; | 312 | op = cop.next; |
Row | Violation |
---|---|
1 | Expression this.matchCharArray(con,cop.condition,offset,dx,opts) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression this.matchCharacterIterator(con,cop.condition,offset,dx,opts) cannot be parameterized, because it has dependencies to/from statements that will be extracted |