Program: 172869
Project: 172869
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()));
  try {
    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;
    }
  }
 catch (  Throwable te) {
    te.printStackTrace();
  }
  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,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=TaskPlanUtils.getTasksOfThisExecutor(taskPlan,sources);
  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()));
  }
  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.thisSources=TaskPlanUtils.getTasksOfThisWorker(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()));
  try {
    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;
    }
  }
 catch (  Throwable te) {
    te.printStackTrace();
  }
  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,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=TaskPlanUtils.getTasksOfThisWorker(taskPlan,sources);
  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()));
  }
  delegete.init(cfg,t,taskPlan,edge,router.receivingExecutors(),router.isLastReceiver(),this,pendingSendMessagesPerSource,pendingReceiveMessagesPerSource,pendingReceiveDeSerializations,serializerMap,deSerializerMap,false);
}