Program: 188648
Project: 188648
Buggy source:
public <T extends Serializable>JobPluginInfo processJobPluginInformation(Plugin<T> plugin,JobInfo jobInfo){
  int taskObjectsCount=jobInfo.getObjectsCount();
  Map<Plugin<?>,JobPluginInfo> jobInfos=jobInfo.getJobInfo();
  float percentage=0f;
  int sourceObjectsCount=0;
  int sourceObjectsBeingProcessed=0;
  int sourceObjectsProcessedWithSuccess=0;
  int sourceObjectsProcessedWithFailure=0;
  int outcomeObjectsWithManualIntervention=0;
  for (  JobPluginInfo jpi : jobInfos.values()) {
    IngestJobPluginInfo pluginInfo=(IngestJobPluginInfo)jpi;
    if (pluginInfo.getTotalSteps() > 0) {
      float pluginPercentage=jpi.getCompletionPercentage();
      if (pluginPercentage != 100 && pluginInfo.getStepsCompleted() != 0 && pluginInfo.getTotalSteps() != 0) {
        pluginPercentage=((float)pluginInfo.getStepsCompleted()) / pluginInfo.getTotalSteps();
      }
      float pluginWeight=((float)pluginInfo.getSourceObjectsCount()) / taskObjectsCount;
      percentage+=(pluginPercentage * pluginWeight);
      sourceObjectsProcessedWithSuccess+=pluginInfo.getSourceObjectsProcessedWithSuccess();
      sourceObjectsProcessedWithFailure+=pluginInfo.getSourceObjectsProcessedWithFailure();
      outcomeObjectsWithManualIntervention+=pluginInfo.getOutcomeObjectsWithManualIntervention();
    }
    sourceObjectsBeingProcessed+=pluginInfo.getSourceObjectsBeingProcessed();
    sourceObjectsCount+=pluginInfo.getSourceObjectsCount();
  }
  IngestJobPluginInfo ingestInfoUpdated=new IngestJobPluginInfo();
  ingestInfoUpdated.setCompletionPercentage(Math.round((percentage * 100)));
  ingestInfoUpdated.setSourceObjectsCount(sourceObjectsCount);
  ingestInfoUpdated.setSourceObjectsBeingProcessed(sourceObjectsBeingProcessed);
  ingestInfoUpdated.setSourceObjectsProcessedWithSuccess(sourceObjectsProcessedWithSuccess);
  ingestInfoUpdated.setSourceObjectsProcessedWithFailure(sourceObjectsProcessedWithFailure);
  ingestInfoUpdated.setOutcomeObjectsWithManualIntervention(outcomeObjectsWithManualIntervention);
  return ingestInfoUpdated;
}

Fixed version (ground truth):
public <T extends Serializable>JobPluginInfo processJobPluginInformation(Plugin<T> plugin,JobInfo jobInfo){
  int taskObjectsCount=jobInfo.getObjectsCount();
  Map<Plugin<?>,JobPluginInfo> jobInfos=jobInfo.getJobInfo();
  float percentage=0f;
  int sourceObjectsCount=0;
  int sourceObjectsBeingProcessed=0;
  int sourceObjectsProcessedWithSuccess=0;
  int sourceObjectsProcessedWithFailure=0;
  int outcomeObjectsWithManualIntervention=0;
  for (  JobPluginInfo jpi : jobInfos.values()) {
    IngestJobPluginInfo pluginInfo=(IngestJobPluginInfo)jpi;
    if (pluginInfo.getTotalSteps() > 0) {
      float pluginPercentage=pluginInfo.getCompletionPercentage() == 100 ? 1.0f : 0.0f;
      if (pluginInfo.getCompletionPercentage() != 100) {
        pluginPercentage=((float)pluginInfo.getStepsCompleted()) / pluginInfo.getTotalSteps();
      }
      float pluginWeight=((float)pluginInfo.getSourceObjectsCount()) / taskObjectsCount;
      percentage+=(pluginPercentage * pluginWeight);
      sourceObjectsProcessedWithSuccess+=pluginInfo.getSourceObjectsProcessedWithSuccess();
      sourceObjectsProcessedWithFailure+=pluginInfo.getSourceObjectsProcessedWithFailure();
      outcomeObjectsWithManualIntervention+=pluginInfo.getOutcomeObjectsWithManualIntervention();
    }
    sourceObjectsBeingProcessed+=pluginInfo.getSourceObjectsBeingProcessed();
    sourceObjectsCount+=pluginInfo.getSourceObjectsCount();
  }
  IngestJobPluginInfo ingestInfoUpdated=new IngestJobPluginInfo();
  ingestInfoUpdated.setCompletionPercentage(Math.round((percentage * 100)));
  ingestInfoUpdated.setSourceObjectsCount(sourceObjectsCount);
  ingestInfoUpdated.setSourceObjectsBeingProcessed(sourceObjectsBeingProcessed);
  ingestInfoUpdated.setSourceObjectsProcessedWithSuccess(sourceObjectsProcessedWithSuccess);
  ingestInfoUpdated.setSourceObjectsProcessedWithFailure(sourceObjectsProcessedWithFailure);
  ingestInfoUpdated.setOutcomeObjectsWithManualIntervention(outcomeObjectsWithManualIntervention);
  return ingestInfoUpdated;
}