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(String, int, int, Match)
|
Method name: boolean matches(CharacterIterator, Match)
|
|||
Number of AST nodes: 16 | Number of AST nodes: 16 | |||
1 | synchronized (this) {↵ | 1 | synchronized (this) {↵ | |
2 | if (this.operations == null)↵ | 2 | if (this.operations == null)↵ | |
3 | this.prepare();↵ | 3 | this.prepare();↵ | |
4 | if (this.context == null)↵ | 4 | if (this.context == null)↵ | |
5 | this.context = new Context();↵ | 5 | this.context = new Context();↵ | |
6 | }↵ | 6 | }↵ | |
7 | Context con = null;↵ | 7 | Context con = null;↵ | |
8 | synchronized (this.context) {↵ | 8 | synchronized (this.context) {↵ | |
9 | con = this.context.inuse ? new Context() : this.context;↵ | 9 | con = this.context.inuse ? new Context() : this.context;↵ | |
10 | con.reset(target, start, end, this.numberOfClosures);↵ | 10 | con.reset(target, start, end, this.numberOfClosures);↵ | |
11 | }↵ | 11 | }↵ | |
12 | if (match != null) {↵ | 12 | if (match != null) {↵ | |
13 | match.setNumberOfGroups(this.nofparen);↵ | 13 | match.setNumberOfGroups(this.nofparen);↵ | |
14 | match.setSource(target);↵ | 14 | match.setSource(target);↵ | |
15 | } else if (this.hasBackReferences) {↵ | 15 | } else if (this.hasBackReferences) {↵ | |
16 | match = new Match();↵ | 16 | match = new Match();↵ | |
17 | match.setNumberOfGroups(this.nofparen);↵ | 17 | match.setNumberOfGroups(this.nofparen);↵ | |
18 | // Need not to call setSource() because↵ | 18 | // Need not to call setSource() because↵ | |
19 | // a caller can not access this match instance.↵ | 19 | // a caller can not access this match instance.↵ | |
20 | }↵ | 20 | }↵ | |
21 | con.match = match; | 21 |
| |
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.7 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 91 |
Number of mapped statements | 16 |
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) | 9.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | synchronized (this) | 3 | synchronized (this) | ||||||||||||
2 | if (this.operations == null) | 4 | if (this.operations == null) | ||||||||||||
3 | this.prepare(); | 5 | this.prepare(); | ||||||||||||
4 | if (this.context == null) | 6 | if (this.context == null) | ||||||||||||
5 | this.context = new Context(); | 7 | this.context = new Context(); | ||||||||||||
6 | Context con = null; | 8 | Context con = null; | ||||||||||||
7 | synchronized (this.context) | 9 | synchronized (this.context) | ||||||||||||
8 | con = this.context.inuse ? new Context() : this.context; | 10 | con = this.context.inuse ? new Context() : this.context; | ||||||||||||
9 | con.reset(target, start, end, this.numberOfClosures); |
| 11 | con.reset(target, start, end, this.numberOfClosures); | |||||||||||
10 | if (match != null) | 12 | if (match != null) | ||||||||||||
11 | match.setNumberOfGroups(this.nofparen); | 13 | match.setNumberOfGroups(this.nofparen); | ||||||||||||
12 | match.setSource(target); |
| 14 | match.setSource(target); | |||||||||||
13 | else if (this.hasBackReferences) | 15 | else if (this.hasBackReferences) | ||||||||||||
14 | match = new Match(); | 16 | match = new Match(); | ||||||||||||
15 | match.setNumberOfGroups(this.nofparen); | 17 | match.setNumberOfGroups(this.nofparen); | ||||||||||||
16 | con.match = match; | 18 | con.match = match; |
Row | Violation |
---|---|
1 | Type java.lang.String of variable target does not match with type java.text.CharacterIterator of variable target |
2 | Type java.lang.String of variable target does not match with type java.text.CharacterIterator of variable target |