if( len[ k ][ i ] > maxLen )
{
maxLen = len[ k ][ i ];
}
if( len[ k ][ i ] < minLen )
{
minLen = len[ k ][ i ];
}
if( len[ t ][ i ] > maxLen )
{
maxLen = len[ t ][ i ];
}
if( len[ t ][ i ] < minLen )
{
minLen = len[ t ][ i ];
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/installer/CBZip2InputStream.java
|
|
File path: /jEdit-4.2/src/installer/CBZip2OutputStream.java
|
Method name: void recvDecodingTables()
|
|
Method name: void sendMTFValues()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if( len[ k ][ i ] > maxLen )↵ | | 1 | if( len[ t ][ i ] > maxLen )↵
|
2 | {↵ | | 2 | {↵
|
3 | maxLen = len[ k ][ i ];↵ | | 3 | maxLen = len[ t ][ i ];↵
|
4 | }↵ | | 4 | }↵
|
5 | if( len[ k ][ i ] < minLen )↵ | | 5 | if( len[ t ][ i ] < minLen )↵
|
6 | {↵ | | 6 | {↵
|
7 | minLen = len[ k ][ i ];↵ | | 7 | minLen = len[ t ][ i ];↵
|
8 | } | | 8 | }
|
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.8 |
Clones location | Clones are in different classes |
Number of node comparisons | 17 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 4 |
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.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
35 | if (len[k][i] > maxLen) | | 144 | if (len[t][i] > maxLen) |
36 | | | 145 | |
37 | if (len[k][i] < minLen) | | 146 | if (len[t][i] < minLen) |
38 | | | 147 | |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables maxLen, minLen , while Clone fragment #2 returns variables maxLen, minLen |