Program: 142651
Project: 142651
Buggy source:
public void readGraphView(XMLStreamReader reader,GraphStructure graphStructure) throws XMLStreamException {
  GraphViewImpl graphView=graphStructure.createView(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  graphView.setEdgesCountEnabled(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  graphView.setEdgesCountTotal(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  graphView.setMutualEdgesEnabled(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  graphView.setMutualEdgesTotal(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  graphView.setNodesEnabled(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  TreeStructure mainStructure=graphStructure.getMainView().getStructure();
  TreeStructure treeStructure=graphView.getStructure();
  boolean end=false;
  while (reader.hasNext() && !end) {
    int type=reader.next();
switch (type) {
case XMLStreamReader.START_ELEMENT:
      String name=reader.getLocalName();
    if (ELEMENT_VIEW_NODE.equalsIgnoreCase(name)) {
      Boolean enabled=Boolean.parseBoolean(reader.getAttributeValue(null,"String_Node_Str"));
      AbstractNode mainNode=mainStructure.getNodeAt(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
      AbstractNode parentNode=treeStructure.getNodeAt(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
      AbstractNode node=new AbstractNode(mainNode.getNodeData(),graphView.getViewId(),0,0,0,parentNode);
      Integer inDegree=Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str"));
      Integer outDegree=Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str"));
      Integer mutualDegree=Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str"));
      node.setEnabledInDegree(inDegree);
      node.setEnabledOutDegree(outDegree);
      node.setEnabledMutualDegree(mutualDegree);
      node.setEnabled(enabled);
      treeStructure.insertAsChild(node,parentNode);
    }
 else     if (ELEMENT_VIEW_EDGE.equalsIgnoreCase(name)) {
      AbstractEdge edge=graphStructure.getEdgeFromDictionnary(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
      AbstractNode source=treeStructure.getNodeAt(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
      AbstractNode target=treeStructure.getNodeAt(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
      source.getEdgesOutTree().add(edge);
      target.getEdgesInTree().add(edge);
    }
  break;
case XMLStreamReader.END_ELEMENT:
if (ELEMENT_VIEW.equalsIgnoreCase(reader.getLocalName())) {
  end=true;
}
break;
}
}
graphView.getStructureModifier().getEdgeProcessor().computeMetaEdges();
}

Fixed version (ground truth):
public void readGraphView(XMLStreamReader reader,GraphStructure graphStructure) throws XMLStreamException {
  GraphViewImpl graphView=graphStructure.createView(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  graphView.setEdgesCountEnabled(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  graphView.setEdgesCountTotal(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  graphView.setMutualEdgesEnabled(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  graphView.setMutualEdgesTotal(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  graphView.setNodesEnabled(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  TreeStructure mainStructure=graphStructure.getMainView().getStructure();
  TreeStructure treeStructure=graphView.getStructure();
  boolean end=false;
  while (reader.hasNext() && !end) {
    int type=reader.next();
switch (type) {
case XMLStreamReader.START_ELEMENT:
      String name=reader.getLocalName();
    if (ELEMENT_VIEW_NODE.equalsIgnoreCase(name)) {
      Boolean enabled=Boolean.parseBoolean(reader.getAttributeValue(null,"String_Node_Str"));
      AbstractNode mainNode=mainStructure.getNodeAt(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
      AbstractNode parentNode=treeStructure.getNodeAt(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
      AbstractNode node=new AbstractNode(mainNode.getNodeData(),graphView.getViewId(),0,0,0,parentNode);
      Integer inDegree=Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str"));
      Integer outDegree=Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str"));
      Integer mutualDegree=Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str"));
      node.setEnabledInDegree(inDegree);
      node.setEnabledOutDegree(outDegree);
      node.setEnabledMutualDegree(mutualDegree);
      node.setEnabled(enabled);
      treeStructure.insertAsChild(node,parentNode);
    }
 else     if (ELEMENT_VIEW_EDGE.equalsIgnoreCase(name)) {
      AbstractEdge edge=graphStructure.getEdgeFromDictionnary(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
      AbstractNode source=edge.getSource(graphView.getViewId());
      AbstractNode target=edge.getTarget(graphView.getViewId());
      source.getEdgesOutTree().add(edge);
      target.getEdgesInTree().add(edge);
    }
  break;
case XMLStreamReader.END_ELEMENT:
if (ELEMENT_VIEW.equalsIgnoreCase(reader.getLocalName())) {
  end=true;
}
break;
}
}
graphView.getStructureModifier().getEdgeProcessor().computeMetaEdges();
}