Program: 167015
Project: 167015
Buggy source:
@Override public <L,R>void bulkAddEdges(SqlgGraph sqlgGraph,SchemaTable in,SchemaTable out,String edgeLabel,Pair<String,String> idFields,List<Pair<L,R>> uids){
  if (!sqlgGraph.tx().isInStreamingBatchMode() && !sqlgGraph.tx().isInStreamingWithLockBatchMode()) {
    throw SqlgExceptions.invalidMode("String_Node_Str" + BatchManager.BatchModeType.STREAMING + "String_Node_Str"+ BatchManager.BatchModeType.STREAMING_WITH_LOCK+ "String_Node_Str");
  }
  if (!uids.isEmpty()) {
    Map<String,PropertyType> columns=new HashMap<>();
    Map<String,PropertyType> inProperties=sqlgGraph.getSchemaManager().getTableFor(in.withPrefix(SchemaManager.VERTEX_PREFIX));
    Map<String,PropertyType> outProperties=sqlgGraph.getSchemaManager().getTableFor(out.withPrefix(SchemaManager.VERTEX_PREFIX));
    PropertyType inPropertyType;
    if (idFields.getLeft().equals(SchemaManager.ID)) {
      inPropertyType=PropertyType.INTEGER;
    }
 else {
      inPropertyType=inProperties.get(idFields.getLeft());
    }
    PropertyType outPropertyType;
    if (idFields.getRight().equals(SchemaManager.ID)) {
      outPropertyType=PropertyType.INTEGER;
    }
 else {
      outPropertyType=inProperties.get(idFields.getLeft());
    }
    columns.put("String_Node_Str",outPropertyType);
    columns.put("String_Node_Str",inPropertyType);
    SecureRandom random=new SecureRandom();
    byte bytes[]=new byte[6];
    random.nextBytes(bytes);
    String tmpTableIdentified=Base64.getEncoder().encodeToString(bytes);
    tmpTableIdentified=SchemaManager.BULK_TEMP_EDGE + tmpTableIdentified;
    sqlgGraph.getSchemaManager().createTempTable(tmpTableIdentified,columns);
    this.copyInBulkTempEdges(sqlgGraph,SchemaTable.of(in.getSchema(),tmpTableIdentified),uids,inPropertyType,outPropertyType);
    sqlgGraph.getSchemaManager().ensureEdgeTableExist(in.getSchema(),edgeLabel,out,in);
    StringBuilder sql=new StringBuilder("String_Node_Str");
    sql.append(this.maybeWrapInQoutes(in.getSchema()));
    sql.append("String_Node_Str");
    sql.append(this.maybeWrapInQoutes(SchemaManager.EDGE_PREFIX + edgeLabel));
    sql.append("String_Node_Str");
    sql.append(this.maybeWrapInQoutes(in.getSchema() + "String_Node_Str" + in.getTable()+ SchemaManager.OUT_VERTEX_COLUMN_END));
    sql.append("String_Node_Str");
    sql.append(this.maybeWrapInQoutes(out.getSchema() + "String_Node_Str" + out.getTable()+ SchemaManager.IN_VERTEX_COLUMN_END));
    sql.append("String_Node_Str");
    sql.append("String_Node_Str");
    sql.append(in.getSchema() + "String_Node_Str" + in.getTable()+ SchemaManager.OUT_VERTEX_COLUMN_END);
    sql.append("String_Node_Str");
    sql.append(out.getSchema() + "String_Node_Str" + out.getTable()+ SchemaManager.IN_VERTEX_COLUMN_END);
    sql.append("String_Node_Str");
    sql.append(this.maybeWrapInQoutes(in.getSchema()));
    sql.append("String_Node_Str");
    sql.append(this.maybeWrapInQoutes(SchemaManager.VERTEX_PREFIX + in.getTable()));
    sql.append("String_Node_Str");
    sql.append(this.maybeWrapInQoutes(tmpTableIdentified) + "String_Node_Str" + this.maybeWrapInQoutes(idFields.getLeft())+ "String_Node_Str");
    sql.append(this.maybeWrapInQoutes(out.getSchema()));
    sql.append("String_Node_Str");
    sql.append(this.maybeWrapInQoutes(SchemaManager.VERTEX_PREFIX + out.getTable()));
    sql.append("String_Node_Str" + this.maybeWrapInQoutes(idFields.getRight()));
    if (logger.isDebugEnabled()) {
      logger.debug(sql.toString());
    }
    Connection conn=sqlgGraph.tx().getConnection();
    try (PreparedStatement preparedStatement=conn.prepareStatement(sql.toString())){
      preparedStatement.executeUpdate();
    }
 catch (    SQLException e) {
      throw new RuntimeException(e);
    }
  }
}

