result[wp++] = this.ranges[src++];
result[wp++] = this.ranges[src++];
while (src < this.ranges.length) {
result[wp++] = this.ranges[src++];
result[wp++] = this.ranges[src++];
}
Clone fragments detected by clone detection tool
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 subtractRanges(Token)
|
Number of AST nodes: 2
|
|
Number of AST nodes: 3
|
|
| | | 1 | while (src < this.ranges.length) {↵
|
1 | result[wp++] = this.ranges[src++];↵ | | 2 | result[wp++] = this.ranges[src++];↵
|
2 | result[wp++] = this.ranges[src++]; | | 3 | result[wp++] = this.ranges[src++];↵
|
| | | 4 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 4 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
20 | result[wp++] = this.ranges[src++]; | | 40 | result[wp++] = this.ranges[src++]; |
21 | result[wp++] = this.ranges[src++]; | | 40 | result[wp++] = this.ranges[src++]; |
| | | 41 | result[wp++] = this.ranges[src++]; |
Precondition Violations (2)
Row |
Violation |
1 | Unmatched statement result[wp++]=this.ranges[src++]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Clone fragment #1 returns variables src, wp, result , while Clone fragment #2 returns variables wp, src |