CPD Results

The following document contains the results of PMD's CPD 4.1.

Duplications

File Line
org\apache\commons\compress\compressors\bzip2\BZip2InputStream.java 444
org\apache\commons\compress\compressors\bzip2\BZip2InputStream.java 509
                    zt = m_selector[ groupNo ];
                    zn = m_minLens[ zt ];
                    zvec = bsR( zn );
                    while( zvec > m_limit[ zt ][ zn ] )
                    {
                        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;
                    }

                    nextSym = m_perm[ zt ][ zvec - m_base[ zt ][ zn ] ];

File Line
org\apache\commons\compress\compressors\bzip2\BZip2OutputStream.java 244
org\apache\commons\compress\compressors\bzip2\BZip2OutputStream.java 274
                n2 = heap[ 1 ];
                heap[ 1 ] = heap[ nHeap ];
                nHeap--;
                {
                    int zz = 0;
                    int yy = 0;
                    int tmp = 0;
                    zz = 1;
                    tmp = heap[ zz ];
                    while( true )
                    {
                        yy = zz << 1;
                        if( yy > nHeap )
                        {
                            break;
                        }
                        if( yy < nHeap &&
                            weights[ heap[ yy + 1 ] ] < weights[ heap[ yy ] ] )
                        {
                            yy++;
                        }
                        if( weights[ tmp ] < weights[ heap[ yy ] ] )
                        {
                            break;
                        }
                        heap[ zz ] = heap[ yy ];
                        zz = yy;
                    }
                    heap[ zz ] = tmp;
                }

File Line
org\apache\commons\compress\compressors\bzip2\BZip2OutputStream.java 731
org\apache\commons\compress\compressors\bzip2\BZip2OutputStream.java 761
            c1 = m_block[ i1 + 1 ];
            c2 = m_block[ i2 + 1 ];
            if( c1 != c2 )
            {
                return ( c1 > c2 );
            }
            s1 = m_quadrant[ i1 ];
            s2 = m_quadrant[ i2 ];
            if( s1 != s2 )
            {
                return ( s1 > s2 );
            }
            i1++;
            i2++;

            c1 = m_block[ i1 + 1 ];
            c2 = m_block[ i2 + 1 ];
            if( c1 != c2 )
            {
                return ( c1 > c2 );
            }
            s1 = m_quadrant[ i1 ];
            s2 = m_quadrant[ i2 ];
            if( s1 != s2 )
            {
                return ( s1 > s2 );
            }
            i1++;
            i2++;

File Line
org\apache\commons\compress\archivers\zip\ZipOutputStream.java 550
org\apache\commons\compress\archivers\zip\ZipOutputStream.java 669
        if( entry.getMethod() == DEFLATED )
        {
            // requires version 2 as we are going to store length info
            // in the data descriptor
            out.write( ( new ZipShort( 20 ) ).getBytes() );

            // bit3 set to signal, we use a data descriptor
            out.write( ( new ZipShort( 8 ) ).getBytes() );
        }
        else
        {
            out.write( ( new ZipShort( 10 ) ).getBytes() );
            out.write( ZERO );
        }
        m_written += 4;

        // compression method
        out.write( ( new ZipShort( entry.getMethod() ) ).getBytes() );
        m_written += 2;

        // last mod. time and date
        out.write( toDosTime( new Date( entry.getTime() ) ).getBytes() );
        m_written += 4;

File Line
org\apache\commons\compress\compressors\bzip2\BZip2OutputStream.java 673
org\apache\commons\compress\compressors\bzip2\BZip2OutputStream.java 700
        c1 = m_block[ i1 + 1 ];
        c2 = m_block[ i2 + 1 ];
        if( c1 != c2 )
        {
            return ( c1 > c2 );
        }
        i1++;
        i2++;

        c1 = m_block[ i1 + 1 ];
        c2 = m_block[ i2 + 1 ];
        if( c1 != c2 )
        {
            return ( c1 > c2 );
        }
        i1++;
        i2++;

        c1 = m_block[ i1 + 1 ];
        c2 = m_block[ i2 + 1 ];
        if( c1 != c2 )
        {
            return ( c1 > c2 );
        }
        i1++;
        i2++;