Fixed version (ground truth):
@Override public <L,R>void bulkAddEdges(SqlgGraph sqlgGraph,SchemaTable in,SchemaTable out,String edgeLabel,Pair<String,String> idFields,List<Pair<L,R>> uids){
  if (!sqlgGraph.tx().isInStreamingBatchMode() && !sqlgGraph.tx().isInStreamingWithLockBatchMode()) {
    throw SqlgExceptions.invalidMode("String_Node_Str" + BatchManager.BatchModeType.STREAMING + "String_Node_Str"+ BatchManager.BatchModeType.STREAMING_WITH_LOCK+ "String_Node_Str");
  }
  if (!uids.isEmpty()) {
    Map<String,PropertyType> columns=new HashMap<>();
    Map<String,PropertyType> inProperties=sqlgGraph.getSchemaManager().getTableFor(in.withPrefix(SchemaManager.VERTEX_PREFIX));
    Map<String,PropertyType> outProperties=sqlgGraph.getSchemaManager().getTableFor(out.withPrefix(SchemaManager.VERTEX_PREFIX));
    PropertyType inPropertyType;
    if (idFields.getLeft().equals(SchemaManager.ID)) {
      inPropertyType=PropertyType.INTEGER;
    }
 else {
      inPropertyType=inProperties.get(idFields.getLeft());
    }
    PropertyType outPropertyType;
    if (idFields.getRight().equals(SchemaManager.ID)) {
      outPropertyType=PropertyType.INTEGER;
    }
 else {
      outPropertyType=outProperties.get(idFields.getRight());
    }
    columns.put("String_Node_Str",outPropertyType);
    columns.put("String_Node_Str",inPropertyType);
    SecureRandom random=new SecureRandom();
    byte bytes[]=new byte[6];
    random.nextBytes(bytes);
    String tmpTableIdentified=Base64.getEncoder().encodeToString(bytes);
    tmpTableIdentified=SchemaManager.BULK_TEMP_EDGE + tmpTableIdentified;
    sqlgGraph.getSchemaManager().createTempTable(tmpTableIdentified,columns);
    this.copyInBulkTempEdges(sqlgGraph,SchemaTable.of(in.getSchema(),tmpTableIdentified),uids,inPropertyType,outPropertyType);
    sqlgGraph.getSchemaManager().ensureEdgeTableExist(in.getSchema(),edgeLabel,out,in);
    StringBuilder sql=new StringBuilder("String_Node_Str");
    sql.append(this.maybeWrapInQoutes(in.getSchema()));
    sql.append("String_Node_Str");
    sql.append(this.maybeWrapInQoutes(SchemaManager.EDGE_PREFIX + edgeLabel));
    sql.append("String_Node_Str");
    sql.append(this.maybeWrapInQoutes(in.getSchema() + "String_Node_Str" + in.getTable()+ SchemaManager.OUT_VERTEX_COLUMN_END));
    sql.append("String_Node_Str");
    sql.append(this.maybeWrapInQoutes(out.getSchema() + "String_Node_Str" + out.getTable()+ SchemaManager.IN_VERTEX_COLUMN_END));
    sql.append("String_Node_Str");
    sql.append("String_Node_Str");
    sql.append(in.getSchema() + "String_Node_Str" + in.getTable()+ SchemaManager.OUT_VERTEX_COLUMN_END);
    sql.append("String_Node_Str");
    sql.append(out.getSchema() + "String_Node_Str" + out.getTable()+ SchemaManager.IN_VERTEX_COLUMN_END);
    sql.append("String_Node_Str");
    sql.append(this.maybeWrapInQoutes(in.getSchema()));
    sql.append("String_Node_Str");
    sql.append(this.maybeWrapInQoutes(SchemaManager.VERTEX_PREFIX + in.getTable()));
    sql.append("String_Node_Str");
    sql.append(this.maybeWrapInQoutes(tmpTableIdentified) + "String_Node_Str" + this.maybeWrapInQoutes(idFields.getLeft())+ "String_Node_Str");
    sql.append(this.maybeWrapInQoutes(out.getSchema()));
    sql.append("String_Node_Str");
    sql.append(this.maybeWrapInQoutes(SchemaManager.VERTEX_PREFIX + out.getTable()));
    sql.append("String_Node_Str" + this.maybeWrapInQoutes(idFields.getRight()));
    if (logger.isDebugEnabled()) {
      logger.debug(sql.toString());
    }
    Connection conn=sqlgGraph.tx().getConnection();
    try (PreparedStatement preparedStatement=conn.prepareStatement(sql.toString())){
      preparedStatement.executeUpdate();
    }
 catch (    SQLException e) {
      throw new RuntimeException(e);
    }
  }
}