if( m_inUse[ i ] )
{
m_seqToUnseq[ m_nInUse ] = (char)i;
m_unseqToSeq[ i ] = (char)m_nInUse;
m_nInUse++;
}
if( m_inUse[ i ] )
{
m_seqToUnseq[ m_nInUse ] = (char)i;
m_unseqToSeq[ i ] = (char)m_nInUse;
m_nInUse++;
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/installer/CBZip2OutputStream.java
|
|
File path: /jEdit-4.2/src/installer/CBZip2InputStream.java
|
Method name: void makeMaps()
|
|
Method name: void makeMaps()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if( m_inUse[ i ] )↵ | | 1 | if( m_inUse[ i ] )↵
|
2 | {↵ | | 2 | {↵
|
3 | m_seqToUnseq[ m_nInUse ] = (char)i;↵ | | 3 | m_seqToUnseq[ m_nInUse ] = (char)i;↵
|
4 | m_unseqToSeq[ i ] = (char)m_nInUse;↵ | | 4 | m_unseqToSeq[ i ] = (char)m_nInUse;↵
|
5 | m_nInUse++;↵ | | 5 | m_nInUse++;↵
|
6 | } | | 6 | }
|
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.4 |
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.6 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
4 | if (m_inUse[i]) | | 3 | if (m_inUse[i]) |
5 | m_seqToUnseq[m_nInUse] = (char)i; | | 4 | m_seqToUnseq[m_nInUse] = (char)i; |
6 | m_unseqToSeq[i] = (char)m_nInUse; | | 5 | m_unseqToSeq[i] = (char)m_nInUse; |
7 | | | 6 | |
Precondition Violations (1)
Row |
Violation |
1 | The refactoring of the clones is infeasible, because classes installer.CBZip2OutputStream and installer.CBZip2InputStream do not have a common superclass |