int ch = ( m_bsBuff >> 24 );
try
{
m_bsStream.write( ch );// write 8-bit
}
catch( IOException e )
{
throw e;
}
m_bsBuff <<= 8;
m_bsLive -= 8;
int ch = ( m_bsBuff >> 24 );
try
{
m_bsStream.write( ch );// write 8-bit
}
catch( IOException e )
{
throw e;
}
m_bsBuff <<= 8;
m_bsLive -= 8;
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 bsFinishedWithStream()
|
|
Method name: void bsW(int, int)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | int ch = ( m_bsBuff >> 24 );↵ | | 1 | int ch = ( m_bsBuff >> 24 );↵
|
2 | try↵ | | 2 | try↵
|
3 | {↵ | | 3 | {↵
|
4 | m_bsStream.write( ch );// write 8-bit↵ | | 4 | m_bsStream.write( ch );// write 8-bit↵
|
5 | }↵ | | 5 | }↵
|
6 | catch( IOException e )↵ | | 6 | catch( IOException e )↵
|
7 | {↵ | | 7 | {↵
|
8 | throw e;↵ | | 8 | throw e;↵
|
9 | }↵ | | 9 | }↵
|
10 | m_bsBuff <<= 8;↵ | | 10 | m_bsBuff <<= 8;↵
|
11 | m_bsLive -= 8; | | 11 | m_bsLive -= 8;
|
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) | 0.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 9 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 0.9 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | int ch = (m_bsBuff >> 24); | | 2 | int ch = (m_bsBuff >> 24); |
3 | try | | 3 | try |
4 | | | 4 | |
5 | m_bsBuff <<= 8; | | 5 | m_bsBuff <<= 8; |
6 | m_bsLive -= 8; | | 6 | m_bsLive -= 8; |
Precondition Violations (0)
Row |
Violation |