Program: 173106
Project: 173106
Buggy source:
/** 
 * Method used to progress work
 */
public void progress(){
  for (  int t : messages.keySet()) {
    if (batchDone.get(t)) {
      continue;
    }
    boolean allFinished=true;
    Map<Integer,List<Object>> map=messages.get(t);
    Map<Integer,Boolean> finishedForTarget=finished.get(t);
    Map<Integer,Integer> countMap=counts.get(t);
    LOG.info(String.format("String_Node_Str",executor,t,countMap,finishedForTarget));
    boolean found=true;
    for (    Map.Entry<Integer,List<Object>> e : map.entrySet()) {
      if (e.getValue().size() == 0 && !finishedForTarget.get(e.getKey())) {
        found=false;
      }
      if (!finishedForTarget.get(e.getKey())) {
        allFinished=false;
      }
    }
    if (found) {
      List<Object> out=new ArrayList<>();
      for (      Map.Entry<Integer,List<Object>> e : map.entrySet()) {
        List<Object> valueList=e.getValue();
        if (valueList.size() > 0) {
          Object value=valueList.get(0);
          out.add(value);
          allFinished=false;
          valueList.remove(0);
        }
      }
      for (      Map.Entry<Integer,Integer> e : countMap.entrySet()) {
        Integer i=e.getValue();
        e.setValue(i - 1);
      }
      finalMessages.get(t).addAll(out);
    }
 else {
      allFinished=false;
    }
    if (allFinished) {
      LOG.info(String.format("String_Node_Str",executor,t));
      batchDone.put(t,true);
      Object previous=null;
      List<Object> finalMessagePerTask=finalMessages.get(t);
      for (int i=0; i < finalMessagePerTask.size(); i++) {
        if (previous == null) {
          previous=finalMessagePerTask.get(i);
        }
 else {
          Object current=finalMessagePerTask.get(i);
          previous=reduceFunction.reduce(previous,current);
        }
      }
      reduceReceiver.receive(t,previous);
    }
  }
}

Fixed version (ground truth):
/** 
 * Method used to progress work
 */
public void progress(){
  for (  int t : messages.keySet()) {
    if (batchDone.get(t)) {
      continue;
    }
    boolean allFinished=true;
    Map<Integer,List<Object>> map=messages.get(t);
    Map<Integer,Boolean> finishedForTarget=finished.get(t);
    Map<Integer,Integer> countMap=counts.get(t);
    Map<Integer,Integer> totalCountMap=totalCounts.get(t);
    boolean found=true;
    for (    Map.Entry<Integer,List<Object>> e : map.entrySet()) {
      if (e.getValue().size() == 0 && !finishedForTarget.get(e.getKey())) {
        found=false;
      }
      if (!finishedForTarget.get(e.getKey())) {
        allFinished=false;
      }
    }
    if (found) {
      List<Object> out=new ArrayList<>();
      for (      Map.Entry<Integer,List<Object>> e : map.entrySet()) {
        List<Object> valueList=e.getValue();
        if (valueList.size() > 0) {
          Object value=valueList.get(0);
          out.add(value);
          allFinished=false;
          valueList.remove(0);
        }
      }
      for (      Map.Entry<Integer,Integer> e : countMap.entrySet()) {
        Integer i=e.getValue();
        e.setValue(i - 1);
      }
      finalMessages.get(t).addAll(out);
    }
 else {
      allFinished=false;
    }
    if (allFinished) {
      LOG.info(String.format("String_Node_Str",executor,t));
      batchDone.put(t,true);
      Object previous=null;
      List<Object> finalMessagePerTask=finalMessages.get(t);
      for (int i=0; i < finalMessagePerTask.size(); i++) {
        if (previous == null) {
          previous=finalMessagePerTask.get(i);
        }
 else {
          Object current=finalMessagePerTask.get(i);
          previous=reduceFunction.reduce(previous,current);
        }
      }
      reduceReceiver.receive(t,previous);
    }
  }
}