Program: 143057
Project: 143057
Buggy source:
private void exportData(Graph graph,AttributeModel attributeModel) throws Exception {
  Progress.start(progressTicket);
  defaultNodeColumns(graph);
  defaultEdgeColumns(graph);
  attributesNodeColumns(attributeModel);
  attributesEdgeColumns(attributeModel);
  StringBuilder stringBuilder=new StringBuilder();
  stringBuilder.append("String_Node_Str");
  for (  NodeColumnsGDF c : defaultNodeColumnsGDFs) {
    if (c.isEnable()) {
      stringBuilder.append(c.getTitle());
      stringBuilder.append("String_Node_Str");
      stringBuilder.append(c.getType().toString().toUpperCase());
      if (c.getDefaultValue() != null) {
        stringBuilder.append("String_Node_Str");
        stringBuilder.append(c.getDefaultValue().toString());
      }
      stringBuilder.append("String_Node_Str");
    }
  }
  for (  AttributeColumn c : nodeColumns) {
    if (c.getOrigin().equals(AttributeOrigin.PROPERTY)) {
      stringBuilder.append(c.getTitle());
      stringBuilder.append("String_Node_Str");
      DataTypeGDF dataTypeGDF=getDataTypeGDF(c.getType());
      stringBuilder.append(dataTypeGDF.toString().toUpperCase());
      if (c.getDefaultValue() != null) {
        stringBuilder.append("String_Node_Str");
        stringBuilder.append(c.getDefaultValue().toString());
      }
      stringBuilder.append("String_Node_Str");
    }
  }
  stringBuilder.setLength(stringBuilder.length() - 1);
  stringBuilder.append("String_Node_Str");
  graph.readLock();
  if (normalize) {
    calculateMinMax(graph);
  }
  int max=graph.getNodeCount() + graph.getEdgeCount();
  Progress.switchToDeterminate(progressTicket,max);
  for (  Node node : graph.getNodes()) {
    NodeData nodeData=node.getNodeData();
    stringBuilder.append(nodeData.getId());
    stringBuilder.append("String_Node_Str");
    for (    NodeColumnsGDF c : defaultNodeColumnsGDFs) {
      if (c.isEnable()) {
        c.writeData(stringBuilder,node);
      }
      stringBuilder.append("String_Node_Str");
    }
    for (    AttributeColumn c : nodeColumns) {
      Object val=node.getNodeData().getAttributes().getValue(c.getIndex());
      if (val != null) {
        if (c.getType().equals(AttributeType.STRING) || c.getType().equals(AttributeType.LIST_STRING)) {
          String quote=(simpleQuotes) ? "String_Node_Str" : "String_Node_Str";
          stringBuilder.append(quote);
          stringBuilder.append(val.toString());
          stringBuilder.append(quote);
        }
 else {
          stringBuilder.append(val.toString());
        }
      }
    }
    stringBuilder.setLength(stringBuilder.length() - 1);
    stringBuilder.append("String_Node_Str");
    Progress.progress(progressTicket);
  }
  stringBuilder.append("String_Node_Str");
  for (  EdgeColumnsGDF c : defaultEdgeColumnsGDFs) {
    if (c.isEnable()) {
      stringBuilder.append(c.getTitle());
      stringBuilder.append("String_Node_Str");
      stringBuilder.append(c.getType().toString().toUpperCase());
      if (c.getDefaultValue() != null) {
        stringBuilder.append("String_Node_Str");
        stringBuilder.append(c.getDefaultValue().toString());
      }
      stringBuilder.append("String_Node_Str");
    }
  }
  for (  AttributeColumn c : edgeColumns) {
    if (c.getOrigin().equals(AttributeOrigin.PROPERTY)) {
      stringBuilder.append(c.getTitle());
      stringBuilder.append("String_Node_Str");
      DataTypeGDF dataTypeGDF=getDataTypeGDF(c.getType());
      stringBuilder.append(dataTypeGDF.toString().toUpperCase());
      if (c.getDefaultValue() != null) {
        stringBuilder.append("String_Node_Str");
        stringBuilder.append(c.getDefaultValue().toString());
      }
      stringBuilder.append("String_Node_Str");
    }
  }
  stringBuilder.setLength(stringBuilder.length() - 1);
  stringBuilder.append("String_Node_Str");
  EdgeIterable edgeIterable;
  if (graph.getGraphModel().isHierarchical()) {
    HierarchicalGraph hierarchicalGraph=(HierarchicalGraph)graph;
    edgeIterable=hierarchicalGraph.getEdgesAndMetaEdges();
  }
 else {
    edgeIterable=graph.getEdges();
  }
  for (  Edge edge : edgeIterable) {
    stringBuilder.append(edge.getSource().getNodeData().getId());
    stringBuilder.append("String_Node_Str");
    stringBuilder.append(edge.getTarget().getNodeData().getId());
    stringBuilder.append("String_Node_Str");
    for (    EdgeColumnsGDF c : defaultEdgeColumnsGDFs) {
      if (c.isEnable()) {
        c.writeData(stringBuilder,edge);
      }
      stringBuilder.append("String_Node_Str");
    }
    for (    AttributeColumn c : nodeColumns) {
      Object val=edge.getEdgeData().getAttributes().getValue(c.getIndex());
      if (val != null) {
        if (c.getType().equals(AttributeType.STRING) || c.getType().equals(AttributeType.LIST_STRING)) {
          String quote=(simpleQuotes) ? "String_Node_Str" : "String_Node_Str";
          stringBuilder.append(quote);
          stringBuilder.append(val.toString());
          stringBuilder.append(quote);
        }
 else {
          stringBuilder.append(val.toString());
        }
      }
      stringBuilder.append("String_Node_Str");
    }
    stringBuilder.setLength(stringBuilder.length() - 1);
    stringBuilder.append("String_Node_Str");
    Progress.progress(progressTicket);
  }
  graph.readUnlock();
  writer.append(stringBuilder);
  Progress.finish(progressTicket);
}

