nus-yam/ex-repair huggingface dataset:
Program: 56185
Project: 56185
Buggy source:
/** 
 * Initializes the stub implementation and configuration.
 * @throws RuntimeException Thrown if instance of stub implementation can not be obtained.
 */
private void initStub(){
  config=new TaskConfig(getRuntimeConfiguration());
  NUM_SORT_BUFFERS=config.getNumSortBuffer();
  SIZE_SORT_BUFFER=config.getSortBufferSize() * 1024 * 1024;
  MEMORY_IO=config.getIOBufferSize() * 1024 * 1024;
  MAX_NUM_FILEHANLDES=config.getMergeFactor();
  try {
    ClassLoader cl=LibraryCacheManager.getClassLoader(getEnvironment().getJobID());
    Class<? extends MatchStub> matchClass=config.getStubClass(MatchStub.class,cl);
    matchStub=matchClass.newInstance();
    matchStub.configure(config.getStubParameters());
  }
 catch (  IOException ioe) {
    throw new RuntimeException("String_Node_Str",ioe);
  }
catch (  ClassNotFoundException cnfe) {
    throw new RuntimeException("String_Node_Str",cnfe);
  }
catch (  InstantiationException ie) {
    throw new RuntimeException("String_Node_Str",ie);
  }
catch (  IllegalAccessException iae) {
    throw new RuntimeException("String_Node_Str",iae);
  }
}

Fixed version (ground truth):
/** 
 * Initializes the stub implementation and configuration.
 * @throws RuntimeException Thrown if instance of stub implementation can not be obtained.
 */
