Program: 173055
Project: 173055
Buggy source:
/** 
 * Initialize
 * @param cfg
 * @param t
 * @param taskPlan
 * @param edge
 */
public void init(Config cfg,MessageType t,TaskPlan taskPlan,int edge){
  this.thisSources=TaskPlanUtils.getTasksOfThisExecutor(taskPlan,sources);
  LOG.info(String.format("String_Node_Str",taskPlan.getThisExecutor(),thisSources));
  this.thisTasks=taskPlan.getTasksOfThisExecutor();
  this.router=new PartitionRouter(taskPlan,sources,destinations);
  Map<Integer,Set<Integer>> internal=router.getInternalSendTasks(0);
  Map<Integer,Set<Integer>> external=router.getExternalSendTasks(0);
  this.instancePlan=taskPlan;
  this.type=t;
  LOG.info(String.format("String_Node_Str",taskPlan.getThisExecutor()));
  for (  int s : thisSources) {
    Set<Integer> integerSetMap=internal.get(s);
    if (integerSetMap != null) {
      this.dests.internal.addAll(integerSetMap);
    }
    Set<Integer> integerSetMap1=external.get(s);
    if (integerSetMap1 != null) {
      this.dests.external.addAll(integerSetMap1);
    }
    LOG.info(String.format("String_Node_Str",taskPlan.getThisExecutor(),s));
    break;
  }
  LOG.info(String.format("String_Node_Str",taskPlan.getThisExecutor()));
  if (this.finalReceiver != null && isLastReceiver()) {
    this.finalReceiver.init(cfg,this,receiveExpectedTaskIds());
  }
  Map<Integer,ArrayBlockingQueue<Pair<Object,MPISendMessage>>> pendingSendMessagesPerSource=new HashMap<>();
  Map<Integer,Queue<Pair<Object,MPIMessage>>> pendingReceiveMessagesPerSource=new HashMap<>();
  Map<Integer,Queue<MPIMessage>> pendingReceiveDeSerializations=new HashMap<>();
  Map<Integer,MessageSerializer> serializerMap=new HashMap<>();
  Map<Integer,MessageDeSerializer> deSerializerMap=new HashMap<>();
  Set<Integer> srcs=TaskPlanUtils.getTasksOfThisExecutor(taskPlan,sources);
  for (  int s : srcs) {
    ArrayBlockingQueue<Pair<Object,MPISendMessage>> pendingSendMessages=new ArrayBlockingQueue<Pair<Object,MPISendMessage>>(MPIContext.sendPendingMax(cfg));
    pendingSendMessagesPerSource.put(s,pendingSendMessages);
    serializerMap.put(s,new MPIMessageSerializer(new KryoSerializer()));
  }
  int maxReceiveBuffers=MPIContext.receiveBufferCount(cfg);
  int receiveExecutorsSize=receivingExecutors().size();
  if (receiveExecutorsSize == 0) {
    receiveExecutorsSize=1;
  }
  Set<Integer> execs=router.receivingExecutors();
  for (  int e : execs) {
    int capacity=maxReceiveBuffers * 2 * receiveExecutorsSize;
    Queue<Pair<Object,MPIMessage>> pendingReceiveMessages=new ArrayBlockingQueue<Pair<Object,MPIMessage>>(capacity);
    pendingReceiveMessagesPerSource.put(e,pendingReceiveMessages);
    pendingReceiveDeSerializations.put(e,new ArrayBlockingQueue<MPIMessage>(capacity));
    deSerializerMap.put(e,new MPIMessageDeSerializer(new KryoSerializer()));
  }
  KryoSerializer kryoSerializer=new KryoSerializer();
  kryoSerializer.init(new HashMap<String,Object>());
  MessageDeSerializer messageDeSerializer=new MPIMessageDeSerializer(kryoSerializer);
  MessageSerializer messageSerializer=new MPIMessageSerializer(kryoSerializer);
  delegete.init(cfg,t,taskPlan,edge,router.receivingExecutors(),router.isLastReceiver(),this,pendingSendMessagesPerSource,pendingReceiveMessagesPerSource,pendingReceiveDeSerializations,serializerMap,deSerializerMap,false);
}

