while (ll_i != tmp) {
j++;
byte tmp2 = tmp;
tmp = pos[j];
pos[j] = tmp2;
}
while (ll_i != tmp) {
j++;
byte tmp2 = tmp;
tmp = yy[j];
yy[j] = tmp2;
}
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/bzip2/CBZip2OutputStream.java
|
|
File path: /apache-ant-1.7.0/src/org/apache/tools/bzip2/CBZip2OutputStream.java
|
Method name: void sendMTFValues2(int, int)
|
|
Method name: void generateMTFValues()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | while (ll_i != tmp) {↵ | | 1 | while (ll_i != tmp) {↵
|
2 | j++;↵ | | 2 | j++;↵
|
3 | byte tmp2 = tmp;↵ | | 3 | byte tmp2 = tmp;↵
|
4 | tmp = pos[j];↵ | | 4 | tmp = yy[j];↵
|
5 | pos[j] = tmp2;↵ | | 5 | yy[j] = tmp2;↵
|
6 | } | | 6 | }
|
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 33 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 1.3 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
9 | while (ll_i != tmp) | | 27 | while (ll_i != tmp) |
10 | | | 28 | |
11 | | | 29 | |
12 | | | 30 | |
13 | | | 31 | |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables tmp, j , while Clone fragment #2 returns variables tmp, j |