while( true )
{
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;
}
while( true )
{
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: 10
|
|
Number of AST nodes: 10
|
|
1 | while( true )↵ | | 1 | while( true )↵
|
2 | {↵ | | 2 | {↵
|
3 | yy = zz << 1;↵ | | 3 | yy = zz << 1;↵
|
4 | if( yy > nHeap )↵ | | 4 | if( yy > nHeap )↵
|
5 | {↵ | | 5 | {↵
|
6 | break;↵ | | 6 | break;↵
|
7 | }↵ | | 7 | }↵
|
8 | if( yy < nHeap &&↵ | | 8 | if( yy < nHeap &&↵
|
9 | weights[ heap[ yy + 1 ] ] < weights[ heap[ yy ] ] )↵ | | 9 | weights[ heap[ yy + 1 ] ] < weights[ heap[ yy ] ] )↵
|
10 | {↵ | | 10 | {↵
|
11 | yy++;↵ | | 11 | yy++;↵
|
12 | }↵ | | 12 | }↵
|
13 | if( weights[ tmp ] < weights[ heap[ yy ] ] )↵ | | 13 | if( weights[ tmp ] < weights[ heap[ yy ] ] )↵
|
14 | {↵ | | 14 | {↵
|
15 | break;↵ | | 15 | break;↵
|
16 | }↵ | | 16 | }↵
|
17 | heap[ zz ] = heap[ yy ];↵ | | 17 | heap[ zz ] = heap[ yy ];↵
|
18 | zz = yy;↵ | | 18 | zz = yy;↵
|
19 | } | | 19 | }
|
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) | 1.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 46 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 10 |
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.9 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
43 | while (true) | | 62 | while (true) |
44 | | | 63 | |
45 | | | 64 | |
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 | | | 70 | |
52 | | | 71 | |
Precondition Violations (0)
Row |
Violation |