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(byte[], int[], Data, int, int)
|
Method name: void hbMakeCodeLengths(byte[], int[], Data, int, int)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 11 | |||
1 | tmp = heap[1];↵ | |||
2 | while (true) {↵ | 1 | while (true) {↵ | |
3 | yy = zz << 1;↵ | 2 | yy = zz << 1;↵ | |
4 | if (yy > nHeap) {↵ | 3 | if (yy > nHeap) {↵ | |
5 | break;↵ | 4 | break;↵ | |
6 | }↵ | 5 | }↵ | |
7 | if ((yy < nHeap)↵ | 6 | if ((yy < nHeap)↵ | |
8 | && (weight[heap[yy + 1]] < weight[heap[yy]])) {↵ | 7 | && (weight[heap[yy + 1]] < weight[heap[yy]])) {↵ | |
9 | yy++;↵ | 8 | yy++;↵ | |
10 | }↵ | 9 | }↵ | |
11 | if (weight[tmp] < weight[heap[yy]]) {↵ | 10 | if (weight[tmp] < weight[heap[yy]]) {↵ | |
12 | break;↵ | 11 | break;↵ | |
13 | }↵ | 12 | }↵ | |
14 | heap[zz] = heap[yy];↵ | 13 | heap[zz] = heap[yy];↵ | |
15 | zz = yy;↵ | 14 | zz = yy;↵ | |
16 | }↵ | 15 | }↵ | |
17 | heap[zz] = tmp; | 16 |
| |
See real code fragment | See real code fragment |
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) | 1.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 41 |
Number of mapped statements | 11 |
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) | 14.5 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
46 | tmp = heap[1]; | | ||
47 | while (true) | 30 | while (true) | |
48 | yy = zz << 1; | 31 | yy = zz << 1; | |
49 | if (yy > nHeap) | 32 | if (yy > nHeap) | |
50 | break; | 33 | break; | |
51 | if ((yy < nHeap) && (weight[heap[yy + 1]] < weight[heap[yy]])) | 34 | if ((yy < nHeap) && (weight[heap[yy + 1]] < weight[heap[yy]])) | |
52 | yy++; | 35 | yy++; | |
53 | if (weight[tmp] < weight[heap[yy]]) | 36 | if (weight[tmp] < weight[heap[yy]]) | |
54 | break; | 37 | break; | |
55 | heap[zz] = heap[yy]; | 38 | heap[zz] = heap[yy]; | |
56 | zz = yy; | 39 | zz = yy; | |
57 | heap[zz] = tmp; | 40 | heap[zz] = tmp; |
Row | Violation |
---|