Program: 188740
Project: 188740
Buggy source:
@Override public Report execute(IndexService index,ModelService model,StorageService storage,List<TransferredResource> resources) throws PluginException {
  Report report=PluginHelper.createPluginReport(this);
  Report pluginReport;
  Map<String,Report> reports=new HashMap<>();
  aipIdToTransferredResourceId=new HashMap<>();
  Date startDate=new Date();
  String parentId=PluginHelper.getStringFromParameters(this,PARAMETER_PARENT_ID);
  boolean forceParentId=PluginHelper.getBooleanFromParameters(this,PARAMETER_FORCE_PARENT_ID);
  getParameterValues().put(RodaConstants.PLUGIN_PARAMS_PARENT_ID,parentId);
  getParameterValues().put(RodaConstants.PLUGIN_PARAMS_FORCE_PARENT_ID,forceParentId ? "String_Node_Str" : "String_Node_Str");
  pluginReport=transformTransferredResourceIntoAnAIP(index,model,storage,resources);
  reports=mergeReports(reports,pluginReport);
  List<AIP> aips=getAIPsFromReports(index,model,storage,reports);
  stepsCompleted=PluginHelper.updateJobStatus(this,index,model,stepsCompleted,totalSteps);
  createIngestStartedEvent(model,index,aipIdToTransferredResourceId,startDate);
  if (PluginHelper.verifyIfStepShouldBePerformed(this,PARAMETER_DO_VIRUS_CHECK)) {
    pluginReport=doVirusCheck(index,model,storage,aips);
    reports=mergeReports(reports,pluginReport);
    stepsCompleted=PluginHelper.updateJobStatus(this,index,model,stepsCompleted,totalSteps);
    aips=recalculateAIPsList(aips,reports,aipIdToTransferredResourceId);
  }
  if (PluginHelper.verifyIfStepShouldBePerformed(this,PARAMETER_DO_PDFTOPDFA_CONVERSION)) {
    Map<String,String> params=new HashMap<String,String>();
    params.put("String_Node_Str","String_Node_Str");
    pluginReport=doPDFtoPDFAConversion(index,model,storage,aips,params);
    reports=mergeReports(reports,pluginReport);
    stepsCompleted=PluginHelper.updateJobStatus(this,index,model,stepsCompleted,totalSteps);
  }
  if (PluginHelper.verifyIfStepShouldBePerformed(this,PARAMETER_DO_VERAPDF_CHECK)) {
    Map<String,String> params=new HashMap<String,String>();
    params.put("String_Node_Str","String_Node_Str");
    params.put("String_Node_Str","String_Node_Str");
    params.put("String_Node_Str","String_Node_Str");
    pluginReport=doVeraPDFCheck(index,model,storage,aips,params);
    reports=mergeReports(reports,pluginReport);
    stepsCompleted=PluginHelper.updateJobStatus(this,index,model,stepsCompleted,totalSteps);
  }
  pluginReport=createPremisSkeleton(index,model,storage,aips);
  reports=mergeReports(reports,pluginReport);
  stepsCompleted=PluginHelper.updateJobStatus(this,index,model,stepsCompleted,totalSteps);
  aips=recalculateAIPsList(aips,reports,aipIdToTransferredResourceId);
  pluginReport=verifyIfAipIsWellFormed(index,model,storage,aips);
  reports=mergeReports(reports,pluginReport);
  stepsCompleted=PluginHelper.updateJobStatus(this,index,model,stepsCompleted,totalSteps);
  aips=recalculateAIPsList(aips,reports,aipIdToTransferredResourceId);
  pluginReport=verifyProducerAuthorization(index,model,storage,aips);
  reports=mergeReports(reports,pluginReport);
  stepsCompleted=PluginHelper.updateJobStatus(this,index,model,stepsCompleted,totalSteps);
  aips=recalculateAIPsList(aips,reports,aipIdToTransferredResourceId);
  if (PluginHelper.verifyIfStepShouldBePerformed(this,PARAMETER_DO_FILE_FORMAT_IDENTIFICATION)) {
    pluginReport=doFileFormatIdentification(index,model,storage,aips);
    reports=mergeReports(reports,pluginReport);
    stepsCompleted=PluginHelper.updateJobStatus(this,index,model,stepsCompleted,totalSteps);
  }
  if (PluginHelper.verifyIfStepShouldBePerformed(this,PARAMETER_DO_METADATA_AND_FULL_TEXT_EXTRACTION)) {
    pluginReport=doMetadataAndFullTextExtraction(index,model,storage,aips);
    reports=mergeReports(reports,pluginReport);
    stepsCompleted=PluginHelper.updateJobStatus(this,index,model,stepsCompleted,totalSteps);
  }
  if (PluginHelper.verifyIfStepShouldBePerformed(this,PARAMETER_DO_AUTO_ACCEPT)) {
    pluginReport=doAutoAccept(index,model,storage,aips);
    reports=mergeReports(reports,pluginReport);
  }
  createIngestEndedEvent(model,index,aips,reports,aipIdToTransferredResourceId);
  return report;
}

