Program: 189861
Project: 189861
Buggy source:
public void readTreeStructure(XMLStreamReader reader,GraphStructure graphStructure,GraphFactoryImpl factory) throws XMLStreamException {
  graphStructure.getMainView().setEdgesCountEnabled(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  graphStructure.getMainView().setEdgesCountTotal(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  graphStructure.getMainView().setMutualEdgesEnabled(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  graphStructure.getMainView().setMutualEdgesTotal(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  graphStructure.getMainView().setNodesEnabled(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  TreeStructure treeStructure=graphStructure.getMainView().getStructure();
  boolean end=false;
  while (reader.hasNext() && !end) {
    int type=reader.next();
switch (type) {
case XMLStreamReader.START_ELEMENT:
      String name=reader.getLocalName();
    if (ELEMENT_TREESTRUCTURE_NODE.equalsIgnoreCase(name)) {
      Boolean enabled=Boolean.parseBoolean(reader.getAttributeValue(null,"String_Node_Str"));
      AbstractNode parentNode=treeStructure.getNodeAt(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
      AbstractNode absNode=new AbstractNode(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")),0,0,0,0,parentNode);
      absNode.setEnabled(enabled);
      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"));
      absNode.setEnabledInDegree(inDegree);
      absNode.setEnabledOutDegree(outDegree);
      absNode.setEnabledMutualDegree(mutualDegree);
      absNode.getNodeData().setAttributes(factory.newNodeAttributes(absNode.getNodeData()));
      absNode.getNodeData().setTextData(factory.newTextData());
      treeStructure.insertAsChild(absNode,parentNode);
      graphStructure.addToDictionnary(absNode);
    }
  break;
case XMLStreamReader.END_ELEMENT:
if (ELEMENT_TREESTRUCTURE.equalsIgnoreCase(reader.getLocalName())) {
  end=true;
}
break;
}
}
}

Fixed version (ground truth):
public void readTreeStructure(XMLStreamReader reader,GraphStructure graphStructure,GraphFactoryImpl factory) throws XMLStreamException {
  graphStructure.getMainView().setEdgesCountEnabled(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  graphStructure.getMainView().setEdgesCountTotal(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  graphStructure.getMainView().setMutualEdgesEnabled(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  graphStructure.getMainView().setMutualEdgesTotal(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  graphStructure.getMainView().setNodesEnabled(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
  TreeStructure treeStructure=graphStructure.getMainView().getStructure();
  boolean end=false;
  while (reader.hasNext() && !end) {
    int type=reader.next();
switch (type) {
case XMLStreamReader.START_ELEMENT:
      String name=reader.getLocalName();
    if (ELEMENT_TREESTRUCTURE_NODE.equalsIgnoreCase(name)) {
      Boolean enabled=Boolean.parseBoolean(reader.getAttributeValue(null,"String_Node_Str"));
      AbstractNode parentNode=treeStructure.getNodeAt(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")));
      AbstractNode absNode=new AbstractNode(Integer.parseInt(reader.getAttributeValue(null,"String_Node_Str")),0,0,0,0,parentNode);
      absNode.setEnabled(enabled);
      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"));
      absNode.setEnabledInDegree(inDegree);
      absNode.setEnabledOutDegree(outDegree);
      absNode.setEnabledMutualDegree(mutualDegree);
      absNode.getNodeData().setAttributes(factory.newNodeAttributes(absNode.getNodeData()));
      absNode.getNodeData().setId(String.valueOf(absNode.getId()));
      absNode.getNodeData().setTextData(factory.newTextData());
      treeStructure.insertAsChild(absNode,parentNode);
      graphStructure.addToDictionnary(absNode);
    }
  break;
case XMLStreamReader.END_ELEMENT:
if (ELEMENT_TREESTRUCTURE.equalsIgnoreCase(reader.getLocalName())) {
  end=true;
}
break;
}
}
}