c1 = m_block[ i1 + 1 ];
c2 = m_block[ i2 + 1 ];
if( c1 != c2 )
{
return ( c1 > c2 );
}
s1 = m_quadrant[ i1 ];
s2 = m_quadrant[ i2 ];
if( s1 != s2 )
{
return ( s1 > s2 );
}
i1++;
i2++;
c1 = m_block[ i1 + 1 ];
c2 = m_block[ i2 + 1 ];
if( c1 != c2 )
{
return ( c1 > c2 );
}
s1 = m_quadrant[ i1 ];
s2 = m_quadrant[ i2 ];
if( s1 != s2 )
{
return ( s1 > s2 );
}
i1++;
i2++;
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: boolean fullGtU(int, int)
|
|
Method name: boolean fullGtU(int, int)
|
Number of AST nodes: 10
|
|
Number of AST nodes: 10
|
|
1 | c1 = m_block[ i1 + 1 ];↵ | | 1 | c1 = m_block[ i1 + 1 ];↵
|
2 | c2 = m_block[ i2 + 1 ];↵ | | 2 | c2 = m_block[ i2 + 1 ];↵
|
3 | if( c1 != c2 )↵ | | 3 | if( c1 != c2 )↵
|
4 | {↵ | | 4 | {↵
|
5 | return ( c1 > c2 );↵ | | 5 | return ( c1 > c2 );↵
|
6 | }↵ | | 6 | }↵
|
7 | s1 = m_quadrant[ i1 ];↵ | | 7 | s1 = m_quadrant[ i1 ];↵
|
8 | s2 = m_quadrant[ i2 ];↵ | | 8 | s2 = m_quadrant[ i2 ];↵
|
9 | if( s1 != s2 )↵ | | 9 | if( s1 != s2 )↵
|
10 | {↵ | | 10 | {↵
|
11 | return ( s1 > s2 );↵ | | 11 | return ( s1 > s2 );↵
|
12 | }↵ | | 12 | }↵
|
13 | i1++;↵ | | 13 | i1++;↵
|
14 | i2++; | | 14 | i2++;
|
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.6 |
Clones location | Clones are in the same method |
Number of node comparisons | 50 |
-
{Non-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) | 3.0 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
53 | c1 = m_block[i1 + 1]; | | 73 | c1 = m_block[i1 + 1]; |
54 | c2 = m_block[i2 + 1]; | | 74 | c2 = m_block[i2 + 1]; |
55 | if (c1 != c2) | | 75 | if (c1 != c2) |
56 | | | 76 | |
57 | s1 = m_quadrant[i1]; | | 77 | s1 = m_quadrant[i1]; |
58 | s2 = m_quadrant[i2]; | | 78 | s2 = m_quadrant[i2]; |
59 | if (s1 != s2) | | 79 | if (s1 != s2) |
60 | | | 80 | |
61 | i1++; | | 81 | i1++; |
62 | i2++; | | 82 | i2++; |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables i1, i2 , while Clone fragment #2 returns variables i1, i2 |