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