Program: 172920
Project: 172920
Buggy source:
@Override public TaskSchedulePlan schedule(DataFlowTaskGraph graph,WorkerPlan workerPlan){
  Set<TaskSchedulePlan.ContainerPlan> containerPlans=new HashSet<>();
  LinkedHashSet<Vertex> taskVertexSet=graph.getTaskVertexSet();
  Map<Integer,List<InstanceId>> datalocalityAwareContainerInstanceMap=DataLocalityAwareScheduling.DataLocalityAwareSchedulingAlgorithm(taskVertexSet,workerPlan.getNumberOfWorkers(),workerPlan,this.cfg);
  TaskInstanceMapCalculation instanceMapCalculation=new TaskInstanceMapCalculation(this.instanceRAM,this.instanceCPU,this.instanceDisk);
  Map<Integer,Map<InstanceId,Double>> instancesRamMap=instanceMapCalculation.getInstancesRamMapInContainer(datalocalityAwareContainerInstanceMap,taskVertexSet);
  Map<Integer,Map<InstanceId,Double>> instancesDiskMap=instanceMapCalculation.getInstancesDiskMapInContainer(datalocalityAwareContainerInstanceMap,taskVertexSet);
  Map<Integer,Map<InstanceId,Double>> instancesCPUMap=instanceMapCalculation.getInstancesCPUMapInContainer(datalocalityAwareContainerInstanceMap,taskVertexSet);
  for (  int containerId : datalocalityAwareContainerInstanceMap.keySet()) {
    Double containerRAMValue=TaskSchedulerContext.containerRamPadding(cfg);
    Double containerDiskValue=TaskSchedulerContext.containerDiskPadding(cfg);
    Double containerCpuValue=TaskSchedulerContext.containerCpuPadding(cfg);
    List<InstanceId> taskInstanceIds=datalocalityAwareContainerInstanceMap.get(containerId);
    Map<InstanceId,TaskSchedulePlan.TaskInstancePlan> taskInstancePlanMap=new HashMap<>();
    for (    InstanceId id : taskInstanceIds) {
      double instanceRAMValue=instancesRamMap.get(containerId).get(id);
      double instanceDiskValue=instancesDiskMap.get(containerId).get(id);
      double instanceCPUValue=instancesCPUMap.get(containerId).get(id);
      Resource instanceResource=new Resource(instanceRAMValue,instanceDiskValue,instanceCPUValue);
      taskInstancePlanMap.put(id,new TaskSchedulePlan.TaskInstancePlan(id.getTaskName(),id.getTaskId(),id.getTaskIndex(),instanceResource));
      containerRAMValue+=instanceRAMValue;
      containerDiskValue+=instanceDiskValue;
      containerCpuValue+=instanceDiskValue;
    }
    Worker worker=workerPlan.getWorker(containerId);
    Resource containerResource;
    if (worker != null && worker.getCpu() > 0 && worker.getDisk() > 0 && worker.getRam() > 0) {
      containerResource=new Resource((double)worker.getRam(),(double)worker.getDisk(),(double)worker.getCpu());
      LOG.fine(String.format("String_Node_Str" + containerId + "String_Node_Str"+ worker.getRam()+ "String_Node_Str"+ worker.getDisk()+ "String_Node_Str"+ worker.getCpu()));
    }
 else {
      containerResource=new Resource(containerRAMValue,containerDiskValue,containerCpuValue);
      LOG.fine(String.format("String_Node_Str" + containerId + "String_Node_Str"+ containerRAMValue+ "String_Node_Str"+ containerDiskValue+ "String_Node_Str"+ containerCpuValue));
    }
    TaskSchedulePlan.ContainerPlan taskContainerPlan=new TaskSchedulePlan.ContainerPlan(containerId,new HashSet<>(taskInstancePlanMap.values()),containerResource);
    containerPlans.add(taskContainerPlan);
  }
  return new TaskSchedulePlan(taskSchedulePlanId,containerPlans);
}

