CPD Results

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

Duplications

File Line
org/codehaus/plexus/util/xml/pull/MXParser.java 1805
org/codehaus/plexus/util/xml/pull/MXParser.java 1963
                    throw new XmlPullParserException( "expected start tag name and not " + printable( ch ), this,
                                                      null );
                }
            }
            else if ( isS( ch ) )
            {
                gotS = true;
                if ( normalizeIgnorableWS )
                {
                    if ( ch == '\r' )
                    {
                        normalizedCR = true;
                        // posEnd = pos -1;
                        // joinPC();
                        // posEnd is already set
                        if ( !usePC )
                        {
                            posEnd = pos - 1;
                            if ( posEnd > posStart )
                            {
                                joinPC();
                            }
                            else
                            {
                                usePC = true;
                                pcStart = pcEnd = 0;
                            }
                        }
                        // assert usePC == true;
                        if ( pcEnd >= pc.length )
                            ensurePC( pcEnd );
                        pc[pcEnd++] = '\n';
                    }
                    else if ( ch == '\n' )
                    {
                        if ( !normalizedCR && usePC )
                        {
                            if ( pcEnd >= pc.length )
                                ensurePC( pcEnd );
                            pc[pcEnd++] = '\n';
                        }
                        normalizedCR = false;
                    }
                    else
                    {
                        if ( usePC )
                        {
                            if ( pcEnd >= pc.length )
                                ensurePC( pcEnd );
                            pc[pcEnd++] = ch;
                        }
                        normalizedCR = false;
                    }
                }
            }
            else
            {
                throw new XmlPullParserException( "only whitespace content allowed before start tag and not "
File Line
org/codehaus/plexus/util/xml/pull/MXParser.java 2928
org/codehaus/plexus/util/xml/pull/MXParser.java 3076
                    seenDash = false;
                }
                if ( normalizeIgnorableWS )
                {
                    if ( ch == '\r' )
                    {
                        normalizedCR = true;
                        // posEnd = pos -1;
                        // joinPC();
                        // posEnd is alreadys set
                        if ( !usePC )
                        {
                            posEnd = pos - 1;
                            if ( posEnd > posStart )
                            {
                                joinPC();
                            }
                            else
                            {
                                usePC = true;
                                pcStart = pcEnd = 0;
                            }
                        }
                        // assert usePC == true;
                        if ( pcEnd >= pc.length )
                            ensurePC( pcEnd );
                        pc[pcEnd++] = '\n';
                    }
                    else if ( ch == '\n' )
                    {
                        if ( !normalizedCR && usePC )
                        {
                            if ( pcEnd >= pc.length )
                                ensurePC( pcEnd );
                            pc[pcEnd++] = '\n';
                        }
                        normalizedCR = false;
                    }
                    else
                    {
                        if ( usePC )
                        {
                            if ( pcEnd >= pc.length )
                                ensurePC( pcEnd );
                            pc[pcEnd++] = ch;
                        }
                        normalizedCR = false;
                    }
                }
File Line
org/codehaus/plexus/util/xml/pull/MXParser.java 1812
org/codehaus/plexus/util/xml/pull/MXParser.java 1969
org/codehaus/plexus/util/xml/pull/MXParser.java 2930
org/codehaus/plexus/util/xml/pull/MXParser.java 3375
                if ( normalizeIgnorableWS )
                {
                    if ( ch == '\r' )
                    {
                        normalizedCR = true;
                        // posEnd = pos -1;
                        // joinPC();
                        // posEnd is already set
                        if ( !usePC )
                        {
                            posEnd = pos - 1;
                            if ( posEnd > posStart )
                            {
                                joinPC();
                            }
                            else
                            {
                                usePC = true;
                                pcStart = pcEnd = 0;
                            }
                        }
                        // assert usePC == true;
                        if ( pcEnd >= pc.length )
                            ensurePC( pcEnd );
                        pc[pcEnd++] = '\n';
                    }
                    else if ( ch == '\n' )
                    {
                        if ( !normalizedCR && usePC )
                        {
                            if ( pcEnd >= pc.length )
                                ensurePC( pcEnd );
                            pc[pcEnd++] = '\n';
                        }
                        normalizedCR = false;
                    }
                    else
                    {
                        if ( usePC )
                        {
                            if ( pcEnd >= pc.length )
                                ensurePC( pcEnd );
                            pc[pcEnd++] = ch;
                        }
                        normalizedCR = false;
                    }
                }
            }
