Source:
<code>private Metadata generateGroupMetadata( final Group group, final List<ArtifactStore> members, final List<StoreKey> contributingMembers, final String path ) throws IndyWorkflowException { if ( !canProcess( path ) ) { logger.error( "The path is not a metadata file: ", path ); return null; } String toMergePath = path; if ( !path.endsWith( MavenMetadataMerger.METADATA_NAME ) ) { toMergePath = normalize( normalize( parentPath( toMergePath ) ), MavenMetadataMerger.METADATA_NAME ); } Metadata meta = getMetaFromCache( group.getKey(), toMergePath ); if ( meta != null ) { return meta; } Metadata master = new Metadata(); master.setVersioning( new Versioning() ); MetadataIncrementalResult incrementalResult = new MetadataIncrementalResult( new HashSet<>( members ), Collections.emptySet(), master ); incrementalResult = mergeMissing( group, incrementalResult, toMergePath, "cached", this::retrieveCached ); contributingMembers.addAll( incrementalResult.merged ); incrementalResult = mergeMissing( group, incrementalResult, toMergePath, "downloaded", this::downloadMissing ); contributingMembers.addAll( incrementalResult.merged ); incrementalResult = mergeMissing( group, incrementalResult, toMergePath, "generated", this::generateMissing ); contributingMembers.addAll( incrementalResult.merged ); if ( metadataProviders != null ) { master = mergeProviderMetadata( group, incrementalResult.result, toMergePath ); } else { master = incrementalResult.result; } if ( !incrementalResult.missing.isEmpty() ) { logger.warn( "After download and generation attempts, metadata is still missing from the following stores: {}", incrementalResult.missing ); } List<String> versions = master.getVersioning().getVersions(); if ( versions != null && !versions.isEmpty() ) { merger.sortVersions( master ); } <START> return master; <END> }</code><technical_language>add a master.getPlugins!=null && !master.getPlugins.isEmpty return this master due metadata specification</technical_language>

Target:
private Metadata generateGroupMetadata( final Group group, final List<ArtifactStore> members, final List<StoreKey> contributingMembers, final String path ) throws IndyWorkflowException { if ( !canProcess( path ) ) { logger.error( "The path is not a metadata file: ", path ); return null; } String toMergePath = path; if ( !path.endsWith( MavenMetadataMerger.METADATA_NAME ) ) { toMergePath = normalize( normalize( parentPath( toMergePath ) ), MavenMetadataMerger.METADATA_NAME ); } Metadata meta = getMetaFromCache( group.getKey(), toMergePath ); if ( meta != null ) { return meta; } Metadata master = new Metadata(); master.setVersioning( new Versioning() ); MetadataIncrementalResult incrementalResult = new MetadataIncrementalResult( new HashSet<>( members ), Collections.emptySet(), master ); incrementalResult = mergeMissing( group, incrementalResult, toMergePath, "cached", this::retrieveCached ); contributingMembers.addAll( incrementalResult.merged ); incrementalResult = mergeMissing( group, incrementalResult, toMergePath, "downloaded", this::downloadMissing ); contributingMembers.addAll( incrementalResult.merged ); incrementalResult = mergeMissing( group, incrementalResult, toMergePath, "generated", this::generateMissing ); contributingMembers.addAll( incrementalResult.merged ); if ( metadataProviders != null ) { master = mergeProviderMetadata( group, incrementalResult.result, toMergePath ); } else { master = incrementalResult.result; } if ( !incrementalResult.missing.isEmpty() ) { logger.warn( "After download and generation attempts, metadata is still missing from the following stores: {}", incrementalResult.missing ); } List<String> versions = master.getVersioning().getVersions(); if ( versions != null && !versions.isEmpty() ) { merger.sortVersions( master ); return master; } List<Plugin> plugins = master.getPlugins(); if ( plugins != null && !plugins.isEmpty() ) { return master; } logger.error( "The group metadata generation is not successful for path: in group: {}", path, group ); return null; }