Fixed version (ground truth):
@Override public TaskSchedulePlan schedule(DataFlowTaskGraph graph,WorkerPlan workerPlan){
  Set<TaskSchedulePlan.ContainerPlan> containerPlans=new HashSet<>();
  Set<Vertex> taskVertexSet=graph.getTaskVertexSet();
  Map<Integer,List<InstanceId>> datalocalityAwareContainerInstanceMap=DataLocalityAwareScheduling.DataLocalityAwareSchedulingAlgorithm(taskVertexSet,workerPlan.getNumberOfWorkers(),workerPlan,this.cfg);
  TaskInstanceMapCalculation instanceMapCalculation=new TaskInstanceMapCalculation(this.instanceRAM,this.instanceCPU,this.instanceDisk);
  Map<Integer,Map<InstanceId,Double>> instancesRamMap=instanceMapCalculation.getInstancesRamMapInContainer(datalocalityAwareContainerInstanceMap,taskVertexSet);
  Map<Integer,Map<InstanceId,Double>> instancesDiskMap=instanceMapCalculation.getInstancesDiskMapInContainer(datalocalityAwareContainerInstanceMap,taskVertexSet);
  Map<Integer,Map<InstanceId,Double>> instancesCPUMap=instanceMapCalculation.getInstancesCPUMapInContainer(datalocalityAwareContainerInstanceMap,taskVertexSet);
  for (  int containerId : datalocalityAwareContainerInstanceMap.keySet()) {
    Double containerRAMValue=TaskSchedulerContext.containerRamPadding(cfg);
    Double containerDiskValue=TaskSchedulerContext.containerDiskPadding(cfg);
    Double containerCpuValue=TaskSchedulerContext.containerCpuPadding(cfg);
    List<InstanceId> taskInstanceIds=datalocalityAwareContainerInstanceMap.get(containerId);
    Map<InstanceId,TaskSchedulePlan.TaskInstancePlan> taskInstancePlanMap=new HashMap<>();
    for (    InstanceId id : taskInstanceIds) {
      double instanceRAMValue=instancesRamMap.get(containerId).get(id);
      double instanceDiskValue=instancesDiskMap.get(containerId).get(id);
      double instanceCPUValue=instancesCPUMap.get(containerId).get(id);
      Resource instanceResource=new Resource(instanceRAMValue,instanceDiskValue,instanceCPUValue);
      taskInstancePlanMap.put(id,new TaskSchedulePlan.TaskInstancePlan(id.getTaskName(),id.getTaskId(),id.getTaskIndex(),instanceResource));
      containerRAMValue+=instanceRAMValue;
      containerDiskValue+=instanceDiskValue;
      containerCpuValue+=instanceDiskValue;
    }
    Worker worker=workerPlan.getWorker(containerId);
    Resource containerResource;
    if (worker != null && worker.getCpu() > 0 && worker.getDisk() > 0 && worker.getRam() > 0) {
      containerResource=new Resource((double)worker.getRam(),(double)worker.getDisk(),(double)worker.getCpu());
      LOG.fine(String.format("String_Node_Str" + containerId + "String_Node_Str"+ worker.getRam()+ "String_Node_Str"+ worker.getDisk()+ "String_Node_Str"+ worker.getCpu()));
    }
 else {
      containerResource=new Resource(containerRAMValue,containerDiskValue,containerCpuValue);
      LOG.fine(String.format("String_Node_Str" + containerId + "String_Node_Str"+ containerRAMValue+ "String_Node_Str"+ containerDiskValue+ "String_Node_Str"+ containerCpuValue));
    }
    TaskSchedulePlan.ContainerPlan taskContainerPlan=new TaskSchedulePlan.ContainerPlan(containerId,new HashSet<>(taskInstancePlanMap.values()),containerResource);
    containerPlans.add(taskContainerPlan);
  }
  return new TaskSchedulePlan(taskSchedulePlanId,containerPlans);
}