Program: 190014
Project: 190014
Buggy source:
private void writeNodes(XMLStreamWriter xmlWriter,HierarchicalGraph graph) throws Exception {
  if (cancel) {
    return;
  }
  xmlWriter.writeStartElement(NODES);
  AttributeColumn dynamicCol=dynamicCol=attributeModel.getNodeTable().getColumn(DynamicModel.TIMEINTERVAL_COLUMN);
  NodeIterable nodeIterable=exportHierarchy ? graph.getNodesTree() : graph.getNodes();
  for (  Node node : nodeIterable) {
    xmlWriter.writeStartElement(NODE);
    String id=node.getNodeData().getId();
    xmlWriter.writeAttribute(NODE_ID,id);
    if (node.getNodeData().getLabel() != null && !node.getNodeData().getLabel().isEmpty() && !node.getNodeData().getLabel().equals(id)) {
      xmlWriter.writeAttribute(NODE_LABEL,node.getNodeData().getLabel());
    }
    if (exportHierarchy) {
      Node parent=graph.getParent(node);
      if (parent != null) {
        xmlWriter.writeAttribute(NODE_PID,parent.getNodeData().getId());
      }
    }
    if (exportDynamic && dynamicCol != null && visibleInterval != null) {
      TimeInterval timeInterval=(TimeInterval)node.getNodeData().getAttributes().getValue(dynamicCol.getIndex());
      if (timeInterval != null) {
        writeTimeInterval(xmlWriter,timeInterval);
      }
    }
    if (exportAttributes && node.getNodeData().getAttributes() != null) {
      AttributeRow attributeRow=(AttributeRow)node.getNodeData().getAttributes();
      writeAttValues(xmlWriter,attributeRow,visibleInterval);
    }
    if (exportSize) {
      writeNodeSize(xmlWriter,node);
    }
    if (exportPosition) {
      writeNodePosition(xmlWriter,node);
    }
    if (exportColors) {
      writeNodeColor(xmlWriter,node);
    }
    xmlWriter.writeEndElement();
    Progress.progress(progress);
    if (cancel) {
      break;
    }
  }
  xmlWriter.writeEndElement();
}

Fixed version (ground truth):
private void writeNodes(XMLStreamWriter xmlWriter,HierarchicalGraph graph) throws Exception {
  if (cancel) {
    return;
  }
  xmlWriter.writeStartElement(NODES);
  AttributeColumn dynamicCol=dynamicCol=attributeModel.getNodeTable().getColumn(DynamicModel.TIMEINTERVAL_COLUMN);
  NodeIterable nodeIterable=exportHierarchy ? graph.getNodesTree() : graph.getNodes();
  for (  Node node : nodeIterable) {
    xmlWriter.writeStartElement(NODE);
    String id=node.getNodeData().getId();
    xmlWriter.writeAttribute(NODE_ID,id);
    if (node.getNodeData().getLabel() != null && !node.getNodeData().getLabel().isEmpty()) {
      xmlWriter.writeAttribute(NODE_LABEL,node.getNodeData().getLabel());
    }
    if (exportHierarchy) {
      Node parent=graph.getParent(node);
      if (parent != null) {
        xmlWriter.writeAttribute(NODE_PID,parent.getNodeData().getId());
      }
    }
    if (exportDynamic && dynamicCol != null && visibleInterval != null) {
      TimeInterval timeInterval=(TimeInterval)node.getNodeData().getAttributes().getValue(dynamicCol.getIndex());
      if (timeInterval != null) {
        writeTimeInterval(xmlWriter,timeInterval);
      }
    }
    if (exportAttributes && node.getNodeData().getAttributes() != null) {
      AttributeRow attributeRow=(AttributeRow)node.getNodeData().getAttributes();
      writeAttValues(xmlWriter,attributeRow,visibleInterval);
    }
    if (exportSize) {
      writeNodeSize(xmlWriter,node);
    }
    if (exportPosition) {
      writeNodePosition(xmlWriter,node);
    }
    if (exportColors) {
      writeNodeColor(xmlWriter,node);
    }
    xmlWriter.writeEndElement();
    Progress.progress(progress);
    if (cancel) {
      break;
    }
  }
  xmlWriter.writeEndElement();
}