Program: 143039
Project: 143039
Buggy source:
public Element writeGraphView(Document document,GraphViewImpl graphView){
  Element viewE=document.createElement(ELEMENT_VIEW);
  viewE.setAttribute("String_Node_Str",String.valueOf(graphView.getViewId()));
  viewE.setAttribute("String_Node_Str",String.valueOf(graphView.getEdgesCountEnabled()));
  viewE.setAttribute("String_Node_Str",String.valueOf(graphView.getEdgesCountTotal()));
  viewE.setAttribute("String_Node_Str",String.valueOf(graphView.getMutualEdgesEnabled()));
  viewE.setAttribute("String_Node_Str",String.valueOf(graphView.getMutualEdgesTotal()));
  viewE.setAttribute("String_Node_Str",String.valueOf(graphView.getNodesEnabled()));
  for (TreeListIterator itr=new TreeListIterator(graphView.getStructure().getTree(),1); itr.hasNext(); ) {
    AbstractNode node=itr.next();
    Element nodeE=document.createElement(ELEMENT_TREESTRUCTURE_NODE);
    nodeE.setAttribute("String_Node_Str",String.valueOf(node.getInView(0).pre));
    nodeE.setAttribute("String_Node_Str",String.valueOf(node.isEnabled()));
    nodeE.setAttribute("String_Node_Str",String.valueOf(node.pre));
    nodeE.setAttribute("String_Node_Str",String.valueOf(node.parent.pre));
    nodeE.setAttribute("String_Node_Str",String.valueOf(node.getEnabledInDegree()));
    nodeE.setAttribute("String_Node_Str",String.valueOf(node.getEnabledOutDegree()));
    nodeE.setAttribute("String_Node_Str",String.valueOf(node.getEnabledMutualDegree()));
  }
  ParamAVLIterator<AbstractEdge> edgeIterator=new ParamAVLIterator<AbstractEdge>();
  for (TreeListIterator itr=new TreeListIterator(graphView.getStructure().getTree(),1); itr.hasNext(); ) {
    AbstractNode node=itr.next();
    for (edgeIterator.setNode(node.getEdgesOutTree()); edgeIterator.hasNext(); ) {
      AbstractEdge edge=edgeIterator.next();
      Element edgeE=document.createElement(ELEMENT_VIEW_EDGE);
      edgeE.setAttribute("String_Node_Str",String.valueOf(node.pre));
      edgeE.setAttribute("String_Node_Str",String.valueOf(edge.getTarget(graphView.getViewId()).pre));
      edgeE.setAttribute("String_Node_Str",String.valueOf(edge.getId()));
    }
  }
  return viewE;
}

Fixed version (ground truth):
public Element writeGraphView(Document document,GraphViewImpl graphView){
  Element viewE=document.createElement(ELEMENT_VIEW);
  viewE.setAttribute("String_Node_Str",String.valueOf(graphView.getViewId()));
  viewE.setAttribute("String_Node_Str",String.valueOf(graphView.getEdgesCountEnabled()));
  viewE.setAttribute("String_Node_Str",String.valueOf(graphView.getEdgesCountTotal()));
  viewE.setAttribute("String_Node_Str",String.valueOf(graphView.getMutualEdgesEnabled()));
  viewE.setAttribute("String_Node_Str",String.valueOf(graphView.getMutualEdgesTotal()));
  viewE.setAttribute("String_Node_Str",String.valueOf(graphView.getNodesEnabled()));
  for (TreeListIterator itr=new TreeListIterator(graphView.getStructure().getTree(),1); itr.hasNext(); ) {
    AbstractNode node=itr.next();
    Element nodeE=document.createElement(ELEMENT_TREESTRUCTURE_NODE);
    nodeE.setAttribute("String_Node_Str",String.valueOf(node.getInView(0).pre));
    nodeE.setAttribute("String_Node_Str",String.valueOf(node.isEnabled()));
    nodeE.setAttribute("String_Node_Str",String.valueOf(node.pre));
    nodeE.setAttribute("String_Node_Str",String.valueOf(node.parent.pre));
    nodeE.setAttribute("String_Node_Str",String.valueOf(node.getEnabledInDegree()));
    nodeE.setAttribute("String_Node_Str",String.valueOf(node.getEnabledOutDegree()));
    nodeE.setAttribute("String_Node_Str",String.valueOf(node.getEnabledMutualDegree()));
  }
  ParamAVLIterator<AbstractEdge> edgeIterator=new ParamAVLIterator<AbstractEdge>();
  for (TreeListIterator itr=new TreeListIterator(graphView.getStructure().getTree(),1); itr.hasNext(); ) {
    AbstractNode node=itr.next();
    for (edgeIterator.setNode(node.getEdgesOutTree()); edgeIterator.hasNext(); ) {
      AbstractEdge edge=edgeIterator.next();
      Element edgeE=document.createElement(ELEMENT_VIEW_EDGE);
      edgeE.setAttribute("String_Node_Str",String.valueOf(node.pre));
      edgeE.setAttribute("String_Node_Str",String.valueOf(edge.getTarget(graphView.getViewId()).pre));
      edgeE.setAttribute("String_Node_Str",String.valueOf(edge.getId()));
    }
  }
  graphView.getStructureModifier().getEdgeProcessor().computeMetaEdges();
  return viewE;
}