parent[nNodes] = -1;
nHeap++;
heap[nHeap] = nNodes;
tmp = 0;
zz = nHeap;
tmp = heap[zz];
final int weight_tmp = weight[tmp];
while (weight_tmp < weight[heap[zz >> 1]]) {
heap[zz] = heap[zz >> 1];
zz >>= 1;
}
heap[zz] = tmp;
parent[nNodes] = -1;
nHeap++;
heap[nHeap] = nNodes;
tmp = 0;
zz = nHeap;
tmp = heap[zz];
final int weight_tmp = weight[tmp];
while (weight_tmp < weight[heap[zz >> 1]]) {
heap[zz] = heap[zz >> 1];
zz >>= 1;
}
heap[zz] = tmp;
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 hbMakeCodeLengths(char[], int[], int, int)
|
|
Method name: void hbMakeCodeLengths(byte[], int[], Data, int, int)
|
Number of AST nodes: 11
|
|
Number of AST nodes: 11
|
|
1 | parent[nNodes] = -1;↵ | | 1 | parent[nNodes] = -1;↵
|
2 | nHeap++;↵ | | 2 | nHeap++;↵
|
3 | heap[nHeap] = nNodes;↵ | | 3 | heap[nHeap] = nNodes;↵
|
|
4 | tmp = 0;↵ | | 4 | tmp = 0;↵
|
5 | zz = nHeap;↵ | | 5 | zz = nHeap;↵
|
6 | tmp = heap[zz];↵ | | 6 | tmp = heap[zz];↵
|
7 | final int weight_tmp = weight[tmp];↵ | | 7 | final int weight_tmp = weight[tmp];↵
|
8 | while (weight_tmp < weight[heap[zz >> 1]]) {↵ | | 8 | while (weight_tmp < weight[heap[zz >> 1]]) {↵
|
9 | heap[zz] = heap[zz >> 1];↵ | | 9 | heap[zz] = heap[zz >> 1];↵
|
10 | zz >>= 1;↵ | | 10 | zz >>= 1;↵
|
11 | }↵ | | 11 | }↵
|
12 | heap[zz] = tmp; | | 12 | heap[zz] = tmp;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 88 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 11 |
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) | 22.4 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
63 | parent[nNodes] = -1; | | 63 | parent[nNodes] = -1; |
64 | nHeap++; | | 64 | nHeap++; |
65 | heap[nHeap] = nNodes; | | 65 | heap[nHeap] = nNodes; |
66 | tmp = 0; | | 66 | tmp = 0; |
67 | zz = nHeap; | | 67 | zz = nHeap; |
68 | tmp = heap[zz]; | | 68 | tmp = heap[zz]; |
69 | final int weight_tmp = weight[tmp]; | | 69 | final int weight_tmp = weight[tmp]; |
70 | while (weight_tmp < weight[heap[zz >> 1]]) | | 70 | while (weight_tmp < weight[heap[zz >> 1]]) |
71 | heap[zz] = heap[zz >> 1]; | | 71 | heap[zz] = heap[zz >> 1]; |
72 | | | 72 | |
73 | heap[zz] = tmp; | | 73 | heap[zz] = tmp; |
Precondition Violations (0)
Row |
Violation |