code: private String getRemoteRepositoryName( URL url ) throws IndyDataException
      {
          final String name = repoCreator.formatId( url.getHost(), getPort( url ), 0, null, StoreType.remote );
  
          logger.debug( "Looking for remote repo starts with name: {}", name );
  
          AbstractProxyRepositoryCreator abstractProxyRepositoryCreator = null;
          if ( repoCreator instanceof AbstractProxyRepositoryCreator )
          {
              abstractProxyRepositoryCreator = (AbstractProxyRepositoryCreator) repoCreator;
          }
  
          if ( abstractProxyRepositoryCreator == null )
          {
              return name;
          }
  
          Predicate<ArtifactStore> filter = abstractProxyRepositoryCreator.getNameFilter( name );
          List<String> l = storeManager.query()
                                       .packageType( GENERIC_PKG_KEY )
                                       .storeType( RemoteRepository.class )
                                       .stream( filter )
                                       .map( repository -> repository.getName() )
                                       .collect( Collectors.toList() );
  
          if ( l.isEmpty() )
          {
              return name;
          }
          return abstractProxyRepositoryCreator.getNextName( l );
      }
docs: if repo with this name already exists, we need to use a different name