Program: 167074
Project: 167074
Buggy source:
public void removeVertex(String schema,String table,SqlgVertex vertex){
  SchemaTable schemaTable=SchemaTable.of(schema,table);
  Pair<SortedSet<String>,Map<SqlgVertex,Triple<String,String,Map<String,Object>>>> vertexSortedSetMapPair=this.vertexCache.get(schemaTable);
  if (vertexSortedSetMapPair != null && vertexSortedSetMapPair.getRight().containsKey(vertex)) {
    vertexSortedSetMapPair.getRight().remove(vertex);
    Map<SchemaTable,List<SqlgEdge>> outEdges=this.vertexOutEdgeCache.get(vertex);
    if (outEdges != null) {
      for (      Map.Entry<SchemaTable,List<SqlgEdge>> entry : outEdges.entrySet()) {
        SchemaTable edgeSchemaTable=entry.getKey();
        List<SqlgEdge> edges=entry.getValue();
        Map<SqlgEdge,Triple<SqlgVertex,SqlgVertex,Map<String,Object>>> cachedEdge=this.edgeCache.get(edgeSchemaTable);
        if (cachedEdge == null) {
          throw new IllegalStateException("String_Node_Str");
        }
        for (        SqlgEdge sqlgEdge : edges) {
          cachedEdge.remove(sqlgEdge);
        }
        if (cachedEdge.isEmpty()) {
          this.edgeCache.remove(edgeSchemaTable);
        }
      }
      this.vertexOutEdgeCache.remove(vertex);
    }
    Map<SchemaTable,List<SqlgEdge>> inEdges=this.vertexInEdgeCache.get(vertex);
    if (inEdges != null) {
      for (      Map.Entry<SchemaTable,List<SqlgEdge>> entry : inEdges.entrySet()) {
        SchemaTable edgeSchemaTable=entry.getKey();
        List<SqlgEdge> edges=entry.getValue();
        Map<SqlgEdge,Triple<SqlgVertex,SqlgVertex,Map<String,Object>>> cachedEdge=this.edgeCache.get(edgeSchemaTable);
        if (cachedEdge == null) {
          throw new IllegalStateException("String_Node_Str");
        }
        for (        SqlgEdge sqlgEdge : edges) {
          cachedEdge.remove(sqlgEdge);
        }
        if (cachedEdge.isEmpty()) {
          this.edgeCache.remove(edgeSchemaTable);
        }
      }
      this.vertexInEdgeCache.remove(vertex);
    }
  }
 else {
    List<SqlgVertex> vertices=this.removeVertexCache.get(schemaTable);
    if (vertices == null) {
      vertices=new ArrayList<>();
      this.removeVertexCache.put(schemaTable,vertices);
    }
    vertices.add(vertex);
  }
}

Fixed version (ground truth):
public void removeVertex(String schema,String table,SqlgVertex vertex){
  SchemaTable schemaTable=SchemaTable.of(schema,table);
  Pair<SortedSet<String>,Map<SqlgVertex,Map<String,Object>>> vertexSortedSetMapPair=this.vertexCache.get(schemaTable);
  if (vertexSortedSetMapPair != null && vertexSortedSetMapPair.getRight().containsKey(vertex)) {
    vertexSortedSetMapPair.getRight().remove(vertex);
    Map<SchemaTable,List<SqlgEdge>> outEdges=this.vertexOutEdgeCache.get(vertex);
    if (outEdges != null) {
      for (      Map.Entry<SchemaTable,List<SqlgEdge>> entry : outEdges.entrySet()) {
        SchemaTable edgeSchemaTable=entry.getKey();
        List<SqlgEdge> edges=entry.getValue();
        Pair<SortedSet<String>,Map<SqlgEdge,Triple<SqlgVertex,SqlgVertex,Map<String,Object>>>> cachedEdge=this.edgeCache.get(edgeSchemaTable);
        if (cachedEdge == null) {
          throw new IllegalStateException("String_Node_Str");
        }
        for (        SqlgEdge sqlgEdge : edges) {
          cachedEdge.getRight().remove(sqlgEdge);
        }
        if (cachedEdge.getRight().isEmpty()) {
          this.edgeCache.remove(edgeSchemaTable);
        }
      }
      this.vertexOutEdgeCache.remove(vertex);
    }
    Map<SchemaTable,List<SqlgEdge>> inEdges=this.vertexInEdgeCache.get(vertex);
    if (inEdges != null) {
      for (      Map.Entry<SchemaTable,List<SqlgEdge>> entry : inEdges.entrySet()) {
        SchemaTable edgeSchemaTable=entry.getKey();
        List<SqlgEdge> edges=entry.getValue();
        Pair<SortedSet<String>,Map<SqlgEdge,Triple<SqlgVertex,SqlgVertex,Map<String,Object>>>> cachedEdge=this.edgeCache.get(edgeSchemaTable);
        if (cachedEdge == null) {
          throw new IllegalStateException("String_Node_Str");
        }
        for (        SqlgEdge sqlgEdge : edges) {
          cachedEdge.getRight().remove(sqlgEdge);
        }
        if (cachedEdge.getRight().isEmpty()) {
          this.edgeCache.remove(edgeSchemaTable);
        }
      }
      this.vertexInEdgeCache.remove(vertex);
    }
  }
 else {
    List<SqlgVertex> vertices=this.removeVertexCache.get(schemaTable);
    if (vertices == null) {
      vertices=new ArrayList<>();
      this.removeVertexCache.put(schemaTable,vertices);
    }
    vertices.add(vertex);
  }
}