Fixed version (ground truth):
private void exportData(Graph graph,AttributeModel attributeModel) throws Exception {
  Progress.start(progressTicket);
  defaultNodeColumns(graph);
  defaultEdgeColumns(graph);
  attributesNodeColumns(attributeModel);
  attributesEdgeColumns(attributeModel);
  StringBuilder stringBuilder=new StringBuilder();
  stringBuilder.append("String_Node_Str");
  for (  NodeColumnsGDF c : defaultNodeColumnsGDFs) {
    if (c.isEnable()) {
      stringBuilder.append(c.getTitle());
      stringBuilder.append("String_Node_Str");
      stringBuilder.append(c.getType().toString().toUpperCase());
      if (c.getDefaultValue() != null) {
        stringBuilder.append("String_Node_Str");
        stringBuilder.append(c.getDefaultValue().toString());
      }
      stringBuilder.append("String_Node_Str");
    }
  }
  for (  AttributeColumn c : nodeColumns) {
    if (!c.getOrigin().equals(AttributeOrigin.PROPERTY)) {
      stringBuilder.append(c.getTitle());
      stringBuilder.append("String_Node_Str");
      DataTypeGDF dataTypeGDF=getDataTypeGDF(c.getType());
      stringBuilder.append(dataTypeGDF.toString().toUpperCase());
      if (c.getDefaultValue() != null) {
        stringBuilder.append("String_Node_Str");
        stringBuilder.append(c.getDefaultValue().toString());
      }
      stringBuilder.append("String_Node_Str");
    }
  }
  stringBuilder.setLength(stringBuilder.length() - 1);
  stringBuilder.append("String_Node_Str");
  graph.readLock();
  if (normalize) {
    calculateMinMax(graph);
  }
  int max=graph.getNodeCount() + graph.getEdgeCount();
  Progress.switchToDeterminate(progressTicket,max);
  for (  Node node : graph.getNodes()) {
    NodeData nodeData=node.getNodeData();
    stringBuilder.append(nodeData.getId());
    stringBuilder.append("String_Node_Str");
    for (    NodeColumnsGDF c : defaultNodeColumnsGDFs) {
      if (c.isEnable()) {
        c.writeData(stringBuilder,node);
        stringBuilder.append("String_Node_Str");
      }
    }
    for (    AttributeColumn c : nodeColumns) {
      if (!c.getOrigin().equals(AttributeOrigin.PROPERTY)) {
        Object val=node.getNodeData().getAttributes().getValue(c.getIndex());
        if (val != null) {
          if (c.getType().equals(AttributeType.STRING) || c.getType().equals(AttributeType.LIST_STRING)) {
            String quote=!useQuotes ? "String_Node_Str" : simpleQuotes ? "String_Node_Str" : "String_Node_Str";
            stringBuilder.append(quote);
            stringBuilder.append(val.toString());
            stringBuilder.append(quote);
          }
 else {
            stringBuilder.append(val.toString());
          }
        }
        stringBuilder.append("String_Node_Str");
      }
    }
    stringBuilder.setLength(stringBuilder.length() - 1);
    stringBuilder.append("String_Node_Str");
    Progress.progress(progressTicket);
  }
  stringBuilder.append("String_Node_Str");
  for (  EdgeColumnsGDF c : defaultEdgeColumnsGDFs) {
    if (c.isEnable()) {
      stringBuilder.append(c.getTitle());
      stringBuilder.append("String_Node_Str");
      stringBuilder.append(c.getType().toString().toUpperCase());
      if (c.getDefaultValue() != null) {
        stringBuilder.append("String_Node_Str");
        stringBuilder.append(c.getDefaultValue().toString());
      }
      stringBuilder.append("String_Node_Str");
    }
  }
  for (  AttributeColumn c : edgeColumns) {
    if (c.getOrigin().equals(AttributeOrigin.PROPERTY)) {
      stringBuilder.append(c.getTitle());
      stringBuilder.append("String_Node_Str");
      DataTypeGDF dataTypeGDF=getDataTypeGDF(c.getType());
      stringBuilder.append(dataTypeGDF.toString().toUpperCase());
      if (c.getDefaultValue() != null) {
        stringBuilder.append("String_Node_Str");
        stringBuilder.append(c.getDefaultValue().toString());
      }
      stringBuilder.append("String_Node_Str");
    }
  }
  stringBuilder.setLength(stringBuilder.length() - 1);
  stringBuilder.append("String_Node_Str");
  EdgeIterable edgeIterable;
  if (graph.getGraphModel().isHierarchical()) {
    HierarchicalGraph hierarchicalGraph=(HierarchicalGraph)graph;
    edgeIterable=hierarchicalGraph.getEdgesAndMetaEdges();
  }
 else {
    edgeIterable=graph.getEdges();
  }
  for (  Edge edge : edgeIterable) {
    stringBuilder.append(edge.getSource().getNodeData().getId());
    stringBuilder.append("String_Node_Str");
    stringBuilder.append(edge.getTarget().getNodeData().getId());
    stringBuilder.append("String_Node_Str");
    for (    EdgeColumnsGDF c : defaultEdgeColumnsGDFs) {
      if (c.isEnable()) {
        c.writeData(stringBuilder,edge);
        stringBuilder.append("String_Node_Str");
      }
    }
    for (    AttributeColumn c : nodeColumns) {
      Object val=edge.getEdgeData().getAttributes().getValue(c.getIndex());
      if (val != null) {
        if (c.getType().equals(AttributeType.STRING) || c.getType().equals(AttributeType.LIST_STRING)) {
          String quote=!useQuotes ? "String_Node_Str" : simpleQuotes ? "String_Node_Str" : "String_Node_Str";
          stringBuilder.append(quote);
          stringBuilder.append(val.toString());
          stringBuilder.append(quote);
        }
 else {
          stringBuilder.append(val.toString());
        }
      }
      stringBuilder.append("String_Node_Str");
    }
    stringBuilder.setLength(stringBuilder.length() - 1);
    stringBuilder.append("String_Node_Str");
    Progress.progress(progressTicket);
  }
  graph.readUnlock();
  writer.append(stringBuilder);
  Progress.finish(progressTicket);
}