CPD Results
The following document contains the results of PMD's CPD 6.46.0.
Duplications
File |
Line |
org/codehaus/plexus/util/xml/pull/MXParser.java |
1875 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
2033 |
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 |
3034 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
3546 |
}
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 |
1882 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
2039 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
3035 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
3547 |
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 |
3034 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
3209 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
3546 |
}
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 |
1882 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
2039 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
3210 |
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 |
3046 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
3759 |
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 |
1698 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
3756 |
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/TypeFormat.java |
139 |
org/codehaus/plexus/util/TypeFormat.java |
195 |
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 |
1893 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
2050 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
3558 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
3759 |
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 |
1702 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
1893 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
2050 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
3046 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
3221 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
3558 |
org/codehaus/plexus/util/xml/pull/MXParser.java |
3759 |
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;
}
} |