Program: 96127
Project: 96127
Buggy source:
/** 
 * Creates a temp table that includes 1. all the columns in the original table. 2. the size of the group on which this stratified sample is being created. 3. a random number between 0 and 1.
 * @param param
 * @return A pair of the table with random numbers and the table that stores the per-group size.
 * @throws VerdictException
 */
protected Pair<TableUniqueName,TableUniqueName> createTempTableWithGroupCountsAndRand(SampleParam param) throws VerdictException {
  TableUniqueName rnTempTable=generateTempTableName();
  TableUniqueName grpTempTable=generateTempTableName();
  TableUniqueName originalTableName=param.originalTable;
  String groupName=Joiner.on("String_Node_Str").join(param.columnNames);
  String sql1=String.format("String_Node_Str",grpTempTable,groupName,originalTableName,groupName);
  VerdictLogger.debug(this,"String_Node_Str");
  VerdictLogger.debugPretty(this,Relation.prettyfySql(sql1),"String_Node_Str");
  executeUpdate(sql1);
  List<String> joinCond=new ArrayList<String>();
  for (  String g : param.columnNames) {
    joinCond.add(String.format("String_Node_Str",g,g));
  }
  Relation tableWithRand=SingleRelation.from(vc,originalTableName).join(SingleRelation.from(vc,grpTempTable),Joiner.on("String_Node_Str").join(joinCond)).select(String.format("String_Node_Str",columnNamesInString(originalTableName)));
  String sql2=String.format("String_Node_Str",rnTempTable,tableWithRand.toSql());
  VerdictLogger.debug(this,"String_Node_Str");
  VerdictLogger.debugPretty(this,Relation.prettyfySql(sql2),"String_Node_Str");
  executeUpdate(sql2);
  return Pair.of(rnTempTable,grpTempTable);
}

Fixed version (ground truth):
/** 
 * Creates a temp table that includes 1. all the columns in the original table. 2. the size of the group on which this stratified sample is being created. 3. a random number between 0 and 1.
 * @param param
 * @return A pair of the table with random numbers and the table that stores the per-group size.
 * @throws VerdictException
 */
protected Pair<TableUniqueName,TableUniqueName> createTempTableWithGroupCountsAndRand(SampleParam param) throws VerdictException {
  TableUniqueName rnTempTable=Relation.getTempTableName(vc);
  TableUniqueName grpTempTable=Relation.getTempTableName(vc);
  TableUniqueName originalTableName=param.originalTable;
  String groupName=Joiner.on("String_Node_Str").join(param.columnNames);
  String sql1=String.format("String_Node_Str",grpTempTable,groupName,originalTableName,groupName);
  VerdictLogger.debug(this,"String_Node_Str");
  VerdictLogger.debugPretty(this,Relation.prettyfySql(sql1),"String_Node_Str");
  executeUpdate(sql1);
  List<String> joinCond=new ArrayList<String>();
  for (  String g : param.columnNames) {
    joinCond.add(String.format("String_Node_Str",g,g));
  }
  Relation tableWithRand=SingleRelation.from(vc,originalTableName).join(SingleRelation.from(vc,grpTempTable),Joiner.on("String_Node_Str").join(joinCond)).select(String.format("String_Node_Str",columnNamesInString(originalTableName)));
  String sql2=String.format("String_Node_Str",rnTempTable,tableWithRand.toSql());
  VerdictLogger.debug(this,"String_Node_Str");
  VerdictLogger.debugPretty(this,Relation.prettyfySql(sql2),"String_Node_Str");
  executeUpdate(sql2);
  return Pair.of(rnTempTable,grpTempTable);
}