Program: 172868
Project: 172868
Buggy source:
/** 
 * Initialize
 */
public void init(Config cfg,MessageType t,TaskPlan taskPlan,int edge){
  this.type=t;
  this.instancePlan=taskPlan;
  this.executor=taskPlan.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());
  }
  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 MultiMessageSerializer(new KryoSerializer(),executor));
  }
  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 MultiMessageDeserializer(new KryoSerializer(),executor));
  }
  Set<Integer> sourcesOfThisExec=TaskPlanUtils.getTasksOfThisExecutor(taskPlan,sources);
  for (  int s : sourcesOfThisExec) {
    sendRoutingParameters(s,pathToUse);
    partialSendRoutingParameters(s,pathToUse);
  }
  delegete.init(cfg,t,t,keyType,keyType,taskPlan,edge,router.receivingExecutors(),router.isLastReceiver(),this,pendingSendMessagesPerSource,pendingReceiveMessagesPerSource,pendingReceiveDeSerializations,serializerMap,deSerializerMap,isKeyed);
}

Fixed version (ground truth):
/** 
 * Initialize
 */
public void init(Config cfg,MessageType t,TaskPlan taskPlan,int edge){
  this.type=t;
  this.instancePlan=taskPlan;
  this.executor=taskPlan.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());
  }
  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 MultiMessageSerializer(new KryoSerializer(),executor));
  }
  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 MultiMessageDeserializer(new KryoSerializer(),executor));
  }
  Set<Integer> sourcesOfThisExec=TaskPlanUtils.getTasksOfThisWorker(taskPlan,sources);
  for (  int s : sourcesOfThisExec) {
    sendRoutingParameters(s,pathToUse);
    partialSendRoutingParameters(s,pathToUse);
  }
  delegete.init(cfg,t,t,keyType,keyType,taskPlan,edge,router.receivingExecutors(),router.isLastReceiver(),this,pendingSendMessagesPerSource,pendingReceiveMessagesPerSource,pendingReceiveDeSerializations,serializerMap,deSerializerMap,isKeyed);
}