Program: 57736
Project: 57736
Buggy source:
private void createNodes(){
  linearizedNodes.clear();
  branchNodes.clear();
  branchNodesToLinearizedNodesMap.clear();
  linearizedNodesToIncomingBranchSummaryNodesMap.clear();
  linearizedNodesToOutgoingBranchSummaryNodesMap.clear();
  createNodesForList(linearizedNodes,path);
  for (int i=0; i < linearizedNodes.size(); i++) {
    ALinearizableNode currentNode=linearizedNodes.get(i);
    PathwayVertexRep currentVertexRep=currentNode.getPathwayVertexRep();
    PathwayVertexRep prevVertexRep=null;
    PathwayVertexRep nextVertexRep=null;
    if (i > 0) {
      ALinearizableNode prevNode=linearizedNodes.get(i - 1);
      prevVertexRep=prevNode.getPathwayVertexRep();
    }
    if (i != linearizedNodes.size() - 1) {
      ALinearizableNode nextNode=linearizedNodes.get(i + 1);
      nextVertexRep=nextNode.getPathwayVertexRep();
    }
    BranchSummaryNode incomingNode=new BranchSummaryNode(this,lastNodeId++,currentNode);
    BranchSummaryNode outgoingNode=new BranchSummaryNode(this,lastNodeId++,currentNode);
    List<PathwayVertexRep> sourceVertexReps=Graphs.successorListOf(pathway,currentVertexRep);
    sourceVertexReps.remove(prevVertexRep);
    List<PathwayVertexRep> targetVertexReps=Graphs.predecessorListOf(pathway,currentVertexRep);
    targetVertexReps.remove(nextVertexRep);
    if (sourceVertexReps.size() > 0) {
      List<ALinearizableNode> sourceNodes=new ArrayList<ALinearizableNode>();
      createNodesForList(sourceNodes,sourceVertexReps);
      incomingNode.setBranchNodes(sourceNodes);
      linearizedNodesToIncomingBranchSummaryNodesMap.put(currentNode,incomingNode);
      branchNodes.add(incomingNode);
      branchNodes.addAll(sourceNodes);
      for (      ANode node : sourceNodes) {
        ((ALinearizableNode)node).setPreviewMode(true);
        branchNodesToLinearizedNodesMap.put(node,currentNode);
      }
    }
    if (targetVertexReps.size() > 0) {
      List<ALinearizableNode> targetNodes=new ArrayList<ALinearizableNode>();
      createNodesForList(targetNodes,targetVertexReps);
      outgoingNode.setBranchNodes(targetNodes);
      linearizedNodesToOutgoingBranchSummaryNodesMap.put(currentNode,outgoingNode);
      branchNodes.add(outgoingNode);
      branchNodes.addAll(targetNodes);
      for (      ANode node : targetNodes) {
        ((ALinearizableNode)node).setPreviewMode(true);
        branchNodesToLinearizedNodesMap.put(node,currentNode);
      }
    }
  }
}

Fixed version (ground truth):
private void createNodes(){
  linearizedNodes.clear();
  branchNodes.clear();
  branchNodesToLinearizedNodesMap.clear();
  linearizedNodesToIncomingBranchSummaryNodesMap.clear();
  linearizedNodesToOutgoingBranchSummaryNodesMap.clear();
  createNodesForList(linearizedNodes,path);
  for (int i=0; i < linearizedNodes.size(); i++) {
    ALinearizableNode currentNode=linearizedNodes.get(i);
    PathwayVertexRep currentVertexRep=currentNode.getPathwayVertexRep();
    PathwayVertexRep prevVertexRep=null;
    PathwayVertexRep nextVertexRep=null;
    if (i > 0) {
      ALinearizableNode prevNode=linearizedNodes.get(i - 1);
      prevVertexRep=prevNode.getPathwayVertexRep();
    }
    if (i != linearizedNodes.size() - 1) {
      ALinearizableNode nextNode=linearizedNodes.get(i + 1);
      nextVertexRep=nextNode.getPathwayVertexRep();
    }
    BranchSummaryNode incomingNode=new BranchSummaryNode(this,lastNodeId++,currentNode);
    BranchSummaryNode outgoingNode=new BranchSummaryNode(this,lastNodeId++,currentNode);
    List<PathwayVertexRep> sourceVertexReps=Graphs.predecessorListOf(pathway,currentVertexRep);
    sourceVertexReps.remove(prevVertexRep);
    List<PathwayVertexRep> targetVertexReps=Graphs.successorListOf(pathway,currentVertexRep);
    targetVertexReps.remove(nextVertexRep);
    if (sourceVertexReps.size() > 0) {
      List<ALinearizableNode> sourceNodes=new ArrayList<ALinearizableNode>();
      createNodesForList(sourceNodes,sourceVertexReps);
      incomingNode.setBranchNodes(sourceNodes);
      linearizedNodesToIncomingBranchSummaryNodesMap.put(currentNode,incomingNode);
      branchNodes.add(incomingNode);
      branchNodes.addAll(sourceNodes);
      for (      ANode node : sourceNodes) {
        ((ALinearizableNode)node).setPreviewMode(true);
        branchNodesToLinearizedNodesMap.put(node,currentNode);
      }
    }
    if (targetVertexReps.size() > 0) {
      List<ALinearizableNode> targetNodes=new ArrayList<ALinearizableNode>();
      createNodesForList(targetNodes,targetVertexReps);
      outgoingNode.setBranchNodes(targetNodes);
      linearizedNodesToOutgoingBranchSummaryNodesMap.put(currentNode,outgoingNode);
      branchNodes.add(outgoingNode);
      branchNodes.addAll(targetNodes);
      for (      ANode node : targetNodes) {
        ((ALinearizableNode)node).setPreviewMode(true);
        branchNodesToLinearizedNodesMap.put(node,currentNode);
      }
    }
  }
}