yy = zz << 1;
if( yy > nHeap )
{
break;
}
if( yy < nHeap &&
weights[ heap[ yy + 1 ] ] < weights[ heap[ yy ] ] )
{
yy++;
}
if( weights[ tmp ] < weights[ heap[ yy ] ] )
{
break;
}
heap[ zz ] = heap[ yy ];
zz = yy;
yy = zz << 1;
if( yy > nHeap )
{
break;
}
if( yy < nHeap &&
weights[ heap[ yy + 1 ] ] < weights[ heap[ yy ] ] )
{
yy++;
}
if( weights[ tmp ] < weights[ heap[ yy ] ] )
{
break;
}
heap[ zz ] = heap[ yy ];
zz = yy;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/installer/CBZip2OutputStream.java
|
|
File path: /jEdit-4.2/src/installer/CBZip2OutputStream.java
|
Method name: void hbMakeCodeLengths(char[], int[], int, int)
|
|
Method name: void hbMakeCodeLengths(char[], int[], int, int)
|
Number of AST nodes: 9
|
|
Number of AST nodes: 9
|
|
1 | yy = zz << 1;↵ | | 1 | yy = zz << 1;↵
|
2 | if( yy > nHeap )↵ | | 2 | if( yy > nHeap )↵
|
3 | {↵ | | 3 | {↵
|
4 | break;↵ | | 4 | break;↵
|
5 | }↵ | | 5 | }↵
|
6 | if( yy < nHeap &&↵ | | 6 | if( yy < nHeap &&↵
|
7 | weights[ heap[ yy + 1 ] ] < weights[ heap[ yy ] ] )↵ | | 7 | weights[ heap[ yy + 1 ] ] < weights[ heap[ yy ] ] )↵
|
8 | {↵ | | 8 | {↵
|
9 | yy++;↵ | | 9 | yy++;↵
|
10 | }↵ | | 10 | }↵
|
11 | if( weights[ tmp ] < weights[ heap[ yy ] ] )↵ | | 11 | if( weights[ tmp ] < weights[ heap[ yy ] ] )↵
|
12 | {↵ | | 12 | {↵
|
13 | break;↵ | | 13 | break;↵
|
14 | }↵ | | 14 | }↵
|
15 | heap[ zz ] = heap[ yy ];↵ | | 15 | heap[ zz ] = heap[ yy ];↵
|
16 | zz = yy; | | 16 | zz = yy;
|
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) | 1.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 40 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 9 |
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) | 2.3 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
44 | yy = zz << 1; | | 63 | yy = zz << 1; |
45 | if (yy > nHeap) | | 64 | if (yy > nHeap) |
46 | | | 65 | |
47 | if (yy < nHeap && weights[heap[yy + 1]] < weights[heap[yy]]) | | 66 | if (yy < nHeap && weights[heap[yy + 1]] < weights[heap[yy]]) |
48 | | | 67 | |
49 | if (weights[tmp] < weights[heap[yy]]) | | 68 | if (weights[tmp] < weights[heap[yy]]) |
50 | | | 69 | |
51 | heap[zz] = heap[yy]; | | 70 | heap[zz] = heap[yy]; |
52 | zz = yy; | | 71 | zz = yy; |
Precondition Violations (5)
Row |
Violation |
1 | Statement break; without innermost loop |
2 | Statement break; without innermost loop |
3 | Statement break; without innermost loop |
4 | Statement break; without innermost loop |
5 | Clone fragment #1 returns variables zz, heap , while Clone fragment #2 returns variables zz, heap |