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 | {↵
|
6 | thech = (char)m_input.read();↵ | | 6 | thech = (char)m_input.read();↵
|
7 | }↵ | | 7 | ↵
|
8 | ↵ | | 8 | }↵
|
9 | catch( IOException e )↵ | | 9 | catch( IOException e )↵
|
10 | {↵ | | 10 | ↵
|
11 | ↵ | | 11 | {↵
|
12 | compressedStreamEOF();↵ | | 12 | compressedStreamEOF();↵
|
13 | }↵ | | 13 | ↵
|
14 | ↵ | | 14 | }↵
|
15 | if( thech == -1 )↵ | | 15 | if( thech == -1 )↵
|
16 | {↵ | | 16 | ↵
|
17 | ↵ | | 17 | {↵
|
18 | compressedStreamEOF();↵ | | 18 | compressedStreamEOF();↵
|
19 | }↵ | | 19 | ↵
|
20 | ↵ | | 20 | }↵
|
21 | zzi = thech;↵ | | 21 | zzi = thech;↵
|
22 | m_bsBuff = ( m_bsBuff << 8 ) | ( zzi & 0xff );↵ | | 22 | m_bsBuff = ( m_bsBuff << 8 ) | ( zzi & 0xff );↵
|
23 | 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) | 1.0 |
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) | 10.6 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
60 | int zzi; | | 26 | int zzi; |
61 | char thech = 0; | | 27 | char thech = 0; |
62 | try | | 28 | try |
63 | thech = (char)m_input.read(); | | 29 | thech = (char)m_input.read(); |
64 | if (thech == -1) | | 30 | if (thech == -1) |
65 | | | 31 | |
66 | zzi = thech; | | 32 | zzi = thech; |
67 | m_bsBuff = (m_bsBuff << 8) | (zzi & 0xff); | | 33 | m_bsBuff = (m_bsBuff << 8) | (zzi & 0xff); |
68 | m_bsLive += 8; | | 34 | m_bsLive += 8; |
Precondition Violations (0)
Row |
Violation |