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(char[], int, int, Match)
|
Method name: boolean matches(CharacterIterator, Match)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | int o = this.fixedStringTable.matches(target, con.start, con.limit);↵ | 1 | int o = this.fixedStringTable.matches(target, con.start, con.limit);↵ | |
2 | if (o >= 0) {↵ | 2 | if (o >= 0) {↵ | |
3 | if (con.match != null) {↵ | 3 | if (con.match != null) {↵ | |
4 | con.match.setBeginning(0, o);↵ | 4 | con.match.setBeginning(0, o);↵ | |
5 | con.match.setEnd(0, o+this.fixedString.length());↵ | 5 | con.match.setEnd(0, o+this.fixedString.length());↵ | |
6 | }↵ | 6 | }↵ | |
7 | con.inuse = false;↵ | 7 | con.inuse = false;↵ | |
8 | return true;↵ | 8 | return true;↵ | |
9 | }↵ | 9 | }↵ | |
10 | con.inuse = false;↵ | 10 | con.inuse = false;↵ | |
11 | return false; | 11 |
| |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 28 |
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.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
27 | int o = this.fixedStringTable.matches(target, con.start, con.limit); |
| 29 | int o = this.fixedStringTable.matches(target, con.start, con.limit); | |||||||||||
28 | if (o >= 0) | 30 | if (o >= 0) | ||||||||||||
29 | if (con.match != null) | 31 | if (con.match != null) | ||||||||||||
30 | con.match.setBeginning(0, o); | 32 | con.match.setBeginning(0, o); | ||||||||||||
31 | con.match.setEnd(0, o + this.fixedString.length()); | 33 | con.match.setEnd(0, o + this.fixedString.length()); | ||||||||||||
32 | con.inuse = false; | 34 | con.inuse = false; | ||||||||||||
33 | return true; |
| 35 | return true; | |||||||||||
34 | con.inuse = false; | 36 | con.inuse = false; | ||||||||||||
35 | return false; |
| 37 | return false; |
Row | Violation |
---|---|
1 | Type char[] of variable target does not match with type java.text.CharacterIterator of variable target |
2 | Conditional return true; |
3 | Conditional return true; |
4 | Conditional return false; |
5 | Conditional return false; |