for (int i = 0, lastShadow = this.last; i <= lastShadow; i++) {
if (fmap[i] == 0) {
this.origPtr = i;
break;
}
}
for (int i = offset; i < end; ++i) {
if (header[i] == 0) {
break;
}
result.append((char) header[i]);
}
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/tar/TarUtils.java
|
Method name: void blockSort()
|
|
Method name: StringBuffer parseName(byte[], int, int)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | for (int i = 0, lastShadow = this.last; i <= lastShadow; i++) {↵ | | 1 | for (int i = offset; i < end; ++i) {↵
|
2 | if (fmap[i] == 0) {↵ | | 2 | if (header[i] == 0) {↵
|
3 | this.origPtr = i;↵ | | 3 | break;↵
|
4 | ↵ | | 4 | }↵
|
|
5 | break;↵ | | 5 | ↵
|
6 | }↵ | | 6 | result.append((char) header[i]);↵
|
7 | } | | 7 | }
|
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 in different classes |
Number of node comparisons | 7 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.3 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
14 | if (fmap[i] == 0) | | 4 | if (header[i] == 0) |
15 | | | | |
16 | | | 5 | |
Precondition Violations (4)
Row |
Violation |
1 | Type int[] of variable fmap does not match with type byte[] of variable header |
2 | Unmatched statement this.origPtr=i; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Statement break; without innermost loop |
4 | Statement break; without innermost loop |