c1 = m_block[ i1 + 1 ];
c2 = m_block[ i2 + 1 ];
if( c1 != c2 )
{
return ( c1 > c2 );
}
i1++;
i2++;
c1 = m_block[ i1 + 1 ];
c2 = m_block[ i2 + 1 ];
if( c1 != c2 )
{
return ( c1 > c2 );
}
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: 6
|
|
Number of AST nodes: 6
|
|
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 | i1++;↵ | | 7 | i1++;↵
|
8 | i2++; | | 8 | 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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 20 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 6 |
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) | 1.4 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
24 | c1 = m_block[i1 + 1]; | | 30 | c1 = m_block[i1 + 1]; |
25 | c2 = m_block[i2 + 1]; | | 31 | c2 = m_block[i2 + 1]; |
26 | if (c1 != c2) | | 32 | if (c1 != c2) |
27 | | | 33 | |
28 | i1++; | | 34 | i1++; |
29 | i2++; | | 35 | i2++; |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables i1, i2 , while Clone fragment #2 returns variables i1, i2 |