int zzi;
char thech = 0;
try
{
thech = (char)m_input.read();
}
catch( IOException e )
{
compressedStreamEOF();
}
if( thech == -1 )
{
compressedStreamEOF();
}
zzi = thech;
m_bsBuff = ( m_bsBuff << 8 ) | ( zzi & 0xff );
m_bsLive += 8;
int zzi;
char thech = 0;
try
{
thech = (char)m_input.read();
}
catch( IOException e )
{
compressedStreamEOF();
}
if( thech == -1 )
{
compressedStreamEOF();
}
zzi = thech;
m_bsBuff = ( m_bsBuff << 8 ) | ( zzi & 0xff );
m_bsLive += 8;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/installer/CBZip2InputStream.java
|
|
File path: /jEdit-4.2/src/installer/CBZip2InputStream.java
|
Method name: void getAndMoveToFrontDecode()
|
|
Method name: void getAndMoveToFrontDecode()
|
Number of AST nodes: 9
|
|
Number of AST nodes: 9
|
|
1 | int zzi;↵ | | 1 | int zzi;↵
|
2 | char thech = 0;↵ | | 2 | char thech = 0;↵
|
3 | try↵ | | 3 | try↵
|
4 | {↵ | | 4 | ↵
|
| | | 5 | {↵
|
5 | thech = (char)m_input.read();↵ | | 6 | thech = (char)m_input.read();↵
|
6 | }↵ | | 7 | ↵
|
| | | 8 | }↵
|
7 | catch( IOException e )↵ | | 9 | catch( IOException e )↵
|
8 | {↵ | | 10 | ↵
|
| | | 11 | {↵
|
9 | compressedStreamEOF();↵ | | 12 | compressedStreamEOF();↵
|
10 | }↵ | | 13 | ↵
|
| | | 14 | }↵
|
11 | if( thech == -1 )↵ | | 15 | if( thech == -1 )↵
|
12 | {↵ | | 16 | ↵
|
| | | 17 | {↵
|
13 | compressedStreamEOF();↵ | | 18 | compressedStreamEOF();↵
|
14 | }↵ | | 19 | ↵
|
| | | 20 | }↵
|
15 | zzi = thech;↵ | | 21 | zzi = thech;↵
|
16 | m_bsBuff = ( m_bsBuff << 8 ) | ( zzi & 0xff );↵ | | 22 | m_bsBuff = ( m_bsBuff << 8 ) | ( zzi & 0xff );↵
|
17 | m_bsLive += 8; | | 23 | 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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 33 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 9 |
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) | 4.3 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
26 | int zzi; | | 60 | int zzi; |
27 | char thech = 0; | | 61 | char thech = 0; |
28 | try | | 62 | try |
29 | thech = (char)m_input.read(); | | 63 | thech = (char)m_input.read(); |
30 | if (thech == -1) | | 64 | if (thech == -1) |
31 | | | 65 | |
32 | zzi = thech; | | 66 | zzi = thech; |
33 | m_bsBuff = (m_bsBuff << 8) | (zzi & 0xff); | | 67 | m_bsBuff = (m_bsBuff << 8) | (zzi & 0xff); |
34 | m_bsLive += 8; | | 68 | m_bsLive += 8; |
Precondition Violations (0)
Row |
Violation |