Fixed version (ground truth):
@Override public Report execute(IndexService index,ModelService model,StorageService storage,List<TransferredResource> resources) throws PluginException {
  Report report=PluginHelper.createPluginReport(this);
  Report pluginReport;
  Map<String,Report> reports=new HashMap<>();
  aipIdToTransferredResourceId=new HashMap<>();
  Date startDate=new Date();
  String parentId=PluginHelper.getStringFromParameters(this,PARAMETER_PARENT_ID);
  boolean forceParentId=PluginHelper.getBooleanFromParameters(this,PARAMETER_FORCE_PARENT_ID);
  getParameterValues().put(RodaConstants.PLUGIN_PARAMS_PARENT_ID,parentId);
  getParameterValues().put(RodaConstants.PLUGIN_PARAMS_FORCE_PARENT_ID,forceParentId ? "String_Node_Str" : "String_Node_Str");
  pluginReport=transformTransferredResourceIntoAnAIP(index,model,storage,resources);
  reports=mergeReports(reports,aipIdToTransferredResourceId,pluginReport);
  List<AIP> aips=getAIPsFromReports(index,model,storage,reports);
  stepsCompleted=PluginHelper.updateJobStatus(this,index,model,stepsCompleted,totalSteps);
  createIngestStartedEvent(model,index,aipIdToTransferredResourceId,startDate);
  if (PluginHelper.verifyIfStepShouldBePerformed(this,PARAMETER_DO_VIRUS_CHECK)) {
    pluginReport=doVirusCheck(index,model,storage,aips);
    reports=mergeReports(reports,aipIdToTransferredResourceId,pluginReport);
    stepsCompleted=PluginHelper.updateJobStatus(this,index,model,stepsCompleted,totalSteps);
    aips=recalculateAIPsList(aips,reports,aipIdToTransferredResourceId);
  }
  if (PluginHelper.verifyIfStepShouldBePerformed(this,PARAMETER_DO_PDFTOPDFA_CONVERSION)) {
    Map<String,String> params=new HashMap<String,String>();
    params.put("String_Node_Str","String_Node_Str");
    pluginReport=doPDFtoPDFAConversion(index,model,storage,aips,params);
    reports=mergeReports(reports,aipIdToTransferredResourceId,pluginReport);
    stepsCompleted=PluginHelper.updateJobStatus(this,index,model,stepsCompleted,totalSteps);
  }
  if (PluginHelper.verifyIfStepShouldBePerformed(this,PARAMETER_DO_VERAPDF_CHECK)) {
    Map<String,String> params=new HashMap<String,String>();
    params.put("String_Node_Str","String_Node_Str");
    params.put("String_Node_Str","String_Node_Str");
    params.put("String_Node_Str","String_Node_Str");
    pluginReport=doVeraPDFCheck(index,model,storage,aips,params);
    reports=mergeReports(reports,aipIdToTransferredResourceId,pluginReport);
    stepsCompleted=PluginHelper.updateJobStatus(this,index,model,stepsCompleted,totalSteps);
  }
  pluginReport=createPremisSkeleton(index,model,storage,aips);
  reports=mergeReports(reports,aipIdToTransferredResourceId,pluginReport);
  stepsCompleted=PluginHelper.updateJobStatus(this,index,model,stepsCompleted,totalSteps);
  aips=recalculateAIPsList(aips,reports,aipIdToTransferredResourceId);
  pluginReport=verifyIfAipIsWellFormed(index,model,storage,aips);
  reports=mergeReports(reports,aipIdToTransferredResourceId,pluginReport);
  stepsCompleted=PluginHelper.updateJobStatus(this,index,model,stepsCompleted,totalSteps);
  aips=recalculateAIPsList(aips,reports,aipIdToTransferredResourceId);
  pluginReport=verifyProducerAuthorization(index,model,storage,aips);
  reports=mergeReports(reports,aipIdToTransferredResourceId,pluginReport);
  stepsCompleted=PluginHelper.updateJobStatus(this,index,model,stepsCompleted,totalSteps);
  aips=recalculateAIPsList(aips,reports,aipIdToTransferredResourceId);
  if (PluginHelper.verifyIfStepShouldBePerformed(this,PARAMETER_DO_FILE_FORMAT_IDENTIFICATION)) {
    pluginReport=doFileFormatIdentification(index,model,storage,aips);
    reports=mergeReports(reports,aipIdToTransferredResourceId,pluginReport);
    stepsCompleted=PluginHelper.updateJobStatus(this,index,model,stepsCompleted,totalSteps);
  }
  if (PluginHelper.verifyIfStepShouldBePerformed(this,PARAMETER_DO_METADATA_AND_FULL_TEXT_EXTRACTION)) {
    pluginReport=doMetadataAndFullTextExtraction(index,model,storage,aips);
    reports=mergeReports(reports,aipIdToTransferredResourceId,pluginReport);
    stepsCompleted=PluginHelper.updateJobStatus(this,index,model,stepsCompleted,totalSteps);
  }
  if (PluginHelper.verifyIfStepShouldBePerformed(this,PARAMETER_DO_AUTO_ACCEPT)) {
    pluginReport=doAutoAccept(index,model,storage,aips);
    reports=mergeReports(reports,aipIdToTransferredResourceId,pluginReport);
  }
  createIngestEndedEvent(model,index,aips,reports,aipIdToTransferredResourceId);
  return report;
}