zn++; 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; } zj = ( m_bsBuff >> ( m_bsLive - 1 ) ) & 1; m_bsLive--; zvec = ( zvec << 1 ) | zj;
zn++; 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; } zj = ( m_bsBuff >> ( m_bsLive - 1 ) ) & 1; m_bsLive--; zvec = ( zvec << 1 ) | zj;
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: 14 Number of AST nodes: 14
1
zn++;
1
zn++;
2
            while( m_bsLive < 1 )
2
                        while( m_bsLive < 1 )
3
            {
3
            
4
            {
4
                int zzi;
5
                            int zzi;
5
                char thech = 0;
6
                            char thech = 0;
6
                try
7
                
7
                {
8
            try
9
                            {
8
                    thech = (char)m_input.read();
10
                                thech = (char)m_input.read();
9
                }
11
                
12
            }
10
                catch( IOException e )
13
                            catch( IOException e )
11
                {
14
                
15
            {
12
                    compressedStreamEOF();
16
                                compressedStreamEOF();
13
                }
17
                       
18
     }
14
                if( thech == -1 )
19
                            if( thech == -1 )
15
                {
20
                
21
            {
16
                    compressedStreamEOF();
22
                                compressedStreamEOF();
17
                }
23
                            }
18
                zzi = thech;
24
                            zzi = thech;
19
                m_bsBuff = ( m_bsBuff << 8 ) | ( zzi & 0xff );
25
                            m_bsBuff = ( m_bsBuff << 8 ) | ( zzi & 0xff );
20
                m_bsLive += 8;
26
                            m_bsLive += 8;
21
            }
27
              
28
          }
22
            zj = ( m_bsBuff >> ( m_bsLive - 1 ) ) & 1;
29
                        zj = ( m_bsBuff >> ( m_bsLive - 1 ) ) & 1;
23
            m_bsLive--;
30
            
31
            m_bsLive--;
24
            zvec = ( zvec << 1 ) | zj;
32
                        zvec = ( zvec << 1 ) | zj;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.7
Clones locationClones are in the same method
Number of node comparisons64
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements14
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)58.2
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    24
    zn++;
    58
    zn++;
    25
    while (m_bsLive < 1)
    59
    while (m_bsLive < 1)
    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
    compressedStreamEOF();
    65
    compressedStreamEOF();
    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;
    35
    zj = (m_bsBuff >> (m_bsLive - 1)) & 1;
    69
    zj = (m_bsBuff >> (m_bsLive - 1)) & 1;
    36
    m_bsLive--;
    70
    m_bsLive--;
    37
    zvec = (zvec << 1) | zj;
    71
    zvec = (zvec << 1) | zj;
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables zn, zvec , while Clone fragment #2 returns variables zn, zvec