Program: 172871
Project: 172871
Buggy source:
/** 
 * Initialize
 * @param cfg
 * @param t
 * @param taskPlan
 * @param edge
 */
public void init(Config cfg,MessageType t,TaskPlan taskPlan,int edge){
  this.instancePlan=taskPlan;
  this.config=cfg;
  this.type=t;
  this.executor=instancePlan.getThisExecutor();
  this.router=new InvertedBinaryTreeRouter(cfg,taskPlan,destination,sources,index);
  if (this.partialReceiver != null && !isLastReceiver()) {
    partialReceiver.init(cfg,this,receiveExpectedTaskIds());
  }
  if (this.finalReceiver != null && isLastReceiver()) {
    this.finalReceiver.init(cfg,this,receiveExpectedTaskIds());
  }
  LOG.log(Level.FINE,String.format("String_Node_Str",executor,sources,destination,router.sendQueueIds()));
  Map<Integer,ArrayBlockingQueue<Pair<Object,OutMessage>>> pendingSendMessagesPerSource=new HashMap<>();
  Map<Integer,Queue<Pair<Object,ChannelMessage>>> pendingReceiveMessagesPerSource=new HashMap<>();
  Map<Integer,Queue<ChannelMessage>> pendingReceiveDeSerializations=new HashMap<>();
  Map<Integer,MessageSerializer> serializerMap=new HashMap<>();
  Map<Integer,MessageDeSerializer> deSerializerMap=new HashMap<>();
  Set<Integer> srcs=router.sendQueueIds();
  for (  int s : srcs) {
    ArrayBlockingQueue<Pair<Object,OutMessage>> pendingSendMessages=new ArrayBlockingQueue<Pair<Object,OutMessage>>(DataFlowContext.sendPendingMax(cfg));
    pendingSendMessagesPerSource.put(s,pendingSendMessages);
    serializerMap.put(s,new SingleMessageSerializer(new KryoSerializer()));
  }
  int maxReceiveBuffers=DataFlowContext.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,ChannelMessage>> pendingReceiveMessages=new ArrayBlockingQueue<Pair<Object,ChannelMessage>>(capacity);
    pendingReceiveMessagesPerSource.put(e,pendingReceiveMessages);
    pendingReceiveDeSerializations.put(e,new ArrayBlockingQueue<ChannelMessage>(capacity));
    deSerializerMap.put(e,new SingleMessageDeSerializer(new KryoSerializer()));
  }
  Set<Integer> sourcesOfThisExec=TaskPlanUtils.getTasksOfThisExecutor(taskPlan,sources);
  for (  int s : sourcesOfThisExec) {
    sendRoutingParameters(s,pathToUse);
    partialSendRoutingParameters(s,pathToUse);
  }
  this.delegete.setCompletionListener(completionListener);
  delegete.init(cfg,t,taskPlan,edge,router.receivingExecutors(),router.isLastReceiver(),this,pendingSendMessagesPerSource,pendingReceiveMessagesPerSource,pendingReceiveDeSerializations,serializerMap,deSerializerMap,false);
}

Fixed version (ground truth):
/** 
 * Initialize
 * @param cfg
 * @param t
 * @param taskPlan
 * @param edge
 */
public void init(Config cfg,MessageType t,TaskPlan taskPlan,int edge){
  this.instancePlan=taskPlan;
  this.config=cfg;
  this.type=t;
  this.executor=instancePlan.getThisExecutor();
  this.router=new InvertedBinaryTreeRouter(cfg,taskPlan,destination,sources,index);
  if (this.partialReceiver != null && !isLastReceiver()) {
    partialReceiver.init(cfg,this,receiveExpectedTaskIds());
  }
  if (this.finalReceiver != null && isLastReceiver()) {
    this.finalReceiver.init(cfg,this,receiveExpectedTaskIds());
  }
  LOG.log(Level.FINE,String.format("String_Node_Str",executor,sources,destination,router.sendQueueIds()));
  Map<Integer,ArrayBlockingQueue<Pair<Object,OutMessage>>> pendingSendMessagesPerSource=new HashMap<>();
  Map<Integer,Queue<Pair<Object,ChannelMessage>>> pendingReceiveMessagesPerSource=new HashMap<>();
  Map<Integer,Queue<ChannelMessage>> pendingReceiveDeSerializations=new HashMap<>();
  Map<Integer,MessageSerializer> serializerMap=new HashMap<>();
  Map<Integer,MessageDeSerializer> deSerializerMap=new HashMap<>();
  Set<Integer> srcs=router.sendQueueIds();
  for (  int s : srcs) {
    ArrayBlockingQueue<Pair<Object,OutMessage>> pendingSendMessages=new ArrayBlockingQueue<Pair<Object,OutMessage>>(DataFlowContext.sendPendingMax(cfg));
    pendingSendMessagesPerSource.put(s,pendingSendMessages);
    serializerMap.put(s,new SingleMessageSerializer(new KryoSerializer()));
  }
  int maxReceiveBuffers=DataFlowContext.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,ChannelMessage>> pendingReceiveMessages=new ArrayBlockingQueue<Pair<Object,ChannelMessage>>(capacity);
    pendingReceiveMessagesPerSource.put(e,pendingReceiveMessages);
    pendingReceiveDeSerializations.put(e,new ArrayBlockingQueue<ChannelMessage>(capacity));
    deSerializerMap.put(e,new SingleMessageDeSerializer(new KryoSerializer()));
  }
  Set<Integer> sourcesOfThisExec=TaskPlanUtils.getTasksOfThisWorker(taskPlan,sources);
  for (  int s : sourcesOfThisExec) {
    sendRoutingParameters(s,pathToUse);
    partialSendRoutingParameters(s,pathToUse);
  }
  this.delegete.setCompletionListener(completionListener);
  delegete.init(cfg,t,taskPlan,edge,router.receivingExecutors(),router.isLastReceiver(),this,pendingSendMessagesPerSource,pendingReceiveMessagesPerSource,pendingReceiveDeSerializations,serializerMap,deSerializerMap,false);
}