Program: 167073
Project: 167073
Buggy source:
public boolean updateProperty(SqlgElement sqlgElement,String key,Object value){
  SchemaTable schemaTable=SchemaTable.of(sqlgElement.getSchema(),sqlgElement.getTable());
  if (Vertex.class.isAssignableFrom(sqlgElement.getClass())) {
    Pair<SortedSet<String>,Map<SqlgVertex,Triple<String,String,Map<String,Object>>>> triples=this.vertexCache.get(schemaTable);
    if (triples != null) {
      Triple<String,String,Map<String,Object>> triple=triples.getRight().get(sqlgElement);
      if (triple != null) {
        triple.getRight().put(key,value);
        triples.getLeft().add(key);
        return true;
      }
    }
 else {
      Pair<SortedSet<String>,Map<SqlgVertex,Map<String,Object>>> schemaVertices=this.vertexPropertyCache.get(schemaTable);
      if (schemaVertices == null) {
        schemaVertices=Pair.of(new TreeSet<>(),new LinkedHashMap<>());
        this.vertexPropertyCache.put(schemaTable,schemaVertices);
      }
      SortedSet<String> keys=schemaVertices.getLeft();
      keys.add(key);
      Map<String,Object> properties=schemaVertices.getRight().get(sqlgElement);
      if (properties == null) {
        properties=new LinkedHashMap<>();
        schemaVertices.getRight().put((SqlgVertex)sqlgElement,properties);
      }
      properties.put(key,value);
      return true;
    }
  }
 else {
    Map<SqlgEdge,Triple<SqlgVertex,SqlgVertex,Map<String,Object>>> triples=this.edgeCache.get(schemaTable);
    if (triples != null) {
      Triple<SqlgVertex,SqlgVertex,Map<String,Object>> triple=triples.get(sqlgElement);
      if (triple != null) {
        triple.getRight().put(key,value);
        return true;
      }
    }
 else {
      Pair<SortedSet<String>,Map<SqlgEdge,Map<String,Object>>> schemaEdges=this.edgePropertyCache.get(schemaTable);
      if (schemaEdges == null) {
        schemaEdges=Pair.of(new TreeSet<>(),new LinkedHashMap<>());
        this.edgePropertyCache.put(schemaTable,schemaEdges);
      }
      SortedSet<String> keys=schemaEdges.getLeft();
      keys.add(key);
      Map<String,Object> properties=schemaEdges.getRight().get(sqlgElement);
      if (properties == null) {
        properties=new LinkedHashMap<>();
        schemaEdges.getRight().put((SqlgEdge)sqlgElement,properties);
      }
      properties.put(key,value);
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean updateProperty(SqlgElement sqlgElement,String key,Object value){
  SchemaTable schemaTable=SchemaTable.of(sqlgElement.getSchema(),sqlgElement.getTable());
  if (Vertex.class.isAssignableFrom(sqlgElement.getClass())) {
    Pair<SortedSet<String>,Map<SqlgVertex,Map<String,Object>>> triples=this.vertexCache.get(schemaTable);
    if (triples != null) {
      Map<String,Object> triple=triples.getRight().get(sqlgElement);
      if (triple != null) {
        triple.put(key,value);
        triples.getLeft().add(key);
        return true;
      }
    }
 else {
      Pair<SortedSet<String>,Map<SqlgVertex,Map<String,Object>>> schemaVertices=this.vertexPropertyCache.get(schemaTable);
      if (schemaVertices == null) {
        schemaVertices=Pair.of(new TreeSet<>(),new LinkedHashMap<>());
        this.vertexPropertyCache.put(schemaTable,schemaVertices);
      }
      SortedSet<String> keys=schemaVertices.getLeft();
      keys.add(key);
      Map<String,Object> properties=schemaVertices.getRight().get(sqlgElement);
      if (properties == null) {
        properties=new LinkedHashMap<>();
        schemaVertices.getRight().put((SqlgVertex)sqlgElement,properties);
      }
      properties.put(key,value);
      return true;
    }
  }
 else {
    Pair<SortedSet<String>,Map<SqlgEdge,Triple<SqlgVertex,SqlgVertex,Map<String,Object>>>> triples=this.edgeCache.get(schemaTable);
    if (triples != null) {
      Triple<SqlgVertex,SqlgVertex,Map<String,Object>> triple=triples.getRight().get(sqlgElement);
      if (triple != null) {
        triple.getRight().put(key,value);
        triples.getLeft().add(key);
        return true;
      }
    }
 else {
      Pair<SortedSet<String>,Map<SqlgEdge,Map<String,Object>>> schemaEdges=this.edgePropertyCache.get(schemaTable);
      if (schemaEdges == null) {
        schemaEdges=Pair.of(new TreeSet<>(),new LinkedHashMap<>());
        this.edgePropertyCache.put(schemaTable,schemaEdges);
      }
      SortedSet<String> keys=schemaEdges.getLeft();
      keys.add(key);
      Map<String,Object> properties=schemaEdges.getRight().get(sqlgElement);
      if (properties == null) {
        properties=new LinkedHashMap<>();
        schemaEdges.getRight().put((SqlgEdge)sqlgElement,properties);
      }
      properties.put(key,value);
      return true;
    }
  }
  return false;
}