File Line
org/codehaus/plexus/util/xml/pull/MXParser.java 1812
org/codehaus/plexus/util/xml/pull/MXParser.java 1969
org/codehaus/plexus/util/xml/pull/MXParser.java 3078
org/codehaus/plexus/util/xml/pull/MXParser.java 3375
                if ( normalizeIgnorableWS )
                {
                    if ( ch == '\r' )
                    {
                        normalizedCR = true;
                        // posEnd = pos -1;
                        // joinPC();
                        // posEnd is already set
                        if ( !usePC )
                        {
                            posEnd = pos - 1;
                            if ( posEnd > posStart )
                            {
                                joinPC();
                            }
                            else
                            {
                                usePC = true;
                                pcStart = pcEnd = 0;
                            }
                        }
                        // assert usePC == true;
                        if ( pcEnd >= pc.length )
                            ensurePC( pcEnd );
                        pc[pcEnd++] = '\n';
                    }
                    else if ( ch == '\n' )
                    {
                        if ( !normalizedCR && usePC )
                        {
                            if ( pcEnd >= pc.length )
                                ensurePC( pcEnd );
                            pc[pcEnd++] = '\n';
                        }
                        normalizedCR = false;
                    }
                    else
                    {
                        if ( usePC )
                        {
                            if ( pcEnd >= pc.length )
                                ensurePC( pcEnd );
                            pc[pcEnd++] = ch;
                        }
                        normalizedCR = false;
                    }
                }
File Line
org/codehaus/plexus/util/xml/pull/MXParser.java 2941
org/codehaus/plexus/util/xml/pull/MXParser.java 3531
                            if ( posEnd > posStart )
                            {
                                joinPC();
                            }
                            else
                            {
                                usePC = true;
                                pcStart = pcEnd = 0;
                            }
                        }
                        // assert usePC == true;
                        if ( pcEnd >= pc.length )
                            ensurePC( pcEnd );
                        pc[pcEnd++] = '\n';
                    }
                    else if ( ch == '\n' )
                    {
                        if ( !normalizedCR && usePC )
                        {
                            if ( pcEnd >= pc.length )
                                ensurePC( pcEnd );
                            pc[pcEnd++] = '\n';
                        }
                        normalizedCR = false;
                    }
                    else
                    {
                        if ( usePC )
                        {
                            if ( pcEnd >= pc.length )
                                ensurePC( pcEnd );
                            pc[pcEnd++] = ch;
                        }
                        normalizedCR = false;
                    }
                }
            }

        }
        catch ( EOFException ex )
        {
            // detect EOF and create meaningful error ...
            throw new XmlPullParserException( "comment started on line " + curLine + " and column " + curColumn
File Line
org/codehaus/plexus/util/xml/pull/MXParser.java 1639
org/codehaus/plexus/util/xml/pull/MXParser.java 3528
                                posEnd = pos - 1;
                                // posEnd is already set
                                if ( !usePC )
                                {
                                    if ( posEnd > posStart )
                                    {
                                        joinPC();
                                    }
                                    else
                                    {
                                        usePC = true;
                                        pcStart = pcEnd = 0;
                                    }
                                }
                                // assert usePC == true;
                                if ( pcEnd >= pc.length )
                                    ensurePC( pcEnd );
                                pc[pcEnd++] = '\n';
                            }
                            else if ( ch == '\n' )
                            {
                                // if(!usePC) { joinPC(); } else { if(pcEnd >= pc.length) ensurePC(); }
                                if ( !normalizedCR && usePC )
                                {
                                    if ( pcEnd >= pc.length )
                                        ensurePC( pcEnd );
                                    pc[pcEnd++] = '\n';
                                }
                                normalizedCR = false;
                            }
                            else
                            {
                                if ( usePC )
                                {
                                    if ( pcEnd >= pc.length )
                                        ensurePC( pcEnd );
                                    pc[pcEnd++] = ch;
                                }
                                normalizedCR = false;
                            }
                        }
File Line
org/codehaus/plexus/util/xml/pull/MXParser.java 1643
org/codehaus/plexus/util/xml/pull/MXParser.java 3089
                                    if ( posEnd > posStart )
                                    {
                                        joinPC();
                                    }
                                    else
                                    {
                                        usePC = true;
                                        pcStart = pcEnd = 0;
                                    }
                                }
                                // assert usePC == true;
                                if ( pcEnd >= pc.length )
                                    ensurePC( pcEnd );
                                pc[pcEnd++] = '\n';
                            }
                            else if ( ch == '\n' )
                            {
                                // if(!usePC) { joinPC(); } else { if(pcEnd >= pc.length) ensurePC(); }
                                if ( !normalizedCR && usePC )
                                {
                                    if ( pcEnd >= pc.length )
                                        ensurePC( pcEnd );
                                    pc[pcEnd++] = '\n';
                                }
                                normalizedCR = false;
                            }
                            else
                            {
                                if ( usePC )
                                {
                                    if ( pcEnd >= pc.length )
                                        ensurePC( pcEnd );
                                    pc[pcEnd++] = ch;
                                }
                                normalizedCR = false;
                            }
                        }

                        ch = more();
                    }
