Program: 173172
Project: 173172
Buggy source:
/** 
 * Initialize the data structure
 * @param cfg
 * @param plan
 * @param root
 * @param dests
 */
public InvertedBinaryTreeRouter(Config cfg,TaskPlan plan,int root,Set<Integer> dests,int index){
  int interNodeDegree=MPIContext.interNodeDegree(cfg,2);
  int intraNodeDegree=MPIContext.intraNodeDegree(cfg,2);
  this.executor=plan.getThisExecutor();
  this.mainTaskLast=false;
  BinaryTree tree=new BinaryTree(interNodeDegree,intraNodeDegree,plan,root,dests);
  Node treeRoot=tree.buildInterGroupTree(index);
  Set<Integer> thisExecutorTasks=plan.getChannelsOfExecutor(plan.getThisExecutor());
  Set<Integer> thisExecutorTasksOfOperation=new HashSet<>();
  for (  int t : thisExecutorTasks) {
    if (dests.contains(t) || root == t) {
      thisExecutorTasksOfOperation.add(t);
    }
  }
  LOG.info(String.format("String_Node_Str",plan.getThisExecutor(),thisExecutorTasksOfOperation.toString()));
  this.destinationIdentifiers=new HashMap<>();
  this.receiveTasks=new HashMap<Integer,List<Integer>>();
  sendExternalTasksPartial=new HashMap<>();
  sendInternalTasks=new HashMap<>();
  sendExternalTasks=new HashMap<>();
  receiveExecutors=new HashSet<>();
  for (  int t : thisExecutorTasksOfOperation) {
    List<Integer> recv=new ArrayList<>();
    Node search=BinaryTree.search(treeRoot,t);
    if (search != null) {
      mainTask=search.getTaskId();
      LOG.info(String.format("String_Node_Str",plan.getThisExecutor(),mainTask));
      for (      int k : search.getRemoteChildrenIds()) {
        receiveExecutors.add(plan.getExecutorForChannel(k));
      }
      recv.addAll(search.getAllChildrenIds());
      receiveTasks.put(t,new ArrayList<>(recv));
      List<Integer> directChildren=search.getDirectChildren();
      for (      int child : directChildren) {
        Set<Integer> sendTasks=new HashSet<>();
        sendTasks.add(t);
        sendInternalTasks.put(child,sendTasks);
        destinationIdentifiers.put(child,t);
      }
      Node parent=search.getParent();
      if (parent != null) {
        Set<Integer> sendTasks=new HashSet<>();
        sendTasks.add(parent.getTaskId());
        sendExternalTasksPartial.put(t,sendTasks);
        destinationIdentifiers.put(t,parent.getTaskId());
      }
 else {
        mainTaskLast=true;
      }
    }
 else {
      LOG.info(String.format("String_Node_Str",plan.getThisExecutor(),t));
    }
  }
  LOG.info(String.format("String_Node_Str",plan.getThisExecutor(),sendInternalTasks));
  LOG.info(String.format("String_Node_Str",plan.getThisExecutor(),sendExternalTasks));
  LOG.info(String.format("String_Node_Str",plan.getThisExecutor(),sendExternalTasksPartial));
  LOG.info(String.format("String_Node_Str",plan.getThisExecutor(),receiveExecutors));
  LOG.info(String.format("String_Node_Str",plan.getThisExecutor(),receiveTasks));
}

Fixed version (ground truth):
/** 
 * Initialize the data structure
 * @param cfg
 * @param plan
 * @param root
 * @param dests
 */
public InvertedBinaryTreeRouter(Config cfg,TaskPlan plan,int root,Set<Integer> dests,int index){
  int interNodeDegree=MPIContext.interNodeDegree(cfg,2);
  int intraNodeDegree=MPIContext.intraNodeDegree(cfg,2);
  this.executor=plan.getThisExecutor();
  this.mainTaskLast=false;
  BinaryTree tree=new BinaryTree(interNodeDegree,intraNodeDegree,plan,root,dests);
  Node treeRoot=tree.buildInterGroupTree(index);
  Set<Integer> thisExecutorTasks=plan.getChannelsOfExecutor(plan.getThisExecutor());
  Set<Integer> thisExecutorTasksOfOperation=new HashSet<>();
  for (  int t : thisExecutorTasks) {
    if (dests.contains(t) || root == t) {
      thisExecutorTasksOfOperation.add(t);
    }
  }
  LOG.info(String.format("String_Node_Str",plan.getThisExecutor(),thisExecutorTasksOfOperation.toString()));
  this.destinationIdentifiers=new HashMap<>();
  this.receiveTasks=new HashMap<Integer,List<Integer>>();
  sendExternalTasksPartial=new HashMap<>();
  sendInternalTasks=new HashMap<>();
  sendExternalTasks=new HashMap<>();
  receiveExecutors=new HashSet<>();
  for (  int t : thisExecutorTasksOfOperation) {
    List<Integer> recv=new ArrayList<>();
    Node search=BinaryTree.search(treeRoot,t);
    if (search != null) {
      mainTask=search.getTaskId();
      LOG.info(String.format("String_Node_Str",plan.getThisExecutor(),mainTask));
      for (      int k : search.getRemoteChildrenIds()) {
        receiveExecutors.add(plan.getExecutorForChannel(k));
      }
      recv.addAll(search.getAllChildrenIds());
      receiveTasks.put(t,new ArrayList<>(recv));
      List<Integer> directChildren=search.getDirectChildren();
      for (      int child : directChildren) {
        Set<Integer> sendTasks=new HashSet<>();
        sendTasks.add(t);
        sendInternalTasks.put(child,sendTasks);
        destinationIdentifiers.put(child,t);
      }
      Node parent=search.getParent();
      if (parent != null) {
        Set<Integer> sendTasks=new HashSet<>();
        sendTasks.add(parent.getTaskId());
        sendExternalTasksPartial.put(t,sendTasks);
        destinationIdentifiers.put(t,parent.getTaskId());
      }
 else {
        mainTaskLast=true;
      }
    }
 else {
      LOG.info(String.format("String_Node_Str",plan.getThisExecutor(),t));
    }
  }
}