Program: 166880
Project: 166880
Buggy source:
private String internalConstructCompleteCopyCommandSqlVertex(SqlgGraph sqlgGraph,boolean isTemp,String schema,String table,Set<String> keys){
  Map<String,PropertyType> propertyTypeMap;
  if (isTemp) {
    propertyTypeMap=sqlgGraph.getTopology().getPublicSchema().getTemporaryTable(VERTEX_PREFIX + table);
  }
 else {
    propertyTypeMap=sqlgGraph.getTopology().getTableFor(SchemaTable.of(schema,VERTEX_PREFIX + table));
  }
  StringBuilder sql=new StringBuilder();
  sql.append("String_Node_Str");
  if (!isTemp) {
    sql.append(maybeWrapInQoutes(schema));
    sql.append("String_Node_Str");
  }
  sql.append(maybeWrapInQoutes(VERTEX_PREFIX + table));
  sql.append("String_Node_Str");
  for (  String key : keys) {
    sql.append("String_Node_Str");
    appendKeyForStream(propertyTypeMap.get(key),sql,key);
  }
  sql.append("String_Node_Str");
  sql.append("String_Node_Str");
  sql.append(COPY_COMMAND_DELIMITER);
  sql.append("String_Node_Str");
  sql.append("String_Node_Str");
  sql.append(COPY_COMMAND_QUOTE);
  sql.append("String_Node_Str");
  sql.append(ESCAPE);
  sql.append("String_Node_Str");
  sql.append("String_Node_Str");
  sql.append(BATCH_NULL);
  sql.append("String_Node_Str");
  if (logger.isDebugEnabled()) {
    logger.debug(sql.toString());
  }
  return sql.toString();
}

Fixed version (ground truth):
/** 
 * construct the copy command for a vertex
 * @param sqlgGraph the graph
 * @param isTemp is the table temporary?
 * @param schema the schema
 * @param table the table name
 * @param needID do we need the ID column to be copied?
 * @param keys the property keys
 * @return the SQL generated
 */
private String internalConstructCompleteCopyCommandSqlVertex(SqlgGraph sqlgGraph,boolean isTemp,String schema,String table,boolean needID,Set<String> keys){
  Map<String,PropertyType> propertyTypeMap;
  if (isTemp) {
    propertyTypeMap=sqlgGraph.getTopology().getPublicSchema().getTemporaryTable(VERTEX_PREFIX + table);
  }
 else {
    propertyTypeMap=sqlgGraph.getTopology().getTableFor(SchemaTable.of(schema,VERTEX_PREFIX + table));
  }
  StringBuilder sql=new StringBuilder();
  sql.append("String_Node_Str");
  if (!isTemp) {
    sql.append(maybeWrapInQoutes(schema));
    sql.append("String_Node_Str");
  }
  sql.append(maybeWrapInQoutes(VERTEX_PREFIX + table));
  sql.append("String_Node_Str");
  if (needID) {
    sql.append("String_Node_Str");
  }
  if (keys.isEmpty()) {
    if (!needID) {
      Map<String,PropertyType> columns=new HashMap<>();
      columns.put(COPY_DUMMY,PropertyType.from(0));
      sqlgGraph.getTopology().ensureVertexLabelPropertiesExist(schema,table,columns);
      sql.append(maybeWrapInQoutes(COPY_DUMMY));
    }
  }
 else {
    if (needID) {
      sql.append("String_Node_Str");
    }
    int count=1;
    for (    String key : keys) {
      if (count > 1 && count <= keys.size()) {
        sql.append("String_Node_Str");
      }
      count++;
      appendKeyForStream(propertyTypeMap.get(key),sql,key);
    }
  }
  sql.append("String_Node_Str");
  sql.append("String_Node_Str");
  sql.append(COPY_COMMAND_DELIMITER);
  sql.append("String_Node_Str");
  sql.append("String_Node_Str");
  sql.append(COPY_COMMAND_QUOTE);
  sql.append("String_Node_Str");
  sql.append(ESCAPE);
  sql.append("String_Node_Str");
  sql.append("String_Node_Str");
  sql.append(BATCH_NULL);
  sql.append("String_Node_Str");
  if (logger.isDebugEnabled()) {
    logger.debug(sql.toString());
  }
  return sql.toString();
}