Program: 90358
Project: 90358
Buggy source:
/** 
 * @param vertices list of current vertices created from the sentence
 * @param sentNum index of the current sentence from the list of sentences
 * @param source name of the data source
 * @param phrase property value to be added to the vertex
 * @param label property of the vertex
 * @return new list of vertices the sentence
 */
private List<Vertex> updateVertexList(List<Vertex> vertices,int sentNum,String source,String phrase,String label){
  if (label.startsWith("String_Node_Str")) {
    String vertexType="String_Node_Str";
    label=label.replace("String_Node_Str","String_Node_Str");
    Item matchingSchema=ontology.getProperties().getVertices().findPropertyKey(vertexType,label);
    if (matchingSchema != null) {
      boolean updated=false;
      for (int i=vertices.size() - 1; i >= 0; i--) {
        Vertex currentVertex=vertices.get(i);
        if ((currentVertex.getVertexType().equalsIgnoreCase("String_Node_Str")) && (!currentVertex.getProperties().containsKey(label))) {
          currentVertex.addProperty(label,phrase);
          updated=true;
          break;
        }
      }
      if (!updated) {
        String id="String_Node_Str" + sentNum + "String_Node_Str"+ vertices.size();
        Vertex newVertex=new Vertex(id,vertexType);
        newVertex.addProperty(label,phrase);
        newVertex.addProperty("String_Node_Str",source);
        vertices.add(newVertex);
      }
    }
 else {
      System.err.println("String_Node_Str" + label + "String_Node_Str"+ phrase+ "String_Node_Str");
    }
  }
 else   if (label.startsWith("String_Node_Str")) {
    String vertexType="String_Node_Str";
    if (label.equalsIgnoreCase("String_Node_Str")) {
      label="String_Node_Str";
    }
 else     if ((label.equalsIgnoreCase("String_Node_Str")) || (label.equalsIgnoreCase("String_Node_Str"))) {
      label="String_Node_Str";
    }
    Item matchingSchema=ontology.getProperties().getVertices().findPropertyKey(vertexType,label);
    if (matchingSchema != null) {
      boolean updated=false;
      for (int i=vertices.size() - 1; i >= 0; i--) {
        Vertex currentVertex=vertices.get(i);
        if ((currentVertex.getVertexType().equalsIgnoreCase("String_Node_Str")) && (!currentVertex.getProperties().containsKey(label))) {
          currentVertex.addProperty(label,phrase);
          updated=true;
          break;
        }
      }
      if (!updated) {
        String id="String_Node_Str" + sentNum + "String_Node_Str"+ vertices.size();
        Vertex newVertex=new Vertex(id,vertexType);
        newVertex.addProperty(label,phrase);
        newVertex.addProperty("String_Node_Str",source);
        vertices.add(newVertex);
      }
    }
 else     if (label.equalsIgnoreCase("String_Node_Str")) {
      Vertex newVertex=new Vertex(phrase,vertexType);
      newVertex.addProperty("String_Node_Str",source);
      vertices.add(newVertex);
    }
 else {
      System.err.println("String_Node_Str" + label + "String_Node_Str"+ phrase+ "String_Node_Str");
    }
  }
 else {
    System.err.println("String_Node_Str" + label + "String_Node_Str"+ phrase+ "String_Node_Str");
  }
  return vertices;
}

Fixed version (ground truth):
/** 
 * @param vertices list of current vertices created from the sentence
 * @param sentNum index of the current sentence from the list of sentences
 * @param source name of the data source
 * @param phrase property value to be added to the vertex
 * @param label property of the vertex
 * @return new list of vertices the sentence
 */
private List<Vertex> updateVertexList(List<Vertex> vertices,int sentNum,String source,String phrase,String label){
  if (label.startsWith("String_Node_Str")) {
    String vertexType="String_Node_Str";
    label=label.replace("String_Node_Str","String_Node_Str");
    Item matchingSchema=ontology.getProperties().getVertices().findPropertyKey(vertexType,label);
    if (matchingSchema != null) {
      boolean updated=false;
      for (int i=vertices.size() - 1; i >= 0; i--) {
        Vertex currentVertex=vertices.get(i);
        if ((currentVertex.getVertexType().equalsIgnoreCase("String_Node_Str")) && (!currentVertex.getProperties().containsKey(label))) {
          currentVertex.addProperty(label,phrase);
          updated=true;
          break;
        }
      }
      if (!updated) {
        String id="String_Node_Str" + sentNum + "String_Node_Str"+ vertices.size();
        Vertex newVertex=new Vertex(id,vertexType);
        newVertex.addProperty(label,phrase);
        newVertex.addProperty("String_Node_Str",source);
        vertices.add(newVertex);
      }
    }
 else {
      System.err.println("String_Node_Str" + label + "String_Node_Str"+ phrase+ "String_Node_Str");
    }
  }
 else   if (label.startsWith("String_Node_Str")) {
    String vertexType="String_Node_Str";
    if (label.equalsIgnoreCase("String_Node_Str")) {
      label="String_Node_Str";
    }
 else     if ((label.equalsIgnoreCase("String_Node_Str")) || (label.equalsIgnoreCase("String_Node_Str"))) {
      label="String_Node_Str";
    }
    Item matchingSchema=ontology.getProperties().getVertices().findPropertyKey(vertexType,label);
    if (matchingSchema != null) {
      boolean updated=false;
      for (int i=vertices.size() - 1; i >= 0; i--) {
        Vertex currentVertex=vertices.get(i);
        if ((currentVertex.getVertexType().equalsIgnoreCase("String_Node_Str")) && (!currentVertex.getProperties().containsKey(label))) {
          currentVertex.addProperty(label,phrase);
          updated=true;
          break;
        }
      }
      if (!updated) {
        String id="String_Node_Str" + sentNum + "String_Node_Str"+ vertices.size();
        Vertex newVertex=new Vertex(id,vertexType);
        newVertex.addProperty(label,phrase);
        newVertex.addProperty("String_Node_Str",source);
        vertices.add(newVertex);
      }
    }
 else     if (label.equalsIgnoreCase("String_Node_Str")) {
      Vertex newVertex=new Vertex(phrase,vertexType);
      newVertex.addProperty("String_Node_Str",source);
      vertices.add(newVertex);
    }
 else {
      System.err.println("String_Node_Str" + label + "String_Node_Str"+ phrase+ "String_Node_Str");
    }
  }
 else {
  }
  return vertices;
}