File Line
org/codehaus/plexus/util/TypeFormat.java 141
org/codehaus/plexus/util/TypeFormat.java 197
            int limit = ( isNegative ) ? Short.MIN_VALUE : -Short.MAX_VALUE;
            int multmin = limit / radix;
            int length = chars.length();
            int i = ( isNegative || ( chars.charAt( 0 ) == '+' ) ) ? 1 : 0;
            while ( true )
            {
                int digit = Character.digit( chars.charAt( i ), radix );
                int tmp = result * radix;
                if ( ( digit < 0 ) || ( result < multmin ) || ( tmp < limit + digit ) )
                { // Overflow.
                    throw new NumberFormatException( "For input characters: \"" + chars.toString() + "\"" );
                }
                // Accumulates negatively.
                result = tmp - digit;
                if ( ++i >= length )
                {
                    break;
                }
            }
            return (short) ( isNegative ? result : -result );
File Line
org/codehaus/plexus/util/xml/pull/MXParser.java 1823
org/codehaus/plexus/util/xml/pull/MXParser.java 1980
org/codehaus/plexus/util/xml/pull/MXParser.java 3386
org/codehaus/plexus/util/xml/pull/MXParser.java 3531
                            if ( posEnd > posStart )
                            {
                                joinPC();
                            }
                            else
                            {
                                usePC = true;
                                pcStart = pcEnd = 0;
                            }
                        }
                        // assert usePC == true;
                        if ( pcEnd >= pc.length )
                            ensurePC( pcEnd );
                        pc[pcEnd++] = '\n';
                    }
                    else if ( ch == '\n' )
                    {
                        if ( !normalizedCR && usePC )
                        {
                            if ( pcEnd >= pc.length )
                                ensurePC( pcEnd );
                            pc[pcEnd++] = '\n';
                        }
                        normalizedCR = false;
                    }
                    else
                    {
                        if ( usePC )
                        {
                            if ( pcEnd >= pc.length )
                                ensurePC( pcEnd );
                            pc[pcEnd++] = ch;
                        }
                        normalizedCR = false;
                    }
                }
            }
File Line
org/codehaus/plexus/util/xml/pull/MXParser.java 1643
org/codehaus/plexus/util/xml/pull/MXParser.java 1823
org/codehaus/plexus/util/xml/pull/MXParser.java 1980
org/codehaus/plexus/util/xml/pull/MXParser.java 2941
org/codehaus/plexus/util/xml/pull/MXParser.java 3386
                                    if ( posEnd > posStart )
                                    {
                                        joinPC();
                                    }
                                    else
                                    {
                                        usePC = true;
                                        pcStart = pcEnd = 0;
                                    }
                                }
                                // assert usePC == true;
                                if ( pcEnd >= pc.length )
                                    ensurePC( pcEnd );
                                pc[pcEnd++] = '\n';
                            }
                            else if ( ch == '\n' )
                            {
                                // if(!usePC) { joinPC(); } else { if(pcEnd >= pc.length) ensurePC(); }
                                if ( !normalizedCR && usePC )
                                {
                                    if ( pcEnd >= pc.length )
                                        ensurePC( pcEnd );
                                    pc[pcEnd++] = '\n';
                                }
                                normalizedCR = false;
                            }
                            else
                            {
                                if ( usePC )
                                {
                                    if ( pcEnd >= pc.length )
                                        ensurePC( pcEnd );
                                    pc[pcEnd++] = ch;
                                }
                                normalizedCR = false;
                            }
                        }
File Line
org/codehaus/plexus/util/xml/pull/MXParser.java 3089
org/codehaus/plexus/util/xml/pull/MXParser.java 3531
                            if ( posEnd > posStart )
                            {
                                joinPC();
                            }
                            else
                            {
                                usePC = true;
                                pcStart = pcEnd = 0;
                            }
                        }
                        // assert usePC == true;
                        if ( pcEnd >= pc.length )
                            ensurePC( pcEnd );
                        pc[pcEnd++] = '\n';
                    }
                    else if ( ch == '\n' )
                    {
                        if ( !normalizedCR && usePC )
                        {
                            if ( pcEnd >= pc.length )
                                ensurePC( pcEnd );
                            pc[pcEnd++] = '\n';
                        }
                        normalizedCR = false;
                    }
                    else
                    {
                        if ( usePC )
                        {
                            if ( pcEnd >= pc.length )
                                ensurePC( pcEnd );
                            pc[pcEnd++] = ch;
                        }
                        normalizedCR = false;
                    }
                }