CPD Results
The following document contains the results of PMD's CPD 4.2.5.
Duplications
File | Line |
---|
org/sonatype/aether/util/graph/manager/ClassicDependencyManager.java | 256 |
org/sonatype/aether/util/graph/transformer/ConflictMarker.java | 250 |
}
@Override
public boolean equals( Object obj )
{
if ( obj == this )
{
return true;
}
else if ( !( obj instanceof Key ) )
{
return false;
}
Key that = (Key) obj;
return artifact.getArtifactId().equals( that.artifact.getArtifactId() )
&& artifact.getGroupId().equals( that.artifact.getGroupId() )
&& artifact.getExtension().equals( that.artifact.getExtension() )
&& artifact.getClassifier().equals( that.artifact.getClassifier() );
}
@Override
public int hashCode()
{ |
File | Line |
---|
org/sonatype/aether/util/graph/transformer/JavaEffectiveScopeCalculator.java | 35 |
org/sonatype/aether/util/graph/transformer/NearestVersionConflictResolver.java | 39 |
implements DependencyGraphTransformer
{
public DependencyNode transformGraph( DependencyNode node, DependencyGraphTransformationContext context )
throws RepositoryException
{
List<?> sortedConflictIds = (List<?>) context.get( TransformationContextKeys.SORTED_CONFLICT_IDS );
if ( sortedConflictIds == null )
{
ConflictIdSorter sorter = new ConflictIdSorter();
sorter.transformGraph( node, context );
sortedConflictIds = (List<?>) context.get( TransformationContextKeys.SORTED_CONFLICT_IDS );
}
Map<?, ?> conflictIds = (Map<?, ?>) context.get( TransformationContextKeys.CONFLICT_IDS );
if ( conflictIds == null )
{
throw new RepositoryException( "conflict groups have not been identified" );
} |
File | Line |
---|
org/sonatype/aether/util/artifact/DefaultArtifact.java | 304 |
org/sonatype/aether/util/artifact/SubArtifact.java | 173 |
return new SubArtifact( mainArtifact, classifier, extension, file, properties );
}
public String getProperty( String key, String defaultValue )
{
String value = properties.get( key );
return ( value != null ) ? value : defaultValue;
}
public Map<String, String> getProperties()
{
return Collections.unmodifiableMap( properties );
}
public Artifact setProperties( Map<String, String> properties )
{
if ( this.properties.equals( properties ) || ( properties == null && this.properties.isEmpty() ) )
{
return this;
}
return new SubArtifact( mainArtifact, classifier, extension, properties, file ); |