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 | if (RegularExpression.isSet(this.options, XMLSCHEMA_MODE)) {↵ | 1 | if (RegularExpression.isSet(this.options, XMLSCHEMA_MODE)) {↵ | |
2 | int matchEnd = this. matchCharArray (con, this.operations, con.start, 1, this.options);↵ | 2 | int matchEnd = this. matchCharacterIterator (con, this.operations, con.start, 1, this.options);↵ | |
3 | //System.err.println("DEBUG: matchEnd="+matchEnd);↵ | 3 | //System.err.println("DEBUG: matchEnd="+matchEnd);↵ | |
4 | if (matchEnd == con.limit) {↵ | 4 | if (matchEnd == con.limit) {↵ | |
5 | if (con.match != null) {↵ | 5 | if (con.match != null) {↵ | |
6 | con.match.setBeginning(0, con.start);↵ | 6 | con.match.setBeginning(0, con.start);↵ | |
7 | con.match.setEnd(0, matchEnd);↵ | 7 | con.match.setEnd(0, matchEnd);↵ | |
8 | }↵ | 8 | }↵ | |
9 | con.inuse = false;↵ | 9 | con.inuse = false;↵ | |
10 | return true;↵ | 10 | return true;↵ | |
11 | }↵ | 11 | }↵ | |
12 | return false;↵ | 12 | return false;↵ | |
13 | } | 13 |
| |
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 | 27 |
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) | 4.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
17 | if (RegularExpression.isSet(this.options, XMLSCHEMA_MODE)) | 19 | if (RegularExpression.isSet(this.options, XMLSCHEMA_MODE)) | |||||||||||
18 | int matchEnd = this.matchCharArray(con, this.operations, con.start, 1, this.options); |
| 20 | int matchEnd = this.matchCharacterIterator(con, this.operations, con.start, 1, this.options); | ||||||||||
19 | if (matchEnd == con.limit) | 21 | if (matchEnd == con.limit) | |||||||||||
20 | if (con.match != null) | 22 | if (con.match != null) | |||||||||||
21 | con.match.setBeginning(0, con.start); | 23 | con.match.setBeginning(0, con.start); | |||||||||||
22 | con.match.setEnd(0, matchEnd); | 24 | con.match.setEnd(0, matchEnd); | |||||||||||
23 | con.inuse = false; | 25 | con.inuse = false; | |||||||||||
24 | return true; |
| 26 | return true; | ||||||||||
25 | return false; |
| 27 | return false; |
Row | Violation |
---|---|
1 | Conditional return true; |
2 | Conditional return true; |
3 | Conditional return false; |
4 | Conditional return false; |