CPD Results

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

Duplications

File Line
org\apache\maven\repository\internal\MavenAetherModule.java 46
org\apache\maven\repository\internal\MavenResolverModule.java 42
extends AbstractModule
{

    @Override
    protected void configure()
    {
        install( new AetherModule() );
        bind( ArtifactDescriptorReader.class ) //
        .to( DefaultArtifactDescriptorReader.class ).in( Singleton.class );
        bind( VersionResolver.class ) //
        .to( DefaultVersionResolver.class ).in( Singleton.class );
        bind( VersionRangeResolver.class ) //
        .to( DefaultVersionRangeResolver.class ).in( Singleton.class );
        bind( MetadataGeneratorFactory.class ).annotatedWith( Names.named( "snapshot" ) ) //
        .to( SnapshotMetadataGeneratorFactory.class ).in( Singleton.class );
        bind( MetadataGeneratorFactory.class ).annotatedWith( Names.named( "versions" ) ) //
        .to( VersionsMetadataGeneratorFactory.class ).in( Singleton.class );
        bind( ModelBuilder.class ) //
        .toInstance( new DefaultModelBuilderFactory().newInstance() );
    }

    @Provides
    @Singleton
    Set<MetadataGeneratorFactory> provideMetadataGeneratorFactories( @Named( "snapshot" )
                                                                     MetadataGeneratorFactory snapshot,
                                                                     @Named( "versions" )
                                                                     MetadataGeneratorFactory versions )
    {
        Set<MetadataGeneratorFactory> factories = new HashSet<>();