Fixed version (ground truth):
/** 
 * Initialize
 */
public void init(Config cfg,MessageType t,TaskPlan taskPlan,int edge){
  this.thisSources=TaskPlanUtils.getTasksOfThisExecutor(taskPlan,sources);
  LOG.info(String.format("String_Node_Str",taskPlan.getThisExecutor(),thisSources));
  this.thisTasks=taskPlan.getTasksOfThisExecutor();
  this.router=new PartitionRouter(taskPlan,sources,destinations);
  Map<Integer,Set<Integer>> internal=router.getInternalSendTasks(0);
  Map<Integer,Set<Integer>> external=router.getExternalSendTasks(0);
  this.instancePlan=taskPlan;
  this.type=t;
  LOG.info(String.format("String_Node_Str",taskPlan.getThisExecutor()));
  for (  int s : thisSources) {
    Set<Integer> integerSetMap=internal.get(s);
    if (integerSetMap != null) {
      this.dests.internal.addAll(integerSetMap);
    }
    Set<Integer> integerSetMap1=external.get(s);
    if (integerSetMap1 != null) {
      this.dests.external.addAll(integerSetMap1);
    }
    LOG.info(String.format("String_Node_Str",taskPlan.getThisExecutor(),s));
    break;
  }
  LOG.info(String.format("String_Node_Str",taskPlan.getThisExecutor()));
  if (this.finalReceiver != null && isLastReceiver()) {
    this.finalReceiver.init(cfg,this,receiveExpectedTaskIds());
  }
  Map<Integer,ArrayBlockingQueue<Pair<Object,MPISendMessage>>> pendingSendMessagesPerSource=new HashMap<>();
  Map<Integer,Queue<Pair<Object,MPIMessage>>> pendingReceiveMessagesPerSource=new HashMap<>();
  Map<Integer,Queue<MPIMessage>> pendingReceiveDeSerializations=new HashMap<>();
  Map<Integer,MessageSerializer> serializerMap=new HashMap<>();
  Map<Integer,MessageDeSerializer> deSerializerMap=new HashMap<>();
  Set<Integer> srcs=TaskPlanUtils.getTasksOfThisExecutor(taskPlan,sources);
  for (  int s : srcs) {
    ArrayBlockingQueue<Pair<Object,MPISendMessage>> pendingSendMessages=new ArrayBlockingQueue<Pair<Object,MPISendMessage>>(MPIContext.sendPendingMax(cfg));
    pendingSendMessagesPerSource.put(s,pendingSendMessages);
    serializerMap.put(s,new MPIMessageSerializer(new KryoSerializer()));
  }
  int maxReceiveBuffers=MPIContext.receiveBufferCount(cfg);
  int receiveExecutorsSize=receivingExecutors().size();
  if (receiveExecutorsSize == 0) {
    receiveExecutorsSize=1;
  }
  Set<Integer> execs=router.receivingExecutors();
  for (  int e : execs) {
    int capacity=maxReceiveBuffers * 2 * receiveExecutorsSize;
    Queue<Pair<Object,MPIMessage>> pendingReceiveMessages=new ArrayBlockingQueue<Pair<Object,MPIMessage>>(capacity);
    pendingReceiveMessagesPerSource.put(e,pendingReceiveMessages);
    pendingReceiveDeSerializations.put(e,new ArrayBlockingQueue<MPIMessage>(capacity));
    deSerializerMap.put(e,new MPIMessageDeSerializer(new KryoSerializer()));
  }
  KryoSerializer kryoSerializer=new KryoSerializer();
  kryoSerializer.init(new HashMap<String,Object>());
  MessageDeSerializer messageDeSerializer=new MPIMessageDeSerializer(kryoSerializer);
  MessageSerializer messageSerializer=new MPIMessageSerializer(kryoSerializer);
  delegete.init(cfg,t,taskPlan,edge,router.receivingExecutors(),router.isLastReceiver(),this,pendingSendMessagesPerSource,pendingReceiveMessagesPerSource,pendingReceiveDeSerializations,serializerMap,deSerializerMap,false);
}