Program: 190463
Project: 190463
Buggy source:
@Test public void testMetaEdges(){
  Dhns dhns=new Dhns(new DhnsGraphController(),null);
  GraphStructure graphStructure=dhns.getGraphStructure();
  HierarchicalGraph graph=dhns.getHierarchicalDirectedGraph();
  TreeStructure treeStructure=graphStructure.getStructure();
  GraphFactoryImpl factoryImpl=dhns.factory();
  AbstractNode na=factoryImpl.newNode();
  na.getNodeData().setLabel("String_Node_Str");
  AbstractNode nb=factoryImpl.newNode();
  nb.getNodeData().setLabel("String_Node_Str");
  AbstractNode nc=factoryImpl.newNode();
  nc.getNodeData().setLabel("String_Node_Str");
  AbstractNode nd=factoryImpl.newNode();
  nd.getNodeData().setLabel("String_Node_Str");
  AbstractNode ne=factoryImpl.newNode();
  ne.getNodeData().setLabel("String_Node_Str");
  AbstractNode nf=factoryImpl.newNode();
  nf.getNodeData().setLabel("String_Node_Str");
  AbstractNode ng=factoryImpl.newNode();
  ng.getNodeData().setLabel("String_Node_Str");
  treeStructure.insertAsChild(na,treeStructure.getRoot());
  treeStructure.insertAsChild(nb,na);
  treeStructure.insertAsChild(ne,na);
  treeStructure.insertAsChild(nc,nb);
  treeStructure.insertAsChild(nd,nb);
  treeStructure.insertAsChild(nf,ne);
  treeStructure.insertAsChild(ng,ne);
  nb.setEnabled(true);
  ne.setEnabled(true);
  AbstractEdge ebe=factoryImpl.newEdge(nb,ne);
  AbstractEdge ecd=factoryImpl.newEdge(nc,nd);
  AbstractEdge egb=factoryImpl.newEdge(ng,nb);
  AbstractEdge efa=factoryImpl.newEdge(nf,na);
  graph.addEdge(ebe);
  graph.addEdge(ecd);
  graph.addEdge(egb);
  graph.addEdge(efa);
  treeStructure.showTreeAsTable();
  Edge[] actual=graph.getMetaEdges().toArray();
  for (int i=0; i < actual.length; i++) {
    System.out.println(actual[i].getSource().getNodeData().getLabel() + "String_Node_Str" + actual[i].getTarget().getNodeData().getLabel());
  }
  graph=dhns.getHierarchicalDirectedGraphVisible();
  ((ViewImpl)graph.getView()).checkUpdate();
  actual=graph.getMetaEdges().toArray();
  for (int i=0; i < actual.length; i++) {
    System.out.println(actual[i].getSource().getNodeData().getLabel() + "String_Node_Str" + actual[i].getTarget().getNodeData().getLabel());
  }
}

Fixed version (ground truth):
@Test public void testMetaEdges(){
  Dhns dhns=new Dhns(new DhnsGraphController(),null);
  GraphStructure graphStructure=dhns.getGraphStructure();
  HierarchicalGraph graph=dhns.getHierarchicalDirectedGraph();
  TreeStructure treeStructure=graphStructure.getStructure();
  GraphFactoryImpl factoryImpl=dhns.factory();
  AbstractNode na=factoryImpl.newNode();
  na.getNodeData().setLabel("String_Node_Str");
  AbstractNode nb=factoryImpl.newNode();
  nb.getNodeData().setLabel("String_Node_Str");
  AbstractNode nc=factoryImpl.newNode();
  nc.getNodeData().setLabel("String_Node_Str");
  AbstractNode nd=factoryImpl.newNode();
  nd.getNodeData().setLabel("String_Node_Str");
  AbstractNode ne=factoryImpl.newNode();
  ne.getNodeData().setLabel("String_Node_Str");
  AbstractNode nf=factoryImpl.newNode();
  nf.getNodeData().setLabel("String_Node_Str");
  AbstractNode ng=factoryImpl.newNode();
  ng.getNodeData().setLabel("String_Node_Str");
  treeStructure.insertAsChild(na,treeStructure.getRoot());
  treeStructure.insertAsChild(nb,na);
  treeStructure.insertAsChild(ne,na);
  treeStructure.insertAsChild(nc,nb);
  treeStructure.insertAsChild(nd,nb);
  treeStructure.insertAsChild(nf,ne);
  treeStructure.insertAsChild(ng,ne);
  nb.setEnabled(true);
  ne.setEnabled(true);
  AbstractEdge ebe=factoryImpl.newEdge(nb,ne);
  AbstractEdge ecd=factoryImpl.newEdge(nc,nd);
  AbstractEdge egb=factoryImpl.newEdge(ng,nb);
  AbstractEdge efa=factoryImpl.newEdge(nf,na);
  graph.addEdge(ebe);
  graph.addEdge(ecd);
  graph.addEdge(egb);
  graph.addEdge(efa);
  Edge[] actual=graph.getMetaEdges().toArray();
  for (int i=0; i < actual.length; i++) {
    System.out.println(actual[i].getSource().getNodeData().getLabel() + "String_Node_Str" + actual[i].getTarget().getNodeData().getLabel());
  }
  graph=dhns.getHierarchicalDirectedGraphVisible();
  ((ViewImpl)graph.getView()).checkUpdate();
  actual=graph.getMetaEdges().toArray();
  for (int i=0; i < actual.length; i++) {
    System.out.println(actual[i].getSource().getNodeData().getLabel() + "String_Node_Str" + actual[i].getTarget().getNodeData().getLabel());
  }
}