private void initStub(){
  config=new TaskConfig(getRuntimeConfiguration());
  NUM_SORT_BUFFERS=config.getNumSortBuffer();
  SIZE_SORT_BUFFER=config.getSortBufferSize() * 1024 * 1024;
  MEMORY_IO=config.getIOBufferSize() * 1024 * 1024;
  MAX_NUM_FILEHANLDES=config.getMergeFactor();
  try {
    ClassLoader cl=LibraryCacheManager.getClassLoader(getEnvironment().getJobID());
    Class<? extends MatchStub> matchClass=config.getStubClass(MatchStub.class,cl);
    matchStub=matchClass.newInstance();
    matchStub.configure(config.getStubParameters());
    this.keySerialization=new WritableSerializationFactory<Key>(matchStub.getFirstInKeyType());
    this.v1Serialization=new WritableSerializationFactory<Value>(matchStub.getFirstInValueType());
    this.v2Serialization=new WritableSerializationFactory<Value>(matchStub.getSecondInValueType());
  }
 catch (  IOException ioe) {
    throw new RuntimeException("String_Node_Str",ioe);
  }
catch (  ClassNotFoundException cnfe) {
    throw new RuntimeException("String_Node_Str",cnfe);
  }
catch (  InstantiationException ie) {
    throw new RuntimeException("String_Node_Str",ie);
  }
catch (  IllegalAccessException iae) {
    throw new RuntimeException("String_Node_Str",iae);
  }
}
Program: 56187
Project: 56187
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void run(){
  this.instanceListener.resourceAllocated(this.allocatedSlice.getJobID(),new AllocatedResource(this.allocatedSlice.getHostingInstance(),this.allocatedSlice.getAllocationID()));
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void run(){
  this.instanceListener.resourceAllocated(this.allocatedSlice.getJobID(),new AllocatedResource(this.allocatedSlice.getHostingInstance(),this.allocatedSlice.getType(),this.allocatedSlice.getAllocationID()));
}
Program: 56188
Project: 56188
Buggy source:
@Override public synchronized void requestInstance(JobID jobID,Configuration conf,InstanceType instanceType) throws InstanceException {
  for (  ClusterInstance host : registeredHosts.values()) {
    final AllocatedSlice slice=host.createSlice(instanceType,jobID);
    if (slice != null) {
      List<AllocatedSlice> allocatedSlices=this.slicesOfJobs.get(jobID);
      if (allocatedSlices == null) {
        allocatedSlices=new ArrayList<AllocatedSlice>();
        this.slicesOfJobs.put(jobID,allocatedSlices);
      }
      allocatedSlices.add(slice);
      if (this.instanceListener != null) {
        ClusterInstanceNotifier clusterInstanceNotifier=new ClusterInstanceNotifier(this.instanceListener,slice);
        clusterInstanceNotifier.start();
      }
      return;
    }
  }
  throw new InstanceException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public synchronized void requestInstance(JobID jobID,Configuration conf,InstanceType instanceType) throws InstanceException {
  for (  ClusterInstance host : registeredHosts.values()) {
    final AllocatedSlice slice=host.createSlice(instanceType,jobID);
    if (slice != null) {
      List<AllocatedSlice> allocatedSlices=this.slicesOfJobs.get(jobID);
      if (allocatedSlices == null) {
        allocatedSlices=new ArrayList<AllocatedSlice>();
        this.slicesOfJobs.put(jobID,allocatedSlices);
      }
      allocatedSlices.add(slice);
      if (this.instanceListener != null) {
        ClusterInstanceNotifier clusterInstanceNotifier=new ClusterInstanceNotifier(this.instanceListener,slice);
        clusterInstanceNotifier.start();
      }
      return;
    }
  }
  throw new InstanceException("String_Node_Str");
}
Program: 56189
Project: 56189
Buggy source:
@Override public void run(){
synchronized (ClusterManager.this) {
    final List<Map.Entry<InstanceConnectionInfo,ClusterInstance>> hostsToRemove=new ArrayList<Map.Entry<InstanceConnectionInfo,ClusterInstance>>();
    for (    Map.Entry<InstanceConnectionInfo,ClusterInstance> entry : registeredHosts.entrySet()) {
      final ClusterInstance host=entry.getValue();
      if (!host.isStillAlive(cleanUpInterval)) {
        final List<AllocatedSlice> removedSlices=host.removeAllAllocatedSlices();
        for (        AllocatedSlice removedSlice : removedSlices) {
          final JobID jobID=removedSlice.getJobID();
          final List<AllocatedSlice> slicesOfJob=slicesOfJobs.get(jobID);
          if (slicesOfJob == null) {
            LOG.error("String_Node_Str" + jobID);
            continue;
          }
          slicesOfJob.remove(removedSlice);
          if (slicesOfJob.isEmpty()) {
            slicesOfJobs.remove(jobID);
          }
          if (instanceListener != null) {
            instanceListener.allocatedResourceDied(removedSlice.getJobID(),new AllocatedResource(removedSlice.getHostingInstance(),removedSlice.getAllocationID()));
          }
        }
        hostsToRemove.add(entry);
      }
    }
    registeredHosts.entrySet().removeAll(hostsToRemove);
    updateInstaceTypeDescriptionMap();
  }
}

Fixed version (ground truth):
@Override public void run(){
synchronized (ClusterManager.this) {
    final List<Map.Entry<InstanceConnectionInfo,ClusterInstance>> hostsToRemove=new ArrayList<Map.Entry<InstanceConnectionInfo,ClusterInstance>>();
    for (    Map.Entry<InstanceConnectionInfo,ClusterInstance> entry : registeredHosts.entrySet()) {
      final ClusterInstance host=entry.getValue();
      if (!host.isStillAlive(cleanUpInterval)) {
        final List<AllocatedSlice> removedSlices=host.removeAllAllocatedSlices();
        for (        AllocatedSlice removedSlice : removedSlices) {
          final JobID jobID=removedSlice.getJobID();
          final List<AllocatedSlice> slicesOfJob=slicesOfJobs.get(jobID);
          if (slicesOfJob == null) {
            LOG.error("String_Node_Str" + jobID);
            continue;
          }
          slicesOfJob.remove(removedSlice);
          if (slicesOfJob.isEmpty()) {
            slicesOfJobs.remove(jobID);
          }
          if (instanceListener != null) {
            instanceListener.allocatedResourceDied(removedSlice.getJobID(),new AllocatedResource(removedSlice.getHostingInstance(),removedSlice.getType(),removedSlice.getAllocationID()));
          }
        }
        hostsToRemove.add(entry);
      }
    }
    registeredHosts.entrySet().removeAll(hostsToRemove);
    updateInstaceTypeDescriptionMap();
  }
}
Program: 56190
Project: 56190
Buggy source:
/** 
 * Creates a new cloud instance.
 * @param instanceID the instance ID assigned by the cloud management system
 * @param type the instance type
 * @param instanceOwner the owner of the instance
 * @param instanceConnectionInfo the information required to connect to the instance's task manager
 * @param allocationTime the time the instance was allocated
 * @param parentNode the parent node in the network topology
 * @param hardwareDescription the hardware description reported by the instance itself
 */
public CloudInstance(String instanceID,InstanceType type,String instanceOwner,InstanceConnectionInfo instanceConnectionInfo,long allocationTime,NetworkNode parentNode,NetworkTopology networkTopology,HardwareDescription hardwareDescription){
  super(type,instanceConnectionInfo,parentNode,networkTopology,hardwareDescription);
  this.allocatedResource=new AllocatedResource(this,new AllocationID());
  this.instanceID=instanceID;
  this.instanceOwner=instanceOwner;
  this.allocationTime=allocationTime;
}

Fixed version (ground truth):
/** 
 * Creates a new cloud instance.
 * @param instanceID the instance ID assigned by the cloud management system
 * @param type the instance type
 * @param instanceOwner the owner of the instance
 * @param instanceConnectionInfo the information required to connect to the instance's task manager
 * @param allocationTime the time the instance was allocated
 * @param parentNode the parent node in the network topology
 * @param hardwareDescription the hardware description reported by the instance itself
 */
public CloudInstance(String instanceID,InstanceType type,String instanceOwner,InstanceConnectionInfo instanceConnectionInfo,long allocationTime,NetworkNode parentNode,NetworkTopology networkTopology,HardwareDescription hardwareDescription){
  super(type,instanceConnectionInfo,parentNode,networkTopology,hardwareDescription);
  this.allocatedResource=new AllocatedResource(this,type,new AllocationID());
  this.instanceID=instanceID;
  this.instanceOwner=instanceOwner;
  this.allocationTime=allocationTime;
}
Program: 56193
Project: 56193
Buggy source:
public synchronized void reassignInstances(){
  int numberOfRequiredInstances=0;
synchronized (this.groupMembers) {
    numberOfRequiredInstances=(this.groupMembers.size() / this.numberOfSubtasksPerInstance) + (((this.groupMembers.size() % this.numberOfSubtasksPerInstance) != 0) ? 1 : 0);
  }
  final List<AllocatedResource> availableInstances=collectAvailabbleResources();
  while (availableInstances.size() < numberOfRequiredInstances) {
    final AllocatedResource newAllocatedResource=new AllocatedResource(DummyInstance.createDummyInstance(this.instanceType),null);
    availableInstances.add(newAllocatedResource);
  }
synchronized (this.groupMembers) {
    final Iterator<ExecutionVertex> it=this.groupMembers.iterator();
    int instanceIndex=0, i=0;
    int sizeOfIndexStep=availableInstances.size() / numberOfRequiredInstances;
    while (it.hasNext()) {
      final ExecutionVertex vertex=it.next();
      vertex.setAllocatedResource(availableInstances.get(instanceIndex));
      if ((++i % this.numberOfSubtasksPerInstance) == 0) {
        instanceIndex+=sizeOfIndexStep;
      }
    }
  }
synchronized (this.verticesSharingInstances) {
    final Iterator<ExecutionGroupVertex> it2=this.verticesSharingInstances.iterator();
    while (it2.hasNext()) {
      final ExecutionGroupVertex groupVertex=it2.next();
      groupVertex.reassignInstances();
    }
  }
}

Fixed version (ground truth):
public synchronized void reassignInstances(){
  int numberOfRequiredInstances=0;
synchronized (this.groupMembers) {
    numberOfRequiredInstances=(this.groupMembers.size() / this.numberOfSubtasksPerInstance) + (((this.groupMembers.size() % this.numberOfSubtasksPerInstance) != 0) ? 1 : 0);
  }
  final List<AllocatedResource> availableInstances=collectAvailabbleResources();
  while (availableInstances.size() < numberOfRequiredInstances) {
    final AllocatedResource newAllocatedResource=new AllocatedResource(DummyInstance.createDummyInstance(this.instanceType),this.instanceType,null);
    availableInstances.add(newAllocatedResource);
  }
synchronized (this.groupMembers) {
    final Iterator<ExecutionVertex> it=this.groupMembers.iterator();
    int instanceIndex=0, i=0;
    int sizeOfIndexStep=availableInstances.size() / numberOfRequiredInstances;
    while (it.hasNext()) {
      final ExecutionVertex vertex=it.next();
      vertex.setAllocatedResource(availableInstances.get(instanceIndex));
      if ((++i % this.numberOfSubtasksPerInstance) == 0) {
        instanceIndex+=sizeOfIndexStep;
      }
    }
  }
synchronized (this.verticesSharingInstances) {
    final Iterator<ExecutionGroupVertex> it2=this.verticesSharingInstances.iterator();
    while (it2.hasNext()) {
      final ExecutionGroupVertex groupVertex=it2.next();
      groupVertex.reassignInstances();
    }
  }
}
Program: 56194
Project: 56194
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public int hashCode(){
  return this.allocationID.hashCode();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public int hashCode(){
  if (this.allocationID == null) {
    return 0;
  }
  return this.allocationID.hashCode();
}
Program: 56195
Project: 56195
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public boolean equals(Object obj){
  if (obj instanceof AllocatedResource) {
    final AllocatedResource allocatedResource=(AllocatedResource)obj;
    if (!this.instance.equals(allocatedResource.getInstance())) {
      return false;
    }
    if (this.allocationID == null) {
      if (allocatedResource.getAllocationID() == null) {
        return true;
      }
 else {
        return false;
      }
    }
    if (!this.allocationID.equals(allocatedResource.getAllocationID())) {
      return false;
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public boolean equals(Object obj){
  if (obj instanceof AllocatedResource) {
    final AllocatedResource allocatedResource=(AllocatedResource)obj;
    if (!this.instance.equals(allocatedResource.getInstance())) {
      return false;
    }
    if (this.allocationID == null) {
      if (allocatedResource.getAllocationID() != null) {
        return false;
      }
    }
 else {
      if (!this.allocationID.equals(allocatedResource.getAllocationID())) {
        return false;
      }
    }
    if (this.instanceType == null) {
      if (allocatedResource.instance != null) {
        return false;
      }
    }
 else {
      if (!this.instanceType.equals(allocatedResource.getInstanceType())) {
        return false;
      }
    }
    return true;
  }
  return false;
}
Program: 56196
Project: 56196
Buggy source:
/** 
 * Constructs a new allocated resource object.
 * @param instance the instance a task is scheduled to run on.
 * @param allocationID the allocation ID identifying the allocated resources within the instance
 */
public AllocatedResource(AbstractInstance instance,AllocationID allocationID){
  this.instance=instance;
  this.allocationID=allocationID;
}

Fixed version (ground truth):
/** 
 * Constructs a new allocated resource object.
 * @param instance the instance a task is scheduled to run on.
 * @param instanceType the instance type this allocated resource represents
 * @param allocationID the allocation ID identifying the allocated resources within the instance
 */
public AllocatedResource(AbstractInstance instance,InstanceType instanceType,AllocationID allocationID){
  this.instance=instance;
  this.instanceType=instanceType;
  this.allocationID=allocationID;
}
Program: 56197
Project: 56197
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void requestInstance(JobID jobID,Configuration conf,InstanceType instanceType) throws InstanceException {
  boolean assignmentSuccessful=false;
  AllocatedResource allocatedResource=null;
synchronized (this.synchronizationObject) {
    if (this.localInstance != null) {
      if (this.allocatedResource == null) {
        allocatedResource=new AllocatedResource(this.localInstance,new AllocationID());
        this.allocatedResource=allocatedResource;
        assignmentSuccessful=true;
      }
    }
  }
  if (assignmentSuccessful) {
    new LocalInstanceNotifier(this.instanceListener,jobID,allocatedResource).start();
  }
 else {
    throw new InstanceException("String_Node_Str" + instanceType + "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void requestInstance(JobID jobID,Configuration conf,InstanceType instanceType) throws InstanceException {
  boolean assignmentSuccessful=false;
  AllocatedResource allocatedResource=null;
synchronized (this.synchronizationObject) {
    if (this.localInstance != null) {
      if (this.allocatedResource == null) {
        allocatedResource=new AllocatedResource(this.localInstance,instanceType,new AllocationID());
        this.allocatedResource=allocatedResource;
        assignmentSuccessful=true;
      }
    }
  }
  if (assignmentSuccessful) {
    new LocalInstanceNotifier(this.instanceListener,jobID,allocatedResource).start();
  }
 else {
    throw new InstanceException("String_Node_Str" + instanceType + "String_Node_Str");
  }
}
Program: 56198
Project: 56198
Buggy source:
/** 
 * Adds an InputSplit to the Vertex with least InputSplits assigned that can locally read the split. If the InputSplit cannot be read locally by any Vertex, it is assigned to the Vertex with least assigned InputSplits.
 * @param inputSplit InputSplit that will be assigned
 * @throws ExecutionFailureException
 */
private void addFileSplit(InputSplit inputSplit) throws ExecutionFailureException {
  String[] splitLocations=inputSplit.getHostNames();
  if (splitLocations.length == 0)   throw new ExecutionFailureException("String_Node_Str" + inputSplit);
  boolean added=false;
  PriorityQueue<QueueElem> newVertexPrioQueue=new PriorityQueue<QueueElem>();
  while (this.vertexPrioQueue.size() > 0) {
    QueueElem topElem=this.vertexPrioQueue.poll();
    if (topElem.hostsSplit(splitLocations)) {
      topElem.assignInputSplit(inputSplit);
      added=true;
    }
    newVertexPrioQueue.add(topElem);
    if (added) {
      break;
    }
  }
  if (added) {
    newVertexPrioQueue.addAll(this.vertexPrioQueue);
  }
 else {
    QueueElem topElem=newVertexPrioQueue.poll();
    topElem.assignInputSplit(inputSplit);
    newVertexPrioQueue.add(topElem);
  }
  this.vertexPrioQueue=newVertexPrioQueue;
}

Fixed version (ground truth):
/** 
 * Adds an InputSplit to the Vertex with least InputSplits assigned that can locally read the split. If the InputSplit cannot be read locally by any Vertex, it is assigned to the Vertex with least assigned InputSplits.
 * @param inputSplit InputSplit that will be assigned
 * @throws ExecutionFailureException
 */
private void addFileSplit(InputSplit inputSplit) throws ExecutionFailureException {
  final String[] splitLocations=inputSplit.getHostNames();
  if (splitLocations.length == 0)   throw new ExecutionFailureException("String_Node_Str" + inputSplit);
  boolean added=false;
  final PriorityQueue<QueueElem> newVertexPrioQueue=new PriorityQueue<QueueElem>();
  while (this.vertexPrioQueue.size() > 0) {
    QueueElem topElem=this.vertexPrioQueue.poll();
    if (topElem.hostsSplit(splitLocations)) {
      topElem.assignInputSplit(inputSplit);
      added=true;
    }
    newVertexPrioQueue.add(topElem);
    if (added) {
      break;
    }
  }
  if (added) {
    newVertexPrioQueue.addAll(this.vertexPrioQueue);
  }
 else {
    final QueueElem topElem=newVertexPrioQueue.poll();
    topElem.assignInputSplit(inputSplit);
    newVertexPrioQueue.add(topElem);
  }
  this.vertexPrioQueue=newVertexPrioQueue;
}
Program: 56199
Project: 56199
Buggy source:
/** 
 * Assign InputSplits for a ExecutionGroupVertex
 * @param graph ExecutionGraph the ExecutionGroupVertex belongs to
 * @param groupVertex ExecutionGroupVertex who's InputSplits will be assigned
 * @throws ExecutionFailureException
 */
private void assignInputSplits(ExecutionGroupVertex groupVertex) throws ExecutionFailureException {
  InputSplit[] inputSplits=groupVertex.getInputSplits();
  if (inputSplits == null) {
    throw new ExecutionFailureException("String_Node_Str" + groupVertex.getName() + "String_Node_Str");
  }
  LOG.info("String_Node_Str" + inputSplits.length + "String_Node_Str"+ groupVertex.getName());
  initializePriorityQueue(groupVertex,inputSplits);
  for (int i=0; i < inputSplits.length; i++) {
    addFileSplit(inputSplits[i]);
  }
  verifyAssignments();
  vertexPrioQueue.clear();
}

Fixed version (ground truth):
/** 
 * Assign InputSplits for a ExecutionGroupVertex
 * @param graph ExecutionGraph the ExecutionGroupVertex belongs to
 * @param groupVertex ExecutionGroupVertex who's InputSplits will be assigned
 * @return <code>false</code> if the instance assignment could not be done because at least one vertex has not beenin state <code>READY</code>, <code>true/code> otherwise
 * @throws ExecutionFailureException
 */
private boolean assignInputSplits(ExecutionGroupVertex groupVertex) throws ExecutionFailureException {
  for (int i=0; i < groupVertex.getCurrentNumberOfGroupMembers(); i++) {
    if (!groupVertex.getGroupMember(i).getExecutionState().equals(ExecutionState.READY)) {
      return false;
    }
  }
  final InputSplit[] inputSplits=groupVertex.getInputSplits();
  if (inputSplits == null) {
    throw new ExecutionFailureException("String_Node_Str" + groupVertex.getName() + "String_Node_Str");
  }
  LOG.info("String_Node_Str" + inputSplits.length + "String_Node_Str"+ groupVertex.getName());
  initializePriorityQueue(groupVertex,inputSplits);
  for (int i=0; i < inputSplits.length; i++) {
    addFileSplit(inputSplits[i]);
  }
  verifyAssignments();
  vertexPrioQueue.clear();
  return true;
}
Program: 56200
Project: 56200
Buggy source:
/** 
 * Searches the current execution graph for execution vertices which have become ready for execution and triggers their execution.
 */
void runVerticesReadyForExecution(){
  final Set<ExecutionVertex> readyVertices=this.scheduler.getVerticesReadyToBeExecuted();
synchronized (this.verticesReadyToRun) {
    this.verticesReadyToRun.addAll(readyVertices);
    final Iterator<ExecutionVertex> it=this.verticesReadyToRun.iterator();
    while (it.hasNext()) {
      final ExecutionVertex vertex=it.next();
      if (vertex.getExecutionState() != ExecutionState.READY) {
        LOG.error("String_Node_Str" + vertex + "String_Node_Str"+ vertex.getExecutionState());
      }
      if (vertex.isInputVertex() && vertex.getEnvironment().getInputSplits().length == 0 && vertex.getGroupVertex().getStageNumber() == 0) {
        try {
          InputSplitAssigner.assignInputSplits(vertex);
        }
 catch (        ExecutionFailureException e) {
          e.printStackTrace();
        }
      }
      LOG.info("String_Node_Str" + vertex + "String_Node_Str"+ vertex.getAllocatedResource().getInstance());
      final TaskSubmissionResult submissionResult=vertex.startTask();
      it.remove();
      if (submissionResult.getReturnCode() == AbstractTaskResult.ReturnCode.ERROR) {
        vertex.getEnvironment().changeExecutionState(ExecutionState.FAILED,submissionResult.getDescription());
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Searches the current execution graph for execution vertices which have become ready for execution and triggers their execution.
 */
void runVerticesReadyForExecution(){
  final Set<ExecutionVertex> readyVertices=this.scheduler.getVerticesReadyToBeExecuted();
synchronized (this.verticesReadyToRun) {
    this.verticesReadyToRun.addAll(readyVertices);
    final Iterator<ExecutionVertex> it=this.verticesReadyToRun.iterator();
    while (it.hasNext()) {
      final ExecutionVertex vertex=it.next();
      if (vertex.getExecutionState() != ExecutionState.READY) {
        LOG.error("String_Node_Str" + vertex + "String_Node_Str"+ vertex.getExecutionState());
      }
      if (vertex.isInputVertex() && vertex.getEnvironment().getInputSplits().length == 0 && vertex.getGroupVertex().getStageNumber() == 0) {
        try {
          if (!InputSplitAssigner.assignInputSplits(vertex)) {
            continue;
          }
        }
 catch (        ExecutionFailureException e) {
          e.printStackTrace();
        }
      }
      LOG.info("String_Node_Str" + vertex + "String_Node_Str"+ vertex.getAllocatedResource().getInstance());
      final TaskSubmissionResult submissionResult=vertex.startTask();
      it.remove();
      if (submissionResult.getReturnCode() == AbstractTaskResult.ReturnCode.ERROR) {
        vertex.getEnvironment().changeExecutionState(ExecutionState.FAILED,submissionResult.getDescription());
      }
    }
  }
}
Program: 56202
Project: 56202
Buggy source:
/** 
 * Verifies that at least one InputSplit was assigned to each vertex
 * @throws ExecutionFailureException
 */
private void verifyAssignments() throws ExecutionFailureException {
  while (this.vertexPrioQueue.size() > 0) {
    QueueElem topElem=this.vertexPrioQueue.poll();
    if (topElem.getNoAssignedSplits() == 0) {
      throw new ExecutionFailureException("String_Node_Str" + topElem.getVertex().getName() + "String_Node_Str"+ topElem.getVertex().getAllocatedResource().getInstance().getInstanceConnectionInfo().getHostName()+ "String_Node_Str"+ topElem.getVertex().getID()+ "String_Node_Str");
    }
    LOG.info(topElem.getNoAssignedSplits() + "String_Node_Str" + topElem.getVertex().getAllocatedResource().getInstance().getInstanceConnectionInfo().getHostName());
    for (    InputSplit is : topElem.getVertex().getEnvironment().getInputSplits()) {
      LOG.info("String_Node_Str" + ((FileInputSplit)is).getPath());
      for (      String hn : is.getHostNames()) {
        LOG.info("String_Node_Str" + hn);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Verifies that at least one InputSplit was assigned to each vertex
 * @throws ExecutionFailureException
 */
private void verifyAssignments() throws ExecutionFailureException {
  while (this.vertexPrioQueue.size() > 0) {
    final QueueElem topElem=this.vertexPrioQueue.poll();
    if (topElem.getNoAssignedSplits() == 0) {
      continue;
    }
    LOG.info(topElem.getNoAssignedSplits() + "String_Node_Str" + topElem.getVertex().getAllocatedResource().getInstance().getInstanceConnectionInfo().getHostName());
    for (    InputSplit is : topElem.getVertex().getEnvironment().getInputSplits()) {
      LOG.info("String_Node_Str" + ((FileInputSplit)is).getPath());
      for (      String hn : is.getHostNames()) {
        LOG.info("String_Node_Str" + hn);
      }
    }
  }
}
Program: 56203
Project: 56203
Buggy source:
/** 
 * Assign InputSplits for a ExecutionGroupVertex
 * @param graph ExecutionGraph the ExecutionGroupVertex belongs to
 * @param groupVertex ExecutionGroupVertex who's InputSplits will be assigned
 * @return <code>false</code> if the instance assignment could not be done because at least one vertex has not beenin state <code>READY</code>, <code>true/code> otherwise
 * @throws ExecutionFailureException
 */
private boolean assignInputSplits(ExecutionGroupVertex groupVertex) throws ExecutionFailureException {
  for (int i=0; i < groupVertex.getCurrentNumberOfGroupMembers(); i++) {
    if (!groupVertex.getGroupMember(i).getExecutionState().equals(ExecutionState.READY)) {
      return false;
    }
  }
  final InputSplit[] inputSplits=groupVertex.getInputSplits();
  if (inputSplits == null) {
    throw new ExecutionFailureException("String_Node_Str" + groupVertex.getName() + "String_Node_Str");
  }
  LOG.info("String_Node_Str" + inputSplits.length + "String_Node_Str"+ groupVertex.getName());
  initializePriorityQueue(groupVertex,inputSplits);
  for (int i=0; i < inputSplits.length; i++) {
    addFileSplit(inputSplits[i]);
  }
  verifyAssignments();
  vertexPrioQueue.clear();
  return true;
}

Fixed version (ground truth):
/** 
 * Assign InputSplits for a ExecutionGroupVertex
 * @param graph ExecutionGraph the ExecutionGroupVertex belongs to
 * @param groupVertex ExecutionGroupVertex who's InputSplits will be assigned
 * @return <code>false</code> if the instance assignment could not be done because at least one vertex has not yetbeen assigned to a real instance, <code>true/code> otherwise
 * @throws ExecutionFailureException
 */
private boolean assignInputSplits(ExecutionGroupVertex groupVertex) throws ExecutionFailureException {
  for (int i=0; i < groupVertex.getCurrentNumberOfGroupMembers(); i++) {
    final AllocatedResource ar=groupVertex.getGroupMember(i).getAllocatedResource();
    if (ar.getInstance() instanceof DummyInstance) {
      return false;
    }
  }
  final InputSplit[] inputSplits=groupVertex.getInputSplits();
  if (inputSplits == null) {
    throw new ExecutionFailureException("String_Node_Str" + groupVertex.getName() + "String_Node_Str");
  }
  LOG.info("String_Node_Str" + inputSplits.length + "String_Node_Str"+ groupVertex.getName());
  initializePriorityQueue(groupVertex,inputSplits);
  for (int i=0; i < inputSplits.length; i++) {
    addFileSplit(inputSplits[i]);
  }
  verifyAssignments();
  vertexPrioQueue.clear();
  return true;
}
Program: 56204
Project: 56204
Buggy source:
public ServiceException(Throwable cause){
  super(cause);
}

Fixed version (ground truth):
public ServiceException(String message,Throwable cause){
  super(message,cause);
}
Program: 56205
Project: 56205
Buggy source:
/** 
 * Factory method for MemorySegment implementations.
 * @param descriptor
 * @return
 */
private DefaultMemorySegment factory(MemorySegmentDescriptor descriptor){
  DefaultRandomAccessView randomAccessView=new DefaultRandomAccessView(descriptor);
  DefaultDataInputView inputView=new DefaultDataInputView(descriptor);
  DefaultDataOutputView outputView=new DefaultDataOutputView(descriptor);
  return new DefaultMemorySegment(descriptor,randomAccessView,inputView,outputView);
}

Fixed version (ground truth):
/** 
 * Factory method for MemorySegment implementations.
 * @param descriptor
 * @return
 */
private static DefaultMemorySegment factory(MemorySegmentDescriptor descriptor){
  DefaultRandomAccessView randomAccessView=new DefaultRandomAccessView(descriptor);
  DefaultDataInputView inputView=new DefaultDataInputView(descriptor);
  DefaultDataOutputView outputView=new DefaultDataOutputView(descriptor);
  return new DefaultMemorySegment(descriptor,randomAccessView,inputView,outputView);
}
Program: 56206
Project: 56206
Buggy source:
@Override public void shutdown(){
  if (!isShutDown) {
    LOG.debug("String_Node_Str" + toString());
    isShutDown=true;
    memory=null;
    chunkSize=0L;
  }
}

Fixed version (ground truth):
@Override public void shutdown(){
synchronized (this) {
    if (!isShutDown) {
      LOG.debug("String_Node_Str" + toString());
      isShutDown=true;
      memory=null;
      chunkSize=0L;
    }
  }
}
Program: 56207
Project: 56207
Buggy source:
/** 
 * Creates a new channel selector that uses the given strategy (broadcasting, partitioning, ...), using the supplied salt to randomize hashes.
 * @param strategy The distribution strategy to be used.
 * @param salt The salt used to randomize hash values.
 */
public OutputEmitter(ShipStrategy strategy,byte[] salt){
  if (strategy != ShipStrategy.BROADCAST && strategy != ShipStrategy.PARTITION_HASH && strategy != ShipStrategy.FORWARD) {
    throw new UnsupportedOperationException("String_Node_Str" + strategy.name());
  }
  this.strategy=strategy;
  this.salt=salt;
}

Fixed version (ground truth):
/** 
 * Creates a new channel selector that uses the given strategy (broadcasting, partitioning, ...), using the supplied salt to randomize hashes.
 * @param strategy The distribution strategy to be used.
 * @param salt The salt used to randomize hash values.
 */
public OutputEmitter(ShipStrategy strategy,byte[] salt){
  this.strategy=strategy;
  this.salt=salt;
}
Program: 56208
Project: 56208
Buggy source:
@Override public int[] selectChannels(KeyValuePair<K,V> pair,int numberOfChannels){
switch (strategy) {
case BROADCAST:
    return broadcast(numberOfChannels);
case PARTITION_HASH:
  return partition(pair,numberOfChannels);
case FORWARD:
return robin(numberOfChannels);
default :
throw new UnsupportedOperationException();
}
}

Fixed version (ground truth):
@Override public int[] selectChannels(KeyValuePair<K,V> pair,int numberOfChannels){
switch (strategy) {
case BROADCAST:
    return broadcast(numberOfChannels);
case PARTITION_HASH:
  return partition(pair,numberOfChannels);
case FORWARD:
return robin(numberOfChannels);
default :
throw new UnsupportedOperationException("String_Node_Str" + strategy.name());
}
}
Program: 56211
Project: 56211
Buggy source:
/** 
 * Entry point of the thread.
 */
public void go() throws Exception {
  final Channel.Enumerator enumerator=ioManager.createChannelEnumerator();
  List<Channel.ID> channelIDs=new ArrayList<Channel.ID>();
  Collection<MemorySegment> outputSegments=memoryManager.allocate(UnilateralSortMerger.this.parent,2,ioMemorySize / 2);
  freeSegmentsAtShutdown(outputSegments);
  CircularElement element=null;
  while (isRunning() && (element=queues.spill.take()) != SENTINEL) {
    Channel.ID channel=enumerator.next();
    channelIDs.add(channel);
    ChannelWriter writer=ioManager.createChannelWriter(channel,outputSegments);
    LOG.debug("String_Node_Str" + element.id + "String_Node_Str");
    element.buffer.writeToChannel(writer);
    LOG.debug("String_Node_Str" + element.id + "String_Node_Str");
    outputSegments=writer.close();
    element.buffer.reset();
    queues.empty.put(element);
  }
  LOG.debug("String_Node_Str");
  LOG.debug("String_Node_Str");
  memoryManager.release(outputSegments);
  LOG.debug("String_Node_Str");
  while (!queues.empty.isEmpty()) {
    memoryManager.release(queues.empty.take().buffer.unbind());
  }
  while (channelIDs.size() > maxNumFileHandles) {
    channelIDs=mergeChannelList(channelIDs,ioMemorySize);
  }
  lazyIterator.setTarget(getMergingIterator(channelIDs,ioMemorySize));
  LOG.debug("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Entry point of the thread.
 */
public void go() throws Exception {
  final Channel.Enumerator enumerator=ioManager.createChannelEnumerator();
  List<Channel.ID> channelIDs=new ArrayList<Channel.ID>();
  outputSegments=memoryManager.allocate(UnilateralSortMerger.this.parent,2,ioMemorySize / 2);
  freeSegmentsAtShutdown(outputSegments);
  CircularElement element=null;
  while (isRunning() && (element=queues.spill.take()) != SENTINEL) {
    Channel.ID channel=enumerator.next();
    channelIDs.add(channel);
    ChannelWriter writer=ioManager.createChannelWriter(channel,outputSegments);
    LOG.debug("String_Node_Str" + element.id + "String_Node_Str");
    element.buffer.writeToChannel(writer);
    LOG.debug("String_Node_Str" + element.id + "String_Node_Str");
    outputSegments=writer.close();
    element.buffer.reset();
    queues.empty.put(element);
  }
  LOG.debug("String_Node_Str");
  LOG.debug("String_Node_Str");
  memoryManager.release(outputSegments);
  LOG.debug("String_Node_Str");
  while (!queues.empty.isEmpty()) {
    memoryManager.release(queues.empty.take().buffer.unbind());
  }
  while (channelIDs.size() > maxNumFileHandles) {
    channelIDs=mergeChannelList(channelIDs,ioMemorySize);
  }
  lazyIterator.setTarget(getMergingIterator(channelIDs,ioMemorySize));
  LOG.debug("String_Node_Str");
}
Program: 56212
Project: 56212
Buggy source:
/** 
 * Forces an immediate shutdown of the thread. Looses any state and all buffers that the thread is currently working on. This terminates cleanly for the JVM, but looses intermediate results.
 */
public void shutdown(){
  this.alive=false;
  this.interrupt();
}

Fixed version (ground truth):
@Override public void shutdown(){
  this.memoryManager.release(outputSegments);
  super.shutdown();
}
Program: 56218
Project: 56218
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public Plan getPlan(String... args){
  if (args.length != 3) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  int noSubTasks=Integer.parseInt(args[0]);
  String dataInput=args[1];
  String output=args[2];
  DataSourceContract<PactNull,PactString> data=new DataSourceContract<PactNull,PactString>(LineInFormat.class,dataInput,"String_Node_Str");
  data.setDegreeOfParallelism(noSubTasks);
  MapContract<PactNull,PactString,PactString,PactInteger> mapper=new MapContract<PactNull,PactString,PactString,PactInteger>(TokenizeLine.class,"String_Node_Str");
  mapper.setDegreeOfParallelism(noSubTasks);
  ReduceContract<PactString,PactInteger,PactString,PactInteger> reducer=new ReduceContract<PactString,PactInteger,PactString,PactInteger>(CountWords.class,"String_Node_Str");
  reducer.setDegreeOfParallelism(noSubTasks);
  DataSinkContract<PactString,PactInteger> out=new DataSinkContract<PactString,PactInteger>(WordCountOutFormat.class,output,"String_Node_Str");
  out.setDegreeOfParallelism(noSubTasks);
  out.setInput(reducer);
  reducer.setInput(mapper);
  mapper.setInput(data);
  return new Plan(out,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public Plan getPlan(String... args){
  int noSubTasks=(args.length > 0 ? Integer.parseInt(args[0]) : 1);
  String dataInput=(args.length > 1 ? args[1] : "String_Node_Str");
  String output=(args.length > 2 ? args[2] : "String_Node_Str");
  DataSourceContract<PactNull,PactString> data=new DataSourceContract<PactNull,PactString>(LineInFormat.class,dataInput,"String_Node_Str");
  data.setDegreeOfParallelism(noSubTasks);
  MapContract<PactNull,PactString,PactString,PactInteger> mapper=new MapContract<PactNull,PactString,PactString,PactInteger>(TokenizeLine.class,"String_Node_Str");
  mapper.setDegreeOfParallelism(noSubTasks);
  ReduceContract<PactString,PactInteger,PactString,PactInteger> reducer=new ReduceContract<PactString,PactInteger,PactString,PactInteger>(CountWords.class,"String_Node_Str");
  reducer.setDegreeOfParallelism(noSubTasks);
  DataSinkContract<PactString,PactInteger> out=new DataSinkContract<PactString,PactInteger>(WordCountOutFormat.class,output,"String_Node_Str");
  out.setDegreeOfParallelism(noSubTasks);
  out.setInput(reducer);
  reducer.setInput(mapper);
  mapper.setInput(data);
  return new Plan(out,"String_Node_Str");
}
Program: 56219
Project: 56219
Buggy source:
/** 
 * Creates a new channel selector that uses the given strategy (broadcasting, partitioning, ...), using the supplied salt to randomize hashes.
 * @param strategy The distribution strategy to be used.
 * @param salt The salt used to randomize hash values.
 */
public OutputEmitter(ShipStrategy strategy,byte[] salt){
  if (strategy != ShipStrategy.BROADCAST && strategy != ShipStrategy.PARTITION_HASH && strategy != ShipStrategy.NONE) {
    throw new UnsupportedOperationException("String_Node_Str" + strategy.name());
  }
  this.strategy=strategy;
  this.salt=salt;
}

Fixed version (ground truth):
/** 
 * Creates a new channel selector that uses the given strategy (broadcasting, partitioning, ...), using the supplied salt to randomize hashes.
 * @param strategy The distribution strategy to be used.
 * @param salt The salt used to randomize hash values.
 */
public OutputEmitter(ShipStrategy strategy,byte[] salt){
  if (strategy != ShipStrategy.BROADCAST && strategy != ShipStrategy.PARTITION_HASH && strategy != ShipStrategy.FORWARD) {
    throw new UnsupportedOperationException("String_Node_Str" + strategy.name());
  }
  this.strategy=strategy;
  this.salt=salt;
}
Program: 56220
Project: 56220
Buggy source:
@Override public int[] selectChannels(KeyValuePair<K,V> pair,int numberOfChannels){
switch (strategy) {
case BROADCAST:
    return broadcast(numberOfChannels);
case PARTITION_HASH:
  return partition(pair,numberOfChannels);
case NONE:
return robin(numberOfChannels);
default :
throw new UnsupportedOperationException();
}
}

Fixed version (ground truth):
@Override public int[] selectChannels(KeyValuePair<K,V> pair,int numberOfChannels){
switch (strategy) {
case BROADCAST:
    return broadcast(numberOfChannels);
case PARTITION_HASH:
  return partition(pair,numberOfChannels);
case FORWARD:
return robin(numberOfChannels);
default :
throw new UnsupportedOperationException();
}
}
Program: 56221
Project: 56221
Buggy source:
/** 
 * Sets the bytes the ID consists of.
 * @param src the bytes the ID consists of
 */
private void setBytes(byte[] src){
  if (src == null) {
    return;
  }
  if (src.length != SIZE) {
    return;
  }
  System.arraycopy(bytes,0,this.bytes,0,SIZE);
}

Fixed version (ground truth):
/** 
 * Sets the bytes the ID consists of.
 * @param src the bytes the ID consists of
 */
private void setBytes(byte[] src){
  if (src == null) {
    return;
  }
  if (src.length != SIZE) {
    return;
  }
  System.arraycopy(src,0,this.bytes,0,SIZE);
}
Program: 56223
Project: 56223
Buggy source:
void removeJobFromSchedule(ExecutionGraph executionGraphToRemove){
  boolean removedFromQueue=false;
  ;
synchronized (this.jobQueue) {
    final Iterator<ExecutionGraph> it=this.jobQueue.iterator();
    while (it.hasNext()) {
      final ExecutionGraph executionGraph=it.next();
      if (executionGraph.getJobID().equals(executionGraphToRemove.getJobID())) {
        removedFromQueue=true;
        it.remove();
        break;
      }
    }
  }
  if (removedFromQueue) {
    this.schedulingListener.jobRemovedFromScheduler(executionGraphToRemove);
  }
 else {
    LOG.error("String_Node_Str" + executionGraphToRemove.getJobName() + "String_Node_Str"+ executionGraphToRemove.getJobID()+ "String_Node_Str");
  }
}

Fixed version (ground truth):
void removeJobFromSchedule(ExecutionGraph executionGraphToRemove){
  boolean removedFromQueue=false;
synchronized (this.jobQueue) {
    final Iterator<ExecutionGraph> it=this.jobQueue.iterator();
    while (it.hasNext()) {
      final ExecutionGraph executionGraph=it.next();
      if (executionGraph.getJobID().equals(executionGraphToRemove.getJobID())) {
        removedFromQueue=true;
        it.remove();
        break;
      }
    }
  }
  if (removedFromQueue) {
    this.schedulingListener.jobRemovedFromScheduler(executionGraphToRemove);
  }
 else {
    LOG.error("String_Node_Str" + executionGraphToRemove.getJobName() + "String_Node_Str"+ executionGraphToRemove.getJobID()+ "String_Node_Str");
  }
}
Program: 56224
Project: 56224
Buggy source:
void removeJobFromSchedule(ExecutionGraph executionGraphToRemove){
  boolean removedFromQueue=false;
  ;
synchronized (this.jobQueue) {
    final Iterator<ExecutionGraph> it=this.jobQueue.iterator();
    while (it.hasNext()) {
      final ExecutionGraph executionGraph=it.next();
      if (executionGraph.getJobID().equals(executionGraphToRemove.getJobID())) {
        removedFromQueue=true;
        it.remove();
        break;
      }
    }
  }
  if (removedFromQueue) {
    this.schedulingListener.jobRemovedFromScheduler(executionGraphToRemove);
  }
 else {
    LOG.error("String_Node_Str" + executionGraphToRemove.getJobName() + "String_Node_Str"+ executionGraphToRemove.getJobID()+ "String_Node_Str");
  }
}

Fixed version (ground truth):
void removeJobFromSchedule(ExecutionGraph executionGraphToRemove){
  boolean removedFromQueue=false;
synchronized (this.jobQueue) {
    final Iterator<ExecutionGraph> it=this.jobQueue.iterator();
    while (it.hasNext()) {
      final ExecutionGraph executionGraph=it.next();
      if (executionGraph.getJobID().equals(executionGraphToRemove.getJobID())) {
        removedFromQueue=true;
        it.remove();
        break;
      }
    }
  }
  if (removedFromQueue) {
    this.schedulingListener.jobRemovedFromScheduler(executionGraphToRemove);
  }
 else {
    LOG.error("String_Node_Str" + executionGraphToRemove.getJobName() + "String_Node_Str"+ executionGraphToRemove.getJobID()+ "String_Node_Str");
  }
}
Program: 56225
Project: 56225
Buggy source:
private void createBufferMock(BufferedReader mock,String fileString) throws FileNotFoundException, Exception {
  FileReader reader=new FileReader(fileString);
  whenNew(FileReader.class).withArguments(fileString).thenReturn(reader);
  whenNew(BufferedReader.class).withArguments(reader).thenReturn(mock);
}

Fixed version (ground truth):
private void createBufferMock(BufferedReader mock,String fileString) throws FileNotFoundException, Exception {
  whenNew(FileReader.class).withArguments(fileString).thenReturn(this.fileReaderMock);
  whenNew(BufferedReader.class).withArguments(this.fileReaderMock).thenReturn(mock);
}
Program: 56226
Project: 56226
Buggy source:
public boolean isAnySuccessorIOBottleneck(Map<ManagementGroupEdge,Boolean> successorIOBottleneckMap){
  Boolean anySuccessorIsIOBottleneck=successorIOBottleneckMap.get(this.managementGroupEdge);
  if (anySuccessorIsIOBottleneck == null) {
    final ManagementGroupVertex groupVertex=this.managementGroupEdge.getTarget();
    for (int i=0; i < groupVertex.getNumberOfForwardEdges(); i++) {
      final ManagementGroupEdge successorEdge=groupVertex.getForwardEdge(i);
      final GroupEdgeVisualizationData groupEdgeVisualizationData=(GroupEdgeVisualizationData)successorEdge.getAttachment();
      groupEdgeVisualizationData.updateIOBottleneckFlag(successorIOBottleneckMap);
      if (groupEdgeVisualizationData.isIOBottleneck() || groupEdgeVisualizationData.isAnySuccessorIOBottleneck(successorIOBottleneckMap)) {
        successorIOBottleneckMap.put(this.managementGroupEdge,new Boolean(true));
        return true;
      }
    }
    successorIOBottleneckMap.put(this.managementGroupEdge,new Boolean(false));
    return false;
  }
  return anySuccessorIsIOBottleneck.booleanValue();
}

Fixed version (ground truth):
public boolean isAnySuccessorIOBottleneck(Map<ManagementGroupEdge,Boolean> successorIOBottleneckMap){
  Boolean anySuccessorIsIOBottleneck=successorIOBottleneckMap.get(this.managementGroupEdge);
  if (anySuccessorIsIOBottleneck == null) {
    final ManagementGroupVertex groupVertex=this.managementGroupEdge.getTarget();
    for (int i=0; i < groupVertex.getNumberOfForwardEdges(); i++) {
      final ManagementGroupEdge successorEdge=groupVertex.getForwardEdge(i);
      final GroupEdgeVisualizationData groupEdgeVisualizationData=(GroupEdgeVisualizationData)successorEdge.getAttachment();
      groupEdgeVisualizationData.updateIOBottleneckFlag(successorIOBottleneckMap);
      if (groupEdgeVisualizationData.isIOBottleneck() || groupEdgeVisualizationData.isAnySuccessorIOBottleneck(successorIOBottleneckMap)) {
        successorIOBottleneckMap.put(this.managementGroupEdge,Boolean.valueOf(true));
        return true;
      }
    }
    successorIOBottleneckMap.put(this.managementGroupEdge,Boolean.valueOf(false));
    return false;
  }
  return anySuccessorIsIOBottleneck.booleanValue();
}
Program: 56227
Project: 56227
Buggy source:
public boolean isAnySuccessorCPUBottleneck(Map<ManagementGroupVertex,Boolean> successorCPUBottleneckMap){
  Boolean anySuccessorIsCPUBottleneck=successorCPUBottleneckMap.get(this.managementGroupVertex);
  if (anySuccessorIsCPUBottleneck == null) {
    for (int i=0; i < this.managementGroupVertex.getNumberOfForwardEdges(); i++) {
      final ManagementGroupVertex targetVertex=this.managementGroupVertex.getForwardEdge(i).getTarget();
      final GroupVertexVisualizationData groupVertexVisualizationData=(GroupVertexVisualizationData)targetVertex.getAttachment();
      groupVertexVisualizationData.updateCPUBottleneckFlag(successorCPUBottleneckMap);
      if (groupVertexVisualizationData.isCPUBottleneck() || groupVertexVisualizationData.isAnySuccessorCPUBottleneck(successorCPUBottleneckMap)) {
        successorCPUBottleneckMap.put(this.managementGroupVertex,new Boolean(true));
        return true;
      }
    }
    successorCPUBottleneckMap.put(this.managementGroupVertex,new Boolean(false));
    return false;
  }
  return anySuccessorIsCPUBottleneck.booleanValue();
}

Fixed version (ground truth):
public boolean isAnySuccessorCPUBottleneck(Map<ManagementGroupVertex,Boolean> successorCPUBottleneckMap){
  Boolean anySuccessorIsCPUBottleneck=successorCPUBottleneckMap.get(this.managementGroupVertex);
  if (anySuccessorIsCPUBottleneck == null) {
    for (int i=0; i < this.managementGroupVertex.getNumberOfForwardEdges(); i++) {
      final ManagementGroupVertex targetVertex=this.managementGroupVertex.getForwardEdge(i).getTarget();
      final GroupVertexVisualizationData groupVertexVisualizationData=(GroupVertexVisualizationData)targetVertex.getAttachment();
      groupVertexVisualizationData.updateCPUBottleneckFlag(successorCPUBottleneckMap);
      if (groupVertexVisualizationData.isCPUBottleneck() || groupVertexVisualizationData.isAnySuccessorCPUBottleneck(successorCPUBottleneckMap)) {
        successorCPUBottleneckMap.put(this.managementGroupVertex,Boolean.valueOf(true));
        return true;
      }
    }
    successorCPUBottleneckMap.put(this.managementGroupVertex,Boolean.valueOf(false));
    return false;
  }
  return anySuccessorIsCPUBottleneck.booleanValue();
}