Program: 190464
Project: 190464
Buggy source:
@Before public void setUp(){
  DhnsGraphController controller=new DhnsGraphController();
  dhnsGlobal=new Dhns(controller,null);
  graphGlobal=new HierarchicalDirectedGraphImpl(dhnsGlobal,dhnsGlobal.getGraphStructure());
  nodeMap=new HashMap<String,Node>();
  edgeMap=new HashMap<String,Edge>();
  TreeStructure treeStructure=dhnsGlobal.getGraphStructure().getStructure();
  GraphFactoryImpl factory=dhnsGlobal.factory();
  for (int i=0; i < 10; i++) {
    Node node=factory.newNode();
    node.getNodeData().setLabel("String_Node_Str" + i);
    graphGlobal.addNode(node);
    nodeMap.put(node.getNodeData().getLabel(),node);
  }
  Node node0=nodeMap.get("String_Node_Str");
  Node node1=nodeMap.get("String_Node_Str");
  Node node2=nodeMap.get("String_Node_Str");
  Node node3=nodeMap.get("String_Node_Str");
  Node node4=nodeMap.get("String_Node_Str");
  Node node5=nodeMap.get("String_Node_Str");
  Node node6=nodeMap.get("String_Node_Str");
  Node node7=nodeMap.get("String_Node_Str");
  Node node8=nodeMap.get("String_Node_Str");
  AbstractEdge edge1=factory.newEdge(node4,node5,1f,true);
  AbstractEdge edge2=factory.newEdge(node5,node6,4f,true);
  AbstractEdge edge3=factory.newEdge(node6,node5,3f,true);
  AbstractEdge edge4=factory.newEdge(node7,node7,5f,true);
  AbstractEdge edge5=factory.newEdge(node4,node4,2f,true);
  AbstractEdge edge6=factory.newEdge(node2,node1,1f,true);
  AbstractEdge edge7=factory.newEdge(node2,node3,10f,true);
  AbstractEdge edge8=factory.newEdge(node2,node5,12f,true);
  graphGlobal.addEdge(edge1);
  graphGlobal.addEdge(edge2);
  graphGlobal.addEdge(edge3);
  graphGlobal.addEdge(edge4);
  graphGlobal.addEdge(edge5);
  graphGlobal.addEdge(edge6);
  graphGlobal.addEdge(edge7);
  graphGlobal.addEdge(edge8);
  edgeMap.put("String_Node_Str",edge1);
  edgeMap.put("String_Node_Str",edge2);
  edgeMap.put("String_Node_Str",edge3);
  edgeMap.put("String_Node_Str",edge4);
  edgeMap.put("String_Node_Str",edge5);
  edgeMap.put("String_Node_Str",edge6);
  edgeMap.put("String_Node_Str",edge7);
  edgeMap.put("String_Node_Str",edge8);
}

Fixed version (ground truth):
@Before public void setUp(){
  DhnsGraphController controller=new DhnsGraphController();
  dhnsGlobal=new Dhns(controller,null);
  graphGlobal=new HierarchicalDirectedGraphImplFiltered(dhnsGlobal,dhnsGlobal.getGraphStructure(),dhnsGlobal.getViewManager().getVisibleView());
  nodeMap=new HashMap<String,Node>();
  edgeMap=new HashMap<String,Edge>();
  TreeStructure treeStructure=dhnsGlobal.getGraphStructure().getStructure();
  GraphFactoryImpl factory=dhnsGlobal.factory();
  for (int i=0; i < 10; i++) {
    Node node=factory.newNode();
    node.getNodeData().setLabel("String_Node_Str" + i);
    graphGlobal.addNode(node);
    nodeMap.put(node.getNodeData().getLabel(),node);
  }
  Node node0=nodeMap.get("String_Node_Str");
  Node node1=nodeMap.get("String_Node_Str");
  Node node2=nodeMap.get("String_Node_Str");
  Node node3=nodeMap.get("String_Node_Str");
  Node node4=nodeMap.get("String_Node_Str");
  Node node5=nodeMap.get("String_Node_Str");
  Node node6=nodeMap.get("String_Node_Str");
  Node node7=nodeMap.get("String_Node_Str");
  Node node8=nodeMap.get("String_Node_Str");
  AbstractEdge edge1=factory.newEdge(node4,node5,1f,true);
  AbstractEdge edge2=factory.newEdge(node5,node6,4f,true);
  AbstractEdge edge3=factory.newEdge(node6,node5,3f,true);
  AbstractEdge edge4=factory.newEdge(node7,node7,5f,true);
  AbstractEdge edge5=factory.newEdge(node4,node4,2f,true);
  AbstractEdge edge6=factory.newEdge(node2,node1,1f,true);
  AbstractEdge edge7=factory.newEdge(node2,node3,10f,true);
  AbstractEdge edge8=factory.newEdge(node2,node5,12f,true);
  graphGlobal.addEdge(edge1);
  graphGlobal.addEdge(edge2);
  graphGlobal.addEdge(edge3);
  graphGlobal.addEdge(edge4);
  graphGlobal.addEdge(edge5);
  graphGlobal.addEdge(edge6);
  graphGlobal.addEdge(edge7);
  graphGlobal.addEdge(edge8);
  edgeMap.put("String_Node_Str",edge1);
  edgeMap.put("String_Node_Str",edge2);
  edgeMap.put("String_Node_Str",edge3);
  edgeMap.put("String_Node_Str",edge4);
  edgeMap.put("String_Node_Str",edge5);
  edgeMap.put("String_Node_Str",edge6);
  edgeMap.put("String_Node_Str",edge7);
  edgeMap.put("String_Node_Str",edge8);
}