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 matchString(Context, Op, int, int, int)
|
Method name: int matchCharacterIterator(Context, Op, int, int, int)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (cop.refNumber > 0) {↵ | 1 | if (cop.refNumber > 0) {↵ | |
2 | if (cop.refNumber >= this.nofparen)↵ | 2 | if (cop.refNumber >= this.nofparen)↵ | |
3 | throw new RuntimeException("Internal Error: Reference number must be more than zero: "+cop.refNumber);↵ | 3 | throw new RuntimeException("Internal Error: Reference number must be more than zero: "+cop.refNumber);↵ | |
4 | matchp = con.match.getBeginning(cop.refNumber) >= 0↵ | 4 | matchp = con.match.getBeginning(cop.refNumber) >= 0↵ | |
5 | && con.match.getEnd(cop.refNumber) >= 0;↵ | 5 | && con.match.getEnd(cop.refNumber) >= 0;↵ | |
6 | } else {↵ | 6 | } else {↵ | |
7 | matchp = 0 <= this. matchString (con, cop.condition, offset, dx, opts);↵ | 7 | matchp = 0 <= this. matchCharacterIterator (con, cop.condition, offset, dx, opts);↵ | |
8 | } | 8 |
| |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 15 |
Number of mapped statements | 5 |
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) | 37.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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.matchString(con, cop.condition, offset, dx, opts); |
| 307 | matchp = 0 <= this.matchCharacterIterator(con, cop.condition, offset, dx, opts); |
Row | Violation |
---|---|
1 | Expression this.matchString(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 |