Program: 142650
Project: 142650
Buggy source:
public void writeGraphView(XMLStreamWriter writer,GraphViewImpl graphView) throws XMLStreamException {
  writer.writeStartElement(ELEMENT_VIEW);
  writer.writeAttribute("String_Node_Str",String.valueOf(graphView.getViewId()));
  writer.writeAttribute("String_Node_Str",String.valueOf(graphView.getEdgesCountEnabled()));
  writer.writeAttribute("String_Node_Str",String.valueOf(graphView.getEdgesCountTotal()));
  writer.writeAttribute("String_Node_Str",String.valueOf(graphView.getMutualEdgesEnabled()));
  writer.writeAttribute("String_Node_Str",String.valueOf(graphView.getMutualEdgesTotal()));
  writer.writeAttribute("String_Node_Str",String.valueOf(graphView.getNodesEnabled()));
  for (TreeListIterator itr=new TreeListIterator(graphView.getStructure().getTree(),1); itr.hasNext(); ) {
    AbstractNode node=itr.next();
    writer.writeStartElement(ELEMENT_TREESTRUCTURE_NODE);
    writer.writeAttribute("String_Node_Str",String.valueOf(node.getInView(0).pre));
    writer.writeAttribute("String_Node_Str",String.valueOf(node.isEnabled()));
    writer.writeAttribute("String_Node_Str",String.valueOf(node.pre));
    writer.writeAttribute("String_Node_Str",String.valueOf(node.parent.pre));
    writer.writeAttribute("String_Node_Str",String.valueOf(node.getEnabledInDegree()));
    writer.writeAttribute("String_Node_Str",String.valueOf(node.getEnabledOutDegree()));
    writer.writeAttribute("String_Node_Str",String.valueOf(node.getEnabledMutualDegree()));
    writer.writeEndElement();
  }
  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();
      writer.writeStartElement(ELEMENT_VIEW_EDGE);
      writer.writeAttribute("String_Node_Str",String.valueOf(node.pre));
      writer.writeAttribute("String_Node_Str",String.valueOf(edge.getTarget(graphView.getViewId()).pre));
      writer.writeAttribute("String_Node_Str",String.valueOf(edge.getId()));
      writer.writeEndElement();
    }
  }
  writer.writeEndElement();
}

Fixed version (ground truth):
public void writeGraphView(XMLStreamWriter writer,GraphViewImpl graphView) throws XMLStreamException {
  writer.writeStartElement(ELEMENT_VIEW);
  writer.writeAttribute("String_Node_Str",String.valueOf(graphView.getViewId()));
  writer.writeAttribute("String_Node_Str",String.valueOf(graphView.getEdgesCountEnabled()));
  writer.writeAttribute("String_Node_Str",String.valueOf(graphView.getEdgesCountTotal()));
  writer.writeAttribute("String_Node_Str",String.valueOf(graphView.getMutualEdgesEnabled()));
  writer.writeAttribute("String_Node_Str",String.valueOf(graphView.getMutualEdgesTotal()));
  writer.writeAttribute("String_Node_Str",String.valueOf(graphView.getNodesEnabled()));
  for (TreeListIterator itr=new TreeListIterator(graphView.getStructure().getTree(),1); itr.hasNext(); ) {
    AbstractNode node=itr.next();
    writer.writeStartElement(ELEMENT_VIEW_NODE);
    writer.writeAttribute("String_Node_Str",String.valueOf(node.getInView(0).pre));
    writer.writeAttribute("String_Node_Str",String.valueOf(node.isEnabled()));
    writer.writeAttribute("String_Node_Str",String.valueOf(node.pre));
    writer.writeAttribute("String_Node_Str",String.valueOf(node.parent.pre));
    writer.writeAttribute("String_Node_Str",String.valueOf(node.getEnabledInDegree()));
    writer.writeAttribute("String_Node_Str",String.valueOf(node.getEnabledOutDegree()));
    writer.writeAttribute("String_Node_Str",String.valueOf(node.getEnabledMutualDegree()));
    writer.writeEndElement();
  }
  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();
      writer.writeStartElement(ELEMENT_VIEW_EDGE);
      writer.writeAttribute("String_Node_Str",String.valueOf(edge.getId()));
      writer.writeEndElement();
    }
  }
  writer.writeEndElement();
}