Program: 90357
Project: 90357
Buggy source:
/** 
 * @param source name of the data source
 * @param vertexMap map of sentence index to list of vertices created from the sentence
 * @return list of edges created
 */
private List<Edge> getEdges(String source,Map<Integer,List<Vertex>> vertexMap){
  List<Edge> edges=new ArrayList<Edge>();
  Map<String,Edge> edgeIdMap=new HashMap<String,Edge>();
  for (  Integer sentNum : vertexMap.keySet()) {
    List<Vertex> sentVertices=new ArrayList<Vertex>();
    int lastSentNum=Math.min(vertexMap.size(),(sentNum.intValue() + RELATIONSHIP_SENTENCE_DISTANCE));
    for (int n=sentNum.intValue(); n < lastSentNum; n++) {
      sentVertices.addAll(vertexMap.get(Integer.valueOf(n)));
    }
    for (int i=0; i < sentVertices.size(); i++) {
      Vertex v1=sentVertices.get(i);
      for (int j=i + 1; j < sentVertices.size(); j++) {
        Vertex v2=sentVertices.get(j);
        Vertex inV=v1;
        Vertex outV=v2;
        Item matchingEdge=ontology.getProperties().getEdges().findPropertyValues("String_Node_Str",v1.getVertexType(),"String_Node_Str",v2.getVertexType());
        if (matchingEdge == null) {
          matchingEdge=ontology.getProperties().getEdges().findPropertyValues("String_Node_Str",v1.getVertexType(),"String_Node_Str",v2.getVertexType());
          inV=v2;
          outV=v1;
        }
        if (matchingEdge != null) {
          String edgeId=outV.get_id() + "String_Node_Str" + inV.get_id();
          Edge newEdge=new Edge(edgeId,matchingEdge.getTitle());
          newEdge.setSource(source);
          newEdge.set_inV(inV.get_id());
          newEdge.set_outV(outV.get_id());
          newEdge.setInVType(inV.getVertexType());
          newEdge.setOutVType(outV.getVertexType());
          edgeIdMap.put(edgeId,newEdge);
        }
 else         if (inV.getVertexType().equalsIgnoreCase(outV.getVertexType())) {
          String edgeId=outV.get_id() + "String_Node_Str" + inV.get_id();
          Edge newEdge=new Edge(edgeId,"String_Node_Str");
          newEdge.setSource(source);
          newEdge.set_inV(inV.get_id());
          newEdge.set_outV(outV.get_id());
          newEdge.setInVType(inV.getVertexType());
          newEdge.setOutVType(outV.getVertexType());
          edgeIdMap.put(edgeId,newEdge);
        }
      }
    }
  }
  edges.addAll(edgeIdMap.values());
  return edges;
}

Fixed version (ground truth):
/** 
 * @param source name of the data source
 * @param vertexMap map of sentence index to list of vertices created from the sentence
 * @return list of edges created
 */
private List<Edge> getEdges(String source,Map<Integer,List<Vertex>> vertexMap){
  List<Edge> edges=new ArrayList<Edge>();
  Map<String,Edge> edgeIdMap=new HashMap<String,Edge>();
  for (  Integer sentNum : vertexMap.keySet()) {
    List<Vertex> sentVertices=new ArrayList<Vertex>();
    int lastSentNum=Math.min(vertexMap.size(),(sentNum.intValue() + RELATIONSHIP_SENTENCE_DISTANCE));
    for (int n=sentNum.intValue(); n < lastSentNum; n++) {
      Integer sentKey=Integer.valueOf(n);
      if (vertexMap.containsKey(sentKey)) {
        sentVertices.addAll(vertexMap.get(sentKey));
      }
    }
    for (int i=0; i < sentVertices.size(); i++) {
      Vertex v1=sentVertices.get(i);
      for (int j=i + 1; j < sentVertices.size(); j++) {
        Vertex v2=sentVertices.get(j);
        Vertex inV=v1;
        Vertex outV=v2;
        Item matchingEdge=ontology.getProperties().getEdges().findPropertyValues("String_Node_Str",v1.getVertexType(),"String_Node_Str",v2.getVertexType());
        if (matchingEdge == null) {
          matchingEdge=ontology.getProperties().getEdges().findPropertyValues("String_Node_Str",v1.getVertexType(),"String_Node_Str",v2.getVertexType());
          inV=v2;
          outV=v1;
        }
        if (matchingEdge != null) {
          String edgeId=outV.get_id() + "String_Node_Str" + inV.get_id();
          Edge newEdge=new Edge(edgeId,matchingEdge.getTitle());
          newEdge.setSource(source);
          newEdge.set_inV(inV.get_id());
          newEdge.set_outV(outV.get_id());
          newEdge.setInVType(inV.getVertexType());
          newEdge.setOutVType(outV.getVertexType());
          edgeIdMap.put(edgeId,newEdge);
        }
 else         if (inV.getVertexType().equalsIgnoreCase(outV.getVertexType())) {
          String edgeId=outV.get_id() + "String_Node_Str" + inV.get_id();
          Edge newEdge=new Edge(edgeId,"String_Node_Str");
          newEdge.setSource(source);
          newEdge.set_inV(inV.get_id());
          newEdge.set_outV(outV.get_id());
          newEdge.setInVType(inV.getVertexType());
          newEdge.setOutVType(outV.getVertexType());
          edgeIdMap.put(edgeId,newEdge);
        }
      }
    }
  }
  edges.addAll(edgeIdMap.values());
  return edges;
}