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: void subtractRanges(Token)
|
Method name: void intersectRanges(Token)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | if (tok.ranges == null || this.ranges == null)↵ | 1 | if (tok.ranges == null || this.ranges == null)↵ | |
2 | return;↵ | 2 | return;↵ | |
3 | this.icaseCache = null;↵ | 3 | this.icaseCache = null;↵ | |
4 | this.sortRanges();↵ | 4 | this.sortRanges();↵ | |
5 | this.compactRanges();↵ | 5 | this.compactRanges();↵ | |
6 | tok.sortRanges();↵ | 6 | tok.sortRanges();↵ | |
7 | tok.compactRanges();↵ | 7 | tok.compactRanges();↵ | |
8 | //System.err.println("Token#substractRanges(): Entry: "+this.ranges.length+", "+tok.ranges.length);↵ | |||
9 | int[] result = new int[this.ranges.length+tok.ranges.length];↵ | 8 | int[] result = new int[this.ranges.length+tok.ranges.length];↵ | |
10 | int wp = 0, src = 0, sub = 0; | 9 | int wp = 0, src1 = 0, src2 = 0; | |
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 | 31 |
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.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5 | if (tok.ranges == null || this.ranges == null) | 2 | if (tok.ranges == null || this.ranges == null) | ||||||||||||||
6 | return; |
| 3 | return; | |||||||||||||
7 | this.icaseCache = null; | 4 | this.icaseCache = null; | ||||||||||||||
8 | this.sortRanges(); | 5 | this.sortRanges(); | ||||||||||||||
9 | this.compactRanges(); | 6 | this.compactRanges(); | ||||||||||||||
10 | tok.sortRanges(); | 7 | tok.sortRanges(); | ||||||||||||||
11 | tok.compactRanges(); | 8 | tok.compactRanges(); | ||||||||||||||
12 | int[] result = new int[this.ranges.length + tok.ranges.length]; | 9 | int[] result = new int[this.ranges.length + tok.ranges.length]; | ||||||||||||||
13 | int wp = 0, src = 0, sub = 0; |
| 10 | int wp = 0, src1 = 0, src2 = 0; |
Row | Violation |
---|---|
1 | Conditional return; |
2 | Conditional return; |
3 | Clone fragment #1 returns variables src, sub, result, wp , while Clone fragment #2 returns variables src1, src2, result, wp |