Program: 20729
Project: 20729
Buggy source:
public boolean merge(String repoId,boolean skipConflicts) throws Exception {
  String stagingId=repoId + STAGE;
  ManagedRepositoryConfiguration repoConfig;
  ManagedRepositoryConfiguration stagingConfig;
  Configuration config=archivaConfiguration.getConfiguration();
  repoConfig=config.findManagedRepositoryById(repoId);
  if (repoConfig != null) {
    stagingConfig=config.findManagedRepositoryById(stagingId);
    if (stagingConfig != null) {
      List<ArtifactMetadata> sourceArtifacts=metadataRepository.getArtifacts(stagingId);
      if (repoConfig.isReleases() && !repoConfig.isSnapshots()) {
        if (skipConflicts) {
          List<ArtifactMetadata> conflicts=repositoryMerger.getConflictingArtifacts(stagingId,stagingId);
          sourceArtifacts.removeAll(conflicts);
          mergeWithOutSnapshots(sourceArtifacts,stagingId,repoId);
        }
 else {
          mergeWithOutSnapshots(sourceArtifacts,stagingId,repoId);
        }
      }
 else {
        if (skipConflicts) {
          List<ArtifactMetadata> conflicts=repositoryMerger.getConflictingArtifacts(stagingId,stagingId);
          sourceArtifacts.removeAll(conflicts);
          Filter<ArtifactMetadata> artifactsWithOutConflicts=new IncludesFilter<ArtifactMetadata>(sourceArtifacts);
          repositoryMerger.merge(stagingId,repoId,artifactsWithOutConflicts);
        }
 else {
          repositoryMerger.merge(stagingId,repoId);
        }
      }
    }
 else {
      throw new Exception("String_Node_Str" + stagingId + "String_Node_Str");
    }
  }
 else {
    throw new Exception("String_Node_Str" + repoId + "String_Node_Str");
  }
  if (!repositoryTaskScheduler.isProcessingRepositoryTask(repoId)) {
    RepositoryTask task=new RepositoryTask();
    task.setRepositoryId(repoId);
    repositoryTaskScheduler.queueTask(task);
  }
  AuditEvent event=createAuditEvent(repoConfig);
  metadataRepository.addMetadataFacet(event.getRepositoryId(),event);
  auditListener.auditEvent(createAuditEvent(repoConfig));
  return true;
}

Fixed version (ground truth):
public boolean merge(String repoId,boolean skipConflicts) throws Exception {
  String stagingId=repoId + STAGE;
  ManagedRepositoryConfiguration repoConfig;
  ManagedRepositoryConfiguration stagingConfig;
  Configuration config=archivaConfiguration.getConfiguration();
  repoConfig=config.findManagedRepositoryById(repoId);
  log.debug("String_Node_Str" + repoId + "String_Node_Str");
  if (repoConfig != null) {
    stagingConfig=config.findManagedRepositoryById(stagingId);
    if (stagingConfig != null) {
      List<ArtifactMetadata> sourceArtifacts=metadataRepository.getArtifacts(stagingId);
      if (repoConfig.isReleases() && !repoConfig.isSnapshots()) {
        log.info("String_Node_Str");
        if (skipConflicts) {
          List<ArtifactMetadata> conflicts=repositoryMerger.getConflictingArtifacts(repoId,stagingId);
          log.debug("String_Node_Str");
          for (          ArtifactMetadata metadata : conflicts) {
            log.debug(metadata.getNamespace() + "String_Node_Str" + metadata.getProject()+ "String_Node_Str"+ metadata.getProjectVersion());
          }
          sourceArtifacts.removeAll(conflicts);
          log.debug("String_Node_Str" + sourceArtifacts.size());
          mergeWithOutSnapshots(sourceArtifacts,stagingId,repoId);
        }
 else {
          log.debug("String_Node_Str" + sourceArtifacts.size());
          mergeWithOutSnapshots(sourceArtifacts,stagingId,repoId);
        }
      }
 else {
        log.info("String_Node_Str");
        if (skipConflicts) {
          List<ArtifactMetadata> conflicts=repositoryMerger.getConflictingArtifacts(repoId,stagingId);
          log.debug("String_Node_Str");
          for (          ArtifactMetadata metadata : conflicts) {
            log.debug(metadata.getNamespace() + "String_Node_Str" + metadata.getProject()+ "String_Node_Str"+ metadata.getProjectVersion());
          }
          sourceArtifacts.removeAll(conflicts);
          log.debug("String_Node_Str" + sourceArtifacts.size());
          Filter<ArtifactMetadata> artifactsWithOutConflicts=new IncludesFilter<ArtifactMetadata>(sourceArtifacts);
          repositoryMerger.merge(stagingId,repoId,artifactsWithOutConflicts);
          log.info("String_Node_Str" + stagingId + "String_Node_Str"+ repoId+ "String_Node_Str");
        }
 else {
          repositoryMerger.merge(stagingId,repoId);
          log.info("String_Node_Str" + stagingId + "String_Node_Str"+ repoId+ "String_Node_Str");
        }
      }
    }
 else {
      throw new Exception("String_Node_Str" + stagingId + "String_Node_Str");
    }
  }
 else {
    throw new Exception("String_Node_Str" + repoId + "String_Node_Str");
  }
  if (!repositoryTaskScheduler.isProcessingRepositoryTask(repoId)) {
    RepositoryTask task=new RepositoryTask();
    task.setRepositoryId(repoId);
    repositoryTaskScheduler.queueTask(task);
  }
  AuditEvent event=createAuditEvent(repoConfig);
  metadataRepository.addMetadataFacet(event.getRepositoryId(),event);
  auditListener.auditEvent(createAuditEvent(repoConfig));
  return true;
}