nus-yam/ex-repair huggingface dataset:
Program: 95896
Project: 95896
Buggy source:
/** 
 * The actual LabelPropagation Computation
 * @param vertex   Vertex
 * @param messages Messages that were sent to this vertex in the previoussuperstep.
 * @throws IOException
 */
@Override public void compute(Vertex<IntWritable,IntWritable,NullWritable> vertex,Iterable<IntWritable> messages) throws IOException {
  if (getSuperstep() == 0) {
    sendMessageToAllEdges(vertex,vertex.getId());
    vertex.voteToHalt();
  }
 else {
    int currentMinValue=vertex.getValue().get();
    int newValue=getNewValue(vertex,messages);
    boolean changed=currentMinValue != newValue;
    if (changed) {
      vertex.setValue(new IntWritable(newValue));
      sendMessageToAllEdges(vertex,vertex.getValue());
    }
 else {
      vertex.voteToHalt();
    }
  }
  vertex.voteToHalt();
}

Fixed version (ground truth):
/** 
 * The actual LabelPropagation Computation
 * @param vertex   Vertex
 * @param messages Messages that were sent to this vertex in the previoussuperstep.
 * @throws IOException
 */
@Override public void compute(Vertex<IntWritable,IntWritable,NullWritable> vertex,Iterable<IntWritable> messages) throws IOException {
  if (getSuperstep() == 0) {
    sendMessageToAllEdges(vertex,vertex.getValue());
    vertex.voteToHalt();
  }
 else {
    int currentMinValue=vertex.getValue().get();
    int newValue=getNewValue(vertex,messages);
    boolean changed=currentMinValue != newValue;
    if (changed) {
      vertex.setValue(new IntWritable(newValue));
      sendMessageToAllEdges(vertex,vertex.getValue());
    }
 else {
      vertex.voteToHalt();
    }
  }
  vertex.voteToHalt();
}
Program: 95897
Project: 95897
Buggy source:
/** 
 * The actual LabelPropagation Computation
 * @param vertex   Vertex
 * @param messages Messages that were sent to this vertex in the previoussuperstep.
 * @throws IOException
 */
@Override public void compute(Vertex<IntWritable,IntWritable,NullWritable> vertex,Iterable<IntWritable> messages) throws IOException {
  if (getSuperstep() == 0) {
    sendMessageToAllEdges(vertex,vertex.getValue());
    vertex.voteToHalt();
  }
 else {
    int currentMinValue=vertex.getValue().get();
    int newValue=getNewValue(vertex,messages);
    boolean changed=currentMinValue != newValue;
    if (changed) {
      vertex.setValue(new IntWritable(newValue));
      sendMessageToAllEdges(vertex,vertex.getValue());
    }
 else {
      vertex.voteToHalt();
    }
  }
  vertex.voteToHalt();
}

Fixed version (ground truth):
/** 
 * The actual LabelPropagation Computation
 * @param vertex   Vertex
 * @param messages Messages that were sent to this vertex in the previoussuperstep.
 * @throws IOException
 */
@Override public void compute(Vertex<IntWritable,IntWritable,NullWritable> vertex,Iterable<IntWritable> messages) throws IOException {
  if (getSuperstep() == 0) {
    sendMessageToAllEdges(vertex,vertex.getId());
    vertex.voteToHalt();
  }
 else {
    int currentMinValue=vertex.getValue().get();
    int newValue=getNewValue(vertex,messages);
    boolean changed=currentMinValue != newValue;
    if (changed) {
      vertex.setValue(new IntWritable(newValue));
      sendMessageToAllEdges(vertex,vertex.getValue());
    }
 else {
      vertex.voteToHalt();
    }
  }
  vertex.voteToHalt();
}
Program: 95898
Project: 95898
Buggy source:
public void setOption(int optID,Object value) throws SocketException {
  try {
switch (optID) {
case SocketOptions.SO_LINGER:
      if (value instanceof Boolean) {
        boolean b=(Boolean)value;
        if (b) {
          throw new SocketException("String_Node_Str");
        }
        NativeUnixSocket.setSocketOptionInt(fd,optID,-1);
        return;
      }
    NativeUnixSocket.setSocketOptionInt(fd,optID,expectInteger(value));
  return;
case SocketOptions.SO_TIMEOUT:
NativeUnixSocket.setSocketOptionInt(fd,optID,expectInteger(value));
return;
case SocketOptions.SO_KEEPALIVE:
case SocketOptions.TCP_NODELAY:
case SocketOptions.SO_RCVBUF:
case SocketOptions.SO_SNDBUF:
NativeUnixSocket.setSocketOptionInt(fd,optID,expectBoolean(value));
return;
}
}
 catch (AFUNIXSocketException e) {
throw e;
}
catch (Exception e) {
throw new AFUNIXSocketException("String_Node_Str",e);
}
throw new AFUNIXSocketException("String_Node_Str" + optID);
}

Fixed version (ground truth):
public void setOption(int optID,Object value) throws SocketException {
  try {
switch (optID) {
case SocketOptions.SO_LINGER:
      if (value instanceof Boolean) {
        boolean b=(Boolean)value;
        if (b) {
          throw new SocketException("String_Node_Str");
        }
        NativeUnixSocket.setSocketOptionInt(fd,optID,-1);
        return;
      }
    NativeUnixSocket.setSocketOptionInt(fd,optID,expectInteger(value));
  return;
case SocketOptions.SO_RCVBUF:
case SocketOptions.SO_SNDBUF:
case SocketOptions.SO_TIMEOUT:
NativeUnixSocket.setSocketOptionInt(fd,optID,expectInteger(value));
return;
case SocketOptions.SO_KEEPALIVE:
case SocketOptions.TCP_NODELAY:
NativeUnixSocket.setSocketOptionInt(fd,optID,expectBoolean(value));
return;
}
}
 catch (AFUNIXSocketException e) {
throw e;
}
catch (Exception e) {
throw new AFUNIXSocketException("String_Node_Str",e);
}
throw new AFUNIXSocketException("String_Node_Str" + optID);
}
Program: 95899
Project: 95899
Buggy source:
public void close(){
  conn.close();
}

Fixed version (ground truth):
public void close(){
  conn.close();
  isClosed=true;
}
Program: 95900
Project: 95900
Buggy source:
public DbmsQueryResult executeSingle(String sql) throws VerdictDBDbmsException {
  VerdictDBLogger logger=VerdictDBLogger.getLogger(this.getClass());
  logger.debug("String_Node_Str" + sql);
  try {
    Statement stmt=conn.createStatement();
    JdbcQueryResult jrs=null;
    boolean doesResultExist=stmt.execute(sql);
    if (doesResultExist) {
      ResultSet rs=stmt.getResultSet();
      jrs=new JdbcQueryResult(rs);
      rs.close();
    }
 else {
      jrs=null;
    }
    stmt.close();
    return jrs;
  }
 catch (  SQLException e) {
    e.printStackTrace();
    logger.debug(StackTraceReader.stackTrace2String(e));
    throw new VerdictDBDbmsException(e.getMessage());
  }
}

Fixed version (ground truth):
public DbmsQueryResult executeSingle(String sql) throws VerdictDBDbmsException {
  VerdictDBLogger logger=VerdictDBLogger.getLogger(this.getClass());
  logger.debug("String_Node_Str" + sql);
  try {
    Statement stmt=conn.createStatement();
    JdbcQueryResult jrs=null;
    boolean doesResultExist=stmt.execute(sql);
    if (doesResultExist) {
      ResultSet rs=stmt.getResultSet();
      jrs=new JdbcQueryResult(rs);
      rs.close();
    }
 else {
      jrs=null;
    }
    stmt.close();
    return jrs;
  }
 catch (  SQLException e) {
    throw new VerdictDBDbmsException(e.getMessage());
  }
}
Program: 95902
Project: 95902
Buggy source:
@Parameterized.Parameters(name="String_Node_Str") public static Collection databases(){
  Collection<Object[]> params=new ArrayList<>();
  for (  String database : targetDatabases) {
    params.add(new Object[]{database});
  }
  return params;
}

Fixed version (ground truth):
@Parameterized.Parameters(name="String_Node_Str") public static Collection<Object[]> databases(){
  Collection<Object[]> params=new ArrayList<>();
  for (  String database : targetDatabases) {
    params.add(new Object[]{database});
  }
  return params;
}
Program: 95903
Project: 95903
Buggy source:
@Test public void testDataType() throws SQLException {
  String sql="String_Node_Str";
switch (database) {
case "String_Node_Str":
    sql=String.format("String_Node_Str",MYSQL_DATABASE,TABLE_NAME);
  break;
case "String_Node_Str":
sql=String.format("String_Node_Str",IMPALA_DATABASE,TABLE_NAME);
break;
case "String_Node_Str":
case "String_Node_Str":
sql=String.format("String_Node_Str",SCHEMA_NAME,TABLE_NAME);
break;
default :
fail(String.format("String_Node_Str",database));
}
Statement jdbcStmt=connMap.get(database).createStatement();
Statement vcStmt=vcMap.get(database).createStatement();
ResultSet jdbcRs=jdbcStmt.executeQuery(sql);
ResultSet vcRs=vcStmt.executeQuery(sql);
int columnCount=jdbcRs.getMetaData().getColumnCount();
while (jdbcRs.next() && vcRs.next()) {
for (int i=1; i <= columnCount; ++i) {
String columnName=jdbcRs.getMetaData().getColumnName(i);
Object theirs=jdbcRs.getObject(i);
Object ours=vcRs.getObject(i);
System.out.println(columnName + "String_Node_Str" + theirs+ "String_Node_Str"+ ours);
if (theirs instanceof byte[]) {
assertTrue(Arrays.equals((byte[])theirs,(byte[])ours));
}
 else if (theirs instanceof PgSQLXML) {
PgSQLXML xml1=(PgSQLXML)theirs;
PgSQLXML xml2=(PgSQLXML)ours;
assertEquals(xml1.getString(),xml2.getString());
}
 else {
assertEquals(jdbcRs.getObject(i),vcRs.getObject(i));
}
}
}
}

Fixed version (ground truth):
@Test public void testDataType() throws SQLException {
  String sql="String_Node_Str";
switch (database) {
case "String_Node_Str":
    sql=String.format("String_Node_Str",MYSQL_DATABASE,TABLE_NAME);
  break;
case "String_Node_Str":
sql=String.format("String_Node_Str",IMPALA_DATABASE,TABLE_NAME);
break;
case "String_Node_Str":
case "String_Node_Str":
sql=String.format("String_Node_Str",SCHEMA_NAME,TABLE_NAME);
break;
default :
fail(String.format("String_Node_Str",database));
}
Statement jdbcStmt=connMap.get(database).createStatement();
Statement vcStmt=vcMap.get(database).createStatement();
ResultSet jdbcRs=jdbcStmt.executeQuery(sql);
ResultSet vcRs=vcStmt.executeQuery(sql);
int columnCount=jdbcRs.getMetaData().getColumnCount();
while (jdbcRs.next() && vcRs.next()) {
for (int i=1; i <= columnCount; ++i) {
String columnName=jdbcRs.getMetaData().getColumnName(i);
Object theirs=jdbcRs.getObject(i);
Object ours=vcRs.getObject(i);
System.out.println(columnName + "String_Node_Str" + theirs+ "String_Node_Str"+ ours);
if (theirs instanceof byte[]) {
assertTrue(Arrays.equals((byte[])theirs,(byte[])ours));
}
 else if (theirs instanceof PgSQLXML) {
PgSQLXML xml1=(PgSQLXML)theirs;
PgSQLXML xml2=(PgSQLXML)ours;
assertEquals(xml1.getString(),xml2.getString());
}
 else {
assertEquals(theirs,ours);
}
}
}
}
Program: 95906
Project: 95906
Buggy source:
@Override public String getColumnsCommand(String schema,String table){
  return "String_Node_Str" + "String_Node_Str" + table + "String_Node_Str"+ schema+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getColumnsCommand(String schema,String table){
  StringBuilder sql=new StringBuilder();
  sql.append(String.format("String_Node_Str",schema));
  sql.append(String.format("String_Node_Str" + "String_Node_Str",table,schema));
  return sql.toString();
}
Program: 95907
Project: 95907
Buggy source:
Pair<String,String> getUniqueStringPair(){
  String schemaName=String.format("String_Node_Str",hashCode(),identifier);
  String tableName=String.format("String_Node_Str",hashCode(),identifier);
  identifier+=1;
  return Pair.of(schemaName,tableName);
}

Fixed version (ground truth):
Pair<String,String> getUniqueStringPair(){
  String schemaName=String.format("String_Node_Str",parentCode,identifier);
  String tableName=String.format("String_Node_Str",parentCode,identifier);
  identifier+=1;
  return Pair.of(schemaName,tableName);
}
Program: 95908
Project: 95908
Buggy source:
/** 
 * select count(*) as totalLargeGroupSize from verdicttemptable;
 * @param tokens
 * @return
 * @throws VerdictDBException
 */
@Override public SqlConvertible createQuery(List<ExecutionInfoToken> tokens) throws VerdictDBException {
  String tableSourceAlias="String_Node_Str";
  String aliasName=LARGE_GROUP_SIZE_SUM_ALIAS;
  String groupSizeAlias=LargeGroupListNode.LARGE_GROUP_SIZE_COLUMN_ALIAS;
  Pair<BaseTable,SubscriptionTicket> placeholder=createPlaceHolderTable(tableSourceAlias);
  BaseTable baseTable=placeholder.getLeft();
  selectQuery=SelectQuery.create(new AliasedColumn(ColumnOp.sum(new BaseColumn(tableSourceAlias,groupSizeAlias)),aliasName),baseTable);
  super.createQuery(tokens);
  return selectQuery;
}

Fixed version (ground truth):
/** 
 * select count(*) as totalLargeGroupSize from verdicttemptable;
 * @param tokens
 * @return
 * @throws VerdictDBException
 */
@Override public SqlConvertible createQuery(List<ExecutionInfoToken> tokens) throws VerdictDBException {
  super.createQuery(tokens);
  return selectQuery;
}
Program: 95910
Project: 95910
Buggy source:
public LargeGroupSizeNode(String primaryColumnName){
  super(null);
  this.primaryColumnName=primaryColumnName;
}

Fixed version (ground truth):
public LargeGroupSizeNode(String primaryColumnName){
  super(null);
  this.primaryColumnName=primaryColumnName;
  String tableSourceAlias="String_Node_Str";
  String aliasName=LARGE_GROUP_SIZE_SUM_ALIAS;
  String groupSizeAlias=LargeGroupListNode.LARGE_GROUP_SIZE_COLUMN_ALIAS;
  Pair<BaseTable,SubscriptionTicket> placeholder=createPlaceHolderTable(tableSourceAlias);
  BaseTable baseTable=placeholder.getLeft();
  selectQuery=SelectQuery.create(new AliasedColumn(ColumnOp.sum(new BaseColumn(tableSourceAlias,groupSizeAlias)),aliasName),baseTable);
  subscriptionTicket=placeholder.getRight();
}
Program: 95911
Project: 95911
Buggy source:
@Test public void testGenerateDependency() throws VerdictDBException {
  SelectQuery subquery=SelectQuery.create(Arrays.<SelectItem>asList(new AliasedColumn(new ColumnOp("String_Node_Str",new BaseColumn("String_Node_Str","String_Node_Str")),"String_Node_Str")),new BaseTable(originalSchema,originalTable,"String_Node_Str"));
  SelectQuery query=SelectQuery.create(Arrays.<SelectItem>asList(new AliasedColumn(new ColumnOp("String_Node_Str",new BaseColumn("String_Node_Str","String_Node_Str")),"String_Node_Str")),new BaseTable(originalSchema,originalTable,"String_Node_Str"));
  query.addFilterByAnd(new ColumnOp("String_Node_Str",Arrays.asList(new BaseColumn("String_Node_Str","String_Node_Str"),new SubqueryColumn(subquery))));
  QueryExecutionPlan plan=QueryExecutionPlanFactory.create("String_Node_Str");
  AggExecutionNode node=AggExecutionNode.create(plan,query);
  String aliasName=String.format("String_Node_Str",plan.getSerialNumber());
  assertEquals(1,node.getExecutableNodeBaseDependents().size());
  SelectQuery rewritten=SelectQuery.create(Arrays.<SelectItem>asList(new AliasedColumn(new BaseColumn("String_Node_Str",aliasName,"String_Node_Str"),"String_Node_Str")),new BaseTable("String_Node_Str","String_Node_Str",aliasName));
  assertEquals(rewritten,((SubqueryColumn)((ColumnOp)node.getSelectQuery().getFilter().get()).getOperand(1)).getSubquery());
}

Fixed version (ground truth):
@Test public void testGenerateDependency() throws VerdictDBException {
  SelectQuery subquery=SelectQuery.create(Arrays.<SelectItem>asList(new AliasedColumn(new ColumnOp("String_Node_Str",new BaseColumn("String_Node_Str","String_Node_Str")),"String_Node_Str")),new BaseTable(originalSchema,originalTable,"String_Node_Str"));
  SelectQuery query=SelectQuery.create(Arrays.<SelectItem>asList(new AliasedColumn(new ColumnOp("String_Node_Str",new BaseColumn("String_Node_Str","String_Node_Str")),"String_Node_Str")),new BaseTable(originalSchema,originalTable,"String_Node_Str"));
  query.addFilterByAnd(new ColumnOp("String_Node_Str",Arrays.asList(new BaseColumn("String_Node_Str","String_Node_Str"),new SubqueryColumn(subquery))));
  QueryExecutionPlan plan=QueryExecutionPlanFactory.create("String_Node_Str");
  AggExecutionNode node=AggExecutionNode.create(plan,query);
  String aliasName=String.format("String_Node_Str",plan.getSerialNumber());
  assertEquals(1,node.getExecutableNodeBaseDependents().size());
  String expectedPlaceholderSchemaName=String.format("String_Node_Str",node.hashCode());
  String expectedPlaceholderTableName=String.format("String_Node_Str",node.hashCode());
  SelectQuery rewritten=SelectQuery.create(Arrays.<SelectItem>asList(new AliasedColumn(new BaseColumn(expectedPlaceholderSchemaName,aliasName,"String_Node_Str"),"String_Node_Str")),new BaseTable(expectedPlaceholderSchemaName,expectedPlaceholderTableName,aliasName));
  assertEquals(rewritten,((SubqueryColumn)((ColumnOp)node.getSelectQuery().getFilter().get()).getOperand(1)).getSubquery());
}
Program: 95912
Project: 95912
Buggy source:
public DbmsQueryResult executeSingle(String sql) throws VerdictDBDbmsException {
  VerdictDBLogger logger=VerdictDBLogger.getLogger(this.getClass());
  logger.trace("String_Node_Str" + sql);
  try {
    Statement stmt=conn.createStatement();
    JdbcQueryResult jrs=null;
    boolean doesResultExist=stmt.execute(sql);
    if (doesResultExist) {
      ResultSet rs=stmt.getResultSet();
      jrs=new JdbcQueryResult(rs);
      rs.close();
    }
 else {
      jrs=null;
    }
    stmt.close();
    return jrs;
  }
 catch (  SQLException e) {
    e.printStackTrace();
    logger.debug(StackTraceReader.stackTrace2String(e));
    throw new VerdictDBDbmsException(e.getMessage());
  }
}

Fixed version (ground truth):
public DbmsQueryResult executeSingle(String sql) throws VerdictDBDbmsException {
  VerdictDBLogger logger=VerdictDBLogger.getLogger(this.getClass());
  logger.debug("String_Node_Str" + sql);
  try {
    Statement stmt=conn.createStatement();
    JdbcQueryResult jrs=null;
    boolean doesResultExist=stmt.execute(sql);
    if (doesResultExist) {
      ResultSet rs=stmt.getResultSet();
      jrs=new JdbcQueryResult(rs);
      rs.close();
    }
 else {
      jrs=null;
    }
    stmt.close();
    return jrs;
  }
 catch (  SQLException e) {
    e.printStackTrace();
    logger.debug(StackTraceReader.stackTrace2String(e));
    throw new VerdictDBDbmsException(e.getMessage());
  }
}
Program: 95913
Project: 95913
Buggy source:
public ExecutionResultReader process(String query) throws VerdictDBException {
  SelectQuery selectQuery=standardizeQuery(query);
  QueryExecutionPlan plan=QueryExecutionPlanFactory.create(scratchpadSchema,scrambleMetaSet,selectQuery);
  QueryExecutionPlan asyncPlan=AsyncQueryExecutionPlan.create(plan);
  QueryExecutionPlan simplifiedAsyncPlan=QueryExecutionPlanSimplifier.simplify(asyncPlan);
  ExecutionResultReader reader=ExecutablePlanRunner.getResultReader(conn,simplifiedAsyncPlan);
  return reader;
}

Fixed version (ground truth):
public ExecutionResultReader process(String query) throws VerdictDBException {
  SelectQuery selectQuery=standardizeQuery(query);
  QueryExecutionPlan plan=QueryExecutionPlanFactory.create(scratchpadSchema,scrambleMetaSet,selectQuery);
  QueryExecutionPlan asyncPlan=AsyncQueryExecutionPlan.create(plan);
  QueryExecutionPlanSimplifier.simplify2(asyncPlan);
  ExecutionResultReader reader=ExecutablePlanRunner.getResultReader(conn,asyncPlan);
  return reader;
}
Program: 95914
Project: 95914
Buggy source:
/** 
 * @param query A well-formed select query object
 * @throws VerdictDBValueException
 * @throws VerdictDBException
 */
public int getSerialNumber(){
  return ((TempIdCreatorInScratchpadSchema)idCreator).getSerialNumber();
}

Fixed version (ground truth):
public int getSerialNumber(){
  return ((TempIdCreatorInScratchpadSchema)idCreator).getSerialNumber();
}
Program: 95915
Project: 95915
Buggy source:
public void cleanUp(){
  ((TempIdCreatorInScratchpadSchema)idCreator).reset();
}

Fixed version (ground truth):
public void cleanUp(){
}
Program: 95916
Project: 95916
Buggy source:
/** 
 * Simplifies the originalPlan in place. The parent node may consolidates with its child when all of the following conditions are satisfied: 1. The child node is a descendant of CreateTableAsSelectNode 2. The child node is the unique source of the channel to which the child node is set to broadcast 3. The parent is the only subscriber of the child.
 * @param originalPlan The plan to simplify
 * @throws VerdictDBValidationException This exception is thrown if the number of placeholders inthe parent does not match the number of the children.
 */
public static void simplify2(QueryExecutionPlan originalPlan) throws VerdictDBValidationException {
  while (true) {
    ExecutableNodeBase parent=originalPlan.getRootNode();
    List<ExecutableNodeBase> sources=parent.getSources();
    boolean isConsolidated=false;
    for (int childIndex=0; childIndex < sources.size(); childIndex++) {
      isConsolidated=consolidates(parent,childIndex);
      if (isConsolidated) {
        break;
      }
    }
    if (!isConsolidated) {
      break;
    }
  }
}

Fixed version (ground truth):
/** 
 * Simplifies the originalPlan in place. The parent node may consolidates with its child when all of the following conditions are satisfied: 1. The child node is a descendant of CreateTableAsSelectNode 2. The child node is the unique source of the channel to which the child node is set to broadcast 3. The parent is the only subscriber of the child. 4. ProjectionNode can be safely consolidated. 5. AggExecutionNode can only be consolidated when its aggMeta is empty.
 * @param originalPlan The plan to simplify
 * @throws VerdictDBValidationException This exception is thrown if the number of placeholders inthe parent does not match the number of the children.
 */
public static void simplify2(QueryExecutionPlan originalPlan) throws VerdictDBValidationException {
  while (true) {
    ExecutableNodeBase parent=originalPlan.getRootNode();
    List<ExecutableNodeBase> sources=parent.getSources();
    boolean isConsolidated=false;
    for (int childIndex=0; childIndex < sources.size(); childIndex++) {
      isConsolidated=consolidates(parent,childIndex);
      if (isConsolidated) {
        break;
      }
    }
    if (!isConsolidated) {
      break;
    }
  }
}
Program: 95917
Project: 95917
Buggy source:
synchronized String generateUniqueIdentifier(){
  return String.format("String_Node_Str",serialNum,identifierNum++);
}

Fixed version (ground truth):
String generateUniqueIdentifier(){
  return generateUniqueIdentifier(GLOBAL_KEYWORD);
}
Program: 95918
Project: 95918
Buggy source:
@Override public String generateAliasName(String keyword){
  return String.format("String_Node_Str",keyword,generateUniqueIdentifier());
}

Fixed version (ground truth):
@Override public String generateAliasName(String keyword){
  return String.format("String_Node_Str",keyword,generateUniqueIdentifier(keyword));
}
Program: 95919
Project: 95919
Buggy source:
@Override public SqlConvertible createQuery(List<ExecutionInfoToken> tokens) throws VerdictDBException {
  for (  ExecutionInfoToken token : tokens) {
    AggMeta childAggMeta=(AggMeta)token.getValue("String_Node_Str");
    if (childAggMeta != null) {
      aggMeta.getCubes().addAll(childAggMeta.getCubes());
      aggMeta.setAggAlias(childAggMeta.getAggAlias());
      aggMeta.setOriginalSelectList(childAggMeta.getOriginalSelectList());
      aggMeta.setAggColumn(childAggMeta.getAggColumn());
      aggMeta.setAggColumnAggAliasPair(childAggMeta.getAggColumnAggAliasPair());
      aggMeta.setAggColumnAggAliasPairOfMaxMin(childAggMeta.getAggColumnAggAliasPairOfMaxMin());
      aggMeta.setMaxminAggAlias(childAggMeta.getMaxminAggAlias());
      aggMeta.setScrambleTableTierColumnAlias(childAggMeta.getScrambleTableTierColumnAlias());
      setAggMeta(aggMeta);
    }
  }
  return super.createQuery(tokens);
}

Fixed version (ground truth):
@Override public SqlConvertible createQuery(List<ExecutionInfoToken> tokens) throws VerdictDBException {
  return super.createQuery(tokens);
}
Program: 95920
Project: 95920
Buggy source:
public static AggCombinerExecutionNode create(IdCreator namer,ExecutableNodeBase leftQueryExecutionNode,ExecutableNodeBase rightQueryExecutionNode){
  AggCombinerExecutionNode node=new AggCombinerExecutionNode(namer);
  SelectQuery rightQuery=((QueryNodeBase)rightQueryExecutionNode).getSelectQuery();
  String leftAliasName=namer.generateAliasName();
  String rightAliasName=namer.generateAliasName();
  Pair<BaseTable,SubscriptionTicket> leftBaseAndTicket=node.createPlaceHolderTable(leftAliasName);
  Pair<BaseTable,SubscriptionTicket> rightBaseAndTicket=node.createPlaceHolderTable(rightAliasName);
  SelectQuery unionQuery=composeUnionQuery(rightQuery,leftBaseAndTicket.getLeft(),rightBaseAndTicket.getLeft());
  leftQueryExecutionNode.registerSubscriber(leftBaseAndTicket.getRight());
  rightQueryExecutionNode.registerSubscriber(rightBaseAndTicket.getRight());
  node.setSelectQuery(unionQuery);
  return node;
}

Fixed version (ground truth):
public static AggCombinerExecutionNode create(IdCreator namer,ExecutableNodeBase leftQueryExecutionNode,ExecutableNodeBase rightQueryExecutionNode){
  AggCombinerExecutionNode node=new AggCombinerExecutionNode(namer);
  SelectQuery rightQuery=((QueryNodeBase)rightQueryExecutionNode).getSelectQuery();
  String leftAliasName=namer.generateAliasName();
  String rightAliasName=namer.generateAliasName();
  Pair<BaseTable,SubscriptionTicket> leftBaseAndTicket=node.createPlaceHolderTable(leftAliasName);
  Pair<BaseTable,SubscriptionTicket> rightBaseAndTicket=node.createPlaceHolderTable(rightAliasName);
  SelectQuery unionQuery=composeUnionQuery(rightQuery,leftBaseAndTicket.getLeft(),rightBaseAndTicket.getLeft());
  leftQueryExecutionNode.registerSubscriber(leftBaseAndTicket.getRight());
  rightQueryExecutionNode.registerSubscriber(rightBaseAndTicket.getRight());
  node.setSelectQuery(unionQuery);
  updateAggMeta(node,leftQueryExecutionNode);
  updateAggMeta(node,rightQueryExecutionNode);
  return node;
}
Program: 95921
Project: 95921
Buggy source:
public static VerdictDBLogger getLogger(String name){
  return new VerdictDBLogger((Logger)LoggerFactory.getLogger(name));
}

Fixed version (ground truth):
public static VerdictDBLogger getLogger(String name){
  return new VerdictDBLogger(LoggerFactory.getLogger(name));
}
Program: 95922
Project: 95922
Buggy source:
public void setLevel(Level level){
  logger.setLevel(level);
}

Fixed version (ground truth):
public void setLevel(Level level){
  if (logger instanceof ch.qos.logback.classic.Logger) {
    ((ch.qos.logback.classic.Logger)logger).setLevel(level);
  }
}
Program: 95923
Project: 95923
Buggy source:
public void addAppender(Appender<ILoggingEvent> appender){
  appender.setContext(logger.getLoggerContext());
  logger.addAppender(appender);
}

Fixed version (ground truth):
public void addAppender(Appender<ILoggingEvent> appender){
  if (logger instanceof ch.qos.logback.classic.Logger) {
    appender.setContext(((ch.qos.logback.classic.Logger)logger).getLoggerContext());
    ((ch.qos.logback.classic.Logger)logger).addAppender(appender);
  }
}
Program: 95924
Project: 95924
Buggy source:
private VerdictDBLogger(Logger logger){
  this.logger=logger;
}

Fixed version (ground truth):
private VerdictDBLogger(org.slf4j.Logger logger){
  this.logger=logger;
}
Program: 95925
Project: 95925
Buggy source:
public DbmsQueryResult executeSingle(String sql) throws VerdictDBDbmsException {
  try {
    Statement stmt=conn.createStatement();
    JdbcQueryResult jrs=null;
    boolean doesResultExist=stmt.execute(sql);
    if (doesResultExist) {
      ResultSet rs=stmt.getResultSet();
      jrs=new JdbcQueryResult(rs);
      rs.close();
    }
 else {
      jrs=null;
    }
    stmt.close();
    return jrs;
  }
 catch (  SQLException e) {
    throw new VerdictDBDbmsException(e.getMessage());
  }
}

Fixed version (ground truth):
public DbmsQueryResult executeSingle(String sql) throws VerdictDBDbmsException {
  VerdictDBLogger logger=VerdictDBLogger.getLogger(this.getClass());
  logger.debug("String_Node_Str" + sql);
  try {
    Statement stmt=conn.createStatement();
    JdbcQueryResult jrs=null;
    boolean doesResultExist=stmt.execute(sql);
    if (doesResultExist) {
      ResultSet rs=stmt.getResultSet();
      jrs=new JdbcQueryResult(rs);
      rs.close();
    }
 else {
      jrs=null;
    }
    stmt.close();
    return jrs;
  }
 catch (  SQLException e) {
    throw new VerdictDBDbmsException(e.getMessage());
  }
}
Program: 95926
Project: 95926
Buggy source:
/** 
 * The tokens are retrieved from these queues.
 * @return
 */
public List<ExecutionTokenQueue> getSourceQueues();

Fixed version (ground truth):
/** 
 * The tokens are retrieved from these queues.
 * @return channel -> queue
 */
public Map<Integer,ExecutionTokenQueue> getSourceQueues();
Program: 95927
Project: 95927
Buggy source:
void broadcast(ExecutionInfoToken token){
  VerdictDBLogger logger=VerdictDBLogger.getLogger(this.getClass());
  logger.trace(String.format("String_Node_Str",node.toString()));
  logger.trace(token.toString());
  for (  ExecutableNode dest : node.getSubscribers()) {
    ExecutionInfoToken copiedToken=token.deepcopy();
    dest.getNotified(node,copiedToken);
    logger.trace(String.format("String_Node_Str",dest.toString()));
    logger.trace(copiedToken.toString());
  }
}

Fixed version (ground truth):
void broadcast(ExecutionInfoToken token){
  VerdictDBLogger logger=VerdictDBLogger.getLogger(this.getClass());
  logger.trace(String.format("String_Node_Str",node.toString()));
  for (  ExecutableNode dest : node.getSubscribers()) {
    logger.trace(String.format("String_Node_Str",dest.toString()));
  }
  logger.trace(token.toString());
  for (  ExecutableNode dest : node.getSubscribers()) {
    ExecutionInfoToken copiedToken=token.deepcopy();
    dest.getNotified(node,copiedToken);
  }
}
Program: 95928
Project: 95928
Buggy source:
List<ExecutionInfoToken> retrieve(){
  List<ExecutionTokenQueue> sourceQueues=node.getSourceQueues();
  for (int i=0; i < sourceQueues.size(); i++) {
    ExecutionInfoToken rs=sourceQueues.get(i).peek();
    if (rs == null) {
      return null;
    }
  }
  List<ExecutionInfoToken> results=new ArrayList<>();
  for (int i=0; i < sourceQueues.size(); i++) {
    ExecutionInfoToken rs=sourceQueues.get(i).take();
    results.add(rs);
  }
  return results;
}

Fixed version (ground truth):
List<ExecutionInfoToken> retrieve(){
  Map<Integer,ExecutionTokenQueue> sourceChannelAndQueues=node.getSourceQueues();
  for (  ExecutionTokenQueue queue : sourceChannelAndQueues.values()) {
    ExecutionInfoToken rs=queue.peek();
    if (rs == null) {
      return null;
    }
  }
  List<ExecutionInfoToken> results=new ArrayList<>();
  for (  Entry<Integer,ExecutionTokenQueue> channelAndQueue : sourceChannelAndQueues.entrySet()) {
    int channel=channelAndQueue.getKey();
    ExecutionInfoToken rs=channelAndQueue.getValue().take();
    rs.setKeyValue("String_Node_Str",channel);
    results.add(rs);
  }
  return results;
}
Program: 95929
Project: 95929
Buggy source:
@Override public String toString(){
  return ToStringBuilder.reflectionToString(this,ToStringStyle.SHORT_PREFIX_STYLE);
}

Fixed version (ground truth):
@Override public String toString(){
  return new ToStringBuilder(this).append("String_Node_Str",data).toString();
}
Program: 95930
Project: 95930
Buggy source:
@Override public List<ExecutionTokenQueue> getSourceQueues(){
  return new ArrayList<ExecutionTokenQueue>(channels.values());
}

Fixed version (ground truth):
@Override public Map<Integer,ExecutionTokenQueue> getSourceQueues(){
  return channels;
}
Program: 95932
Project: 95932
Buggy source:
public Pair<BaseTable,SubscriptionTicket> createPlaceHolderTable(String aliasName){
  BaseTable table=new BaseTable("String_Node_Str","String_Node_Str",aliasName);
  SubscriptionTicket ticket=createSubscriptionTicket();
  int channel=ticket.getChannel().get();
  placeholderRecords.add(new PlaceHolderRecord(table,channel));
  return Pair.of(table,ticket);
}

Fixed version (ground truth):
public Pair<BaseTable,SubscriptionTicket> createPlaceHolderTable(String aliasName){
  Pair<String,String> placeholder=placeholderNameCreator.getUniqueStringPair();
  BaseTable table=new BaseTable(placeholder.getLeft(),placeholder.getRight(),aliasName);
  SubscriptionTicket ticket=createSubscriptionTicket();
  int channel=ticket.getChannel().get();
  placeholderRecords.add(new PlaceHolderRecord(table,channel));
  return Pair.of(table,ticket);
}
Program: 95933
Project: 95933
Buggy source:
@Override public SqlConvertible createQuery(List<ExecutionInfoToken> tokens) throws VerdictDBException {
  if (tokens == null) {
    return null;
  }
  if (tokens.size() < placeholderRecords.size()) {
    throw new VerdictDBValueException("String_Node_Str");
  }
  for (int i=0; i < placeholderRecords.size(); i++) {
    PlaceHolderRecord record=placeholderRecords.get(i);
    BaseTable t=record.getPlaceholderTable();
    ExecutionInfoToken r=tokens.get(i);
    String schemaName=(String)r.getValue("String_Node_Str");
    String tableName=(String)r.getValue("String_Node_Str");
    t.setSchemaName(schemaName);
    t.setTableName(tableName);
  }
  return selectQuery;
}

Fixed version (ground truth):
@Override public SqlConvertible createQuery(List<ExecutionInfoToken> tokens) throws VerdictDBException {
  if (tokens == null) {
    return null;
  }
  if (tokens.size() < placeholderRecords.size()) {
    throw new VerdictDBValueException("String_Node_Str");
  }
  for (  ExecutionInfoToken token : tokens) {
    String actualSchemaName=(String)token.getValue("String_Node_Str");
    String actualTableName=(String)token.getValue("String_Node_Str");
    Integer channel=(Integer)token.getValue("String_Node_Str");
    if (actualSchemaName == null || actualTableName == null || channel == null) {
      continue;
    }
    for (    PlaceHolderRecord record : placeholderRecords) {
      BaseTable placeholderTable=record.getPlaceholderTable();
      int registeredChannel=record.getSubscriptionChannel();
      if (registeredChannel == channel) {
        BaseTable newBaseTable=new BaseTable(actualSchemaName,actualTableName);
        findPlaceHolderAndReplace(placeholderTable,newBaseTable);
      }
    }
  }
  return selectQuery;
}
Program: 95934
Project: 95934
Buggy source:
@Override public SqlConvertible createQuery(List<ExecutionInfoToken> tokens) throws VerdictDBException {
  for (  ExecutionInfoToken token : tokens) {
    AggMeta childAggMeta=(AggMeta)token.getValue("String_Node_Str");
    if (childAggMeta != null) {
      System.out.println(childAggMeta);
      AggMeta aggMeta=new AggMeta();
      aggMeta.getCubes().addAll(childAggMeta.getCubes());
      aggMeta.setAggAlias(childAggMeta.getAggAlias());
      aggMeta.setOriginalSelectList(childAggMeta.getOriginalSelectList());
      aggMeta.setAggColumn(childAggMeta.getAggColumn());
      aggMeta.setAggColumnAggAliasPair(childAggMeta.getAggColumnAggAliasPair());
      aggMeta.setAggColumnAggAliasPairOfMaxMin(childAggMeta.getAggColumnAggAliasPairOfMaxMin());
      aggMeta.setMaxminAggAlias(childAggMeta.getMaxminAggAlias());
      aggMeta.setScrambleTableTierColumnAlias(childAggMeta.getScrambleTableTierColumnAlias());
      setAggMeta(aggMeta);
    }
  }
  return super.createQuery(tokens);
}

Fixed version (ground truth):
@Override public SqlConvertible createQuery(List<ExecutionInfoToken> tokens) throws VerdictDBException {
  for (  ExecutionInfoToken token : tokens) {
    AggMeta childAggMeta=(AggMeta)token.getValue("String_Node_Str");
    if (childAggMeta != null) {
      System.out.println(childAggMeta);
      aggMeta.getCubes().addAll(childAggMeta.getCubes());
      aggMeta.setAggAlias(childAggMeta.getAggAlias());
      aggMeta.setOriginalSelectList(childAggMeta.getOriginalSelectList());
      aggMeta.setAggColumn(childAggMeta.getAggColumn());
      aggMeta.setAggColumnAggAliasPair(childAggMeta.getAggColumnAggAliasPair());
      aggMeta.setAggColumnAggAliasPairOfMaxMin(childAggMeta.getAggColumnAggAliasPairOfMaxMin());
      aggMeta.setMaxminAggAlias(childAggMeta.getMaxminAggAlias());
      aggMeta.setScrambleTableTierColumnAlias(childAggMeta.getScrambleTableTierColumnAlias());
      setAggMeta(aggMeta);
    }
  }
  return super.createQuery(tokens);
}
Program: 95937
Project: 95937
Buggy source:
/** 
 * Generate the permuation of multiple tiers
 * @param scrambleTableTierInfo
 * @return
 */
List<List<Integer>> generateTierPermuation(List<Pair<Integer,Integer>> scrambleTableTierInfo){
  if (scrambleTableTierInfo.size() == 1) {
    List<List<Integer>> res=new ArrayList<>();
    for (int tier=0; tier < scrambleTableTierInfo.get(0).getRight(); tier++) {
      res.add(Arrays.asList(tier));
    }
    return res;
  }
 else {
    List<Pair<Integer,Integer>> next=scrambleTableTierInfo.subList(1,scrambleTableTierInfo.size());
    List<List<Integer>> subres=generateTierPermuation(next);
    List<List<Integer>> res=new ArrayList<>();
    for (int tier=0; tier < scrambleTableTierInfo.get(0).getRight(); tier++) {
      for (      List<Integer> tierlist : subres) {
        List<Integer> newTierlist=new ArrayList<>();
        for (        int i : tierlist) {
          newTierlist.add(Integer.valueOf(i));
        }
        newTierlist.add(0,tier);
        res.add(newTierlist);
      }
    }
    return res;
  }
}

Fixed version (ground truth):
/** 
 * Generate the permuation of multiple tiers
 * @param scrambleTableTierInfo
 * @return
 */
private List<List<Integer>> generateTierPermuation(List<Pair<Integer,Integer>> scrambleTableTierInfo){
  if (scrambleTableTierInfo.size() == 1) {
    List<List<Integer>> res=new ArrayList<>();
    for (int tier=0; tier < scrambleTableTierInfo.get(0).getRight(); tier++) {
      res.add(Arrays.asList(tier));
    }
    return res;
  }
 else {
    List<Pair<Integer,Integer>> next=scrambleTableTierInfo.subList(1,scrambleTableTierInfo.size());
    List<List<Integer>> subres=generateTierPermuation(next);
    List<List<Integer>> res=new ArrayList<>();
    for (int tier=0; tier < scrambleTableTierInfo.get(0).getRight(); tier++) {
      for (      List<Integer> tierlist : subres) {
        List<Integer> newTierlist=new ArrayList<>();
        for (        int i : tierlist) {
          newTierlist.add(Integer.valueOf(i));
        }
        newTierlist.add(0,tier);
        res.add(newTierlist);
      }
    }
    return res;
  }
}
Program: 95941
Project: 95941
Buggy source:
public static AsyncAggExecutionNode create(IdCreator idCreator,List<ExecutableNodeBase> individualAggs,List<ExecutableNodeBase> combiners,ScrambleMetaSet meta) throws VerdictDBValueException {
  AsyncAggExecutionNode node=new AsyncAggExecutionNode();
  node.subscribeTo(individualAggs.get(0),0);
  for (  ExecutableNodeBase c : combiners) {
    node.subscribeTo(c,0);
  }
  node.setScrambleMeta(meta);
  node.setNamer(idCreator);
  return node;
}

Fixed version (ground truth):
public static AsyncAggExecutionNode create(IdCreator idCreator,List<ExecutableNodeBase> individualAggs,List<ExecutableNodeBase> combiners,ScrambleMetaSet meta){
  AsyncAggExecutionNode node=new AsyncAggExecutionNode();
  node.subscribeTo(individualAggs.get(0),0);
  for (  ExecutableNodeBase c : combiners) {
    node.subscribeTo(c,0);
  }
  node.setScrambleMetaSet(meta);
  node.setNamer(idCreator);
  return node;
}
Program: 95942
Project: 95942
Buggy source:
void copyFields(AsyncAggExecutionNode from,AsyncAggExecutionNode to){
  to.scrambleMeta=from.scrambleMeta;
  to.nonaggColumns=from.nonaggColumns;
  to.aggColumns=from.aggColumns;
}

Fixed version (ground truth):
void copyFields(AsyncAggExecutionNode from,AsyncAggExecutionNode to){
}
Program: 95943
Project: 95943
Buggy source:
UnnamedColumn generateCaseCondition(List<Integer> tierlist,Map<Integer,String> multipleTierTableTierInfo){
  Optional<ColumnOp> col=Optional.absent();
  for (  Map.Entry<Integer,String> entry : multipleTierTableTierInfo.entrySet()) {
    BaseColumn tierColumn=new BaseColumn(INNER_RAW_AGG_TABLE_ALIAS,entry.getValue());
    ColumnOp equation=new ColumnOp("String_Node_Str",Arrays.asList(tierColumn,ConstantColumn.valueOf(tierlist.get(entry.getKey()))));
    if (col.isPresent()) {
      col=Optional.of(new ColumnOp("String_Node_Str",Arrays.<UnnamedColumn>asList(equation,col.get())));
    }
 else {
      col=Optional.of(equation);
    }
  }
  return col.get();
}

Fixed version (ground truth):
private UnnamedColumn generateCaseCondition(List<Integer> tierlist,Map<Integer,String> multipleTierTableTierInfo){
  Optional<ColumnOp> col=Optional.absent();
  for (  Map.Entry<Integer,String> entry : multipleTierTableTierInfo.entrySet()) {
    BaseColumn tierColumn=new BaseColumn(INNER_RAW_AGG_TABLE_ALIAS,entry.getValue());
    ColumnOp equation=new ColumnOp("String_Node_Str",Arrays.asList(tierColumn,ConstantColumn.valueOf(tierlist.get(entry.getKey()))));
    if (col.isPresent()) {
      col=Optional.of(new ColumnOp("String_Node_Str",Arrays.<UnnamedColumn>asList(equation,col.get())));
    }
 else {
      col=Optional.of(equation);
    }
  }
  return col.get();
}
Program: 95944
Project: 95944
Buggy source:
@Test public void ScrambleTableWithScalingTest2() throws VerdictDBException, SQLException {
  RelationStandardizer.resetItemID();
  String sql="String_Node_Str";
  NonValidatingSQLParser sqlToRelation=new NonValidatingSQLParser();
  AbstractRelation relation=sqlToRelation.toRelation(sql);
  RelationStandardizer gen=new RelationStandardizer(staticMetaData);
  relation=gen.standardize((SelectQuery)relation);
  QueryExecutionPlan queryExecutionPlan=QueryExecutionPlanFactory.create("String_Node_Str",meta,(SelectQuery)relation);
  queryExecutionPlan.cleanUp();
  queryExecutionPlan=AsyncQueryExecutionPlan.create(queryExecutionPlan);
  ((AsyncAggExecutionNode)queryExecutionPlan.getRoot().getExecutableNodeBaseDependent(0).getExecutableNodeBaseDependent(0)).setScrambleMeta(meta);
  stmt.execute("String_Node_Str");
  JdbcConnection jdbcconn=new JdbcConnection(conn,new H2Syntax());
  ExecutablePlanRunner.runTillEnd(jdbcconn,queryExecutionPlan);
  jdbcconn.execute("String_Node_Str");
}

Fixed version (ground truth):
@Test public void ScrambleTableWithScalingTest2() throws VerdictDBException, SQLException {
  RelationStandardizer.resetItemID();
  String sql="String_Node_Str";
  NonValidatingSQLParser sqlToRelation=new NonValidatingSQLParser();
  AbstractRelation relation=sqlToRelation.toRelation(sql);
  RelationStandardizer gen=new RelationStandardizer(staticMetaData);
  relation=gen.standardize((SelectQuery)relation);
  QueryExecutionPlan queryExecutionPlan=QueryExecutionPlanFactory.create("String_Node_Str",meta,(SelectQuery)relation);
  queryExecutionPlan.cleanUp();
  queryExecutionPlan=AsyncQueryExecutionPlan.create(queryExecutionPlan);
  ((AsyncAggExecutionNode)queryExecutionPlan.getRoot().getExecutableNodeBaseDependent(0).getExecutableNodeBaseDependent(0)).setScrambleMetaSet(meta);
  stmt.execute("String_Node_Str");
  JdbcConnection jdbcconn=new JdbcConnection(conn,new H2Syntax());
  ExecutablePlanRunner.runTillEnd(jdbcconn,queryExecutionPlan);
  jdbcconn.execute("String_Node_Str");
}
Program: 95945
Project: 95945
Buggy source:
@Test public void ScrambleTableWithScalingTest() throws VerdictDBException, SQLException {
  RelationStandardizer.resetItemID();
  String sql="String_Node_Str";
  NonValidatingSQLParser sqlToRelation=new NonValidatingSQLParser();
  AbstractRelation relation=sqlToRelation.toRelation(sql);
  RelationStandardizer gen=new RelationStandardizer(staticMetaData);
  relation=gen.standardize((SelectQuery)relation);
  QueryExecutionPlan queryExecutionPlan=QueryExecutionPlanFactory.create("String_Node_Str",meta,(SelectQuery)relation);
  queryExecutionPlan.cleanUp();
  queryExecutionPlan=AsyncQueryExecutionPlan.create(queryExecutionPlan);
  ((AsyncAggExecutionNode)queryExecutionPlan.getRoot().getExecutableNodeBaseDependent(0)).setScrambleMeta(meta);
  stmt.execute("String_Node_Str");
  JdbcConnection jdbcconn=new JdbcConnection(conn,new H2Syntax());
  ExecutablePlanRunner.runTillEnd(jdbcconn,queryExecutionPlan);
  jdbcconn.execute("String_Node_Str");
}

Fixed version (ground truth):
@Test public void ScrambleTableWithScalingTest() throws VerdictDBException, SQLException {
  RelationStandardizer.resetItemID();
  String sql="String_Node_Str";
  NonValidatingSQLParser sqlToRelation=new NonValidatingSQLParser();
  AbstractRelation relation=sqlToRelation.toRelation(sql);
  RelationStandardizer gen=new RelationStandardizer(staticMetaData);
  relation=gen.standardize((SelectQuery)relation);
  QueryExecutionPlan queryExecutionPlan=QueryExecutionPlanFactory.create("String_Node_Str",meta,(SelectQuery)relation);
  queryExecutionPlan.cleanUp();
  queryExecutionPlan=AsyncQueryExecutionPlan.create(queryExecutionPlan);
  ((AsyncAggExecutionNode)queryExecutionPlan.getRoot().getExecutableNodeBaseDependent(0)).setScrambleMetaSet(meta);
  stmt.execute("String_Node_Str");
  JdbcConnection jdbcconn=new JdbcConnection(conn,new H2Syntax());
  ExecutablePlanRunner.runTillEnd(jdbcconn,queryExecutionPlan);
  jdbcconn.execute("String_Node_Str");
}
Program: 95947
Project: 95947
Buggy source:
public static SelectAllExecutionNode create(IdCreator namer,SelectQuery query) throws VerdictDBValueException {
  SelectAllExecutionNode selectAll=new SelectAllExecutionNode(null);
  Pair<BaseTable,SubscriptionTicket> baseAndSubscriptionTicket=selectAll.createPlaceHolderTable("String_Node_Str");
  SelectQuery selectQuery=SelectQuery.create(new AsteriskColumn(),baseAndSubscriptionTicket.getLeft());
  selectAll.setSelectQuery(selectQuery);
  if (query.isSupportedAggregate()) {
    AggExecutionNode dependent=AggExecutionNode.create(namer,query);
    dependent.registerSubscriber(baseAndSubscriptionTicket.getRight());
  }
 else {
    ProjectionNode dependent=ProjectionNode.create(namer,query);
    dependent.registerSubscriber(baseAndSubscriptionTicket.getRight());
  }
  return selectAll;
}

Fixed version (ground truth):
public static SelectAllExecutionNode create(IdCreator namer,SelectQuery query) throws VerdictDBValueException {
  SelectAllExecutionNode selectAll=new SelectAllExecutionNode(null);
  Pair<BaseTable,SubscriptionTicket> baseAndSubscriptionTicket=selectAll.createPlaceHolderTable("String_Node_Str");
  SelectQuery selectQuery=SelectQuery.create(new AsteriskColumn(),baseAndSubscriptionTicket.getLeft());
  selectQuery.addOrderby(query.getOrderby());
  if (query.getLimit().isPresent())   selectQuery.addLimit(query.getLimit().get());
  selectAll.setSelectQuery(selectQuery);
  if (query.isSupportedAggregate()) {
    AggExecutionNode dependent=AggExecutionNode.create(namer,query);
    dependent.registerSubscriber(baseAndSubscriptionTicket.getRight());
  }
 else {
    ProjectionNode dependent=ProjectionNode.create(namer,query);
    dependent.registerSubscriber(baseAndSubscriptionTicket.getRight());
  }
  return selectAll;
}
Program: 95949
Project: 95949
Buggy source:
@Override public DbmsQueryResult execute(String sql) throws VerdictDBDbmsException {
  try {
    Statement stmt=conn.createStatement();
    JdbcQueryResult jrs=null;
    boolean doesResultExist=stmt.execute(sql);
    if (doesResultExist) {
      ResultSet rs=stmt.getResultSet();
      jrs=new JdbcQueryResult(rs);
      rs.close();
    }
 else {
      jrs=null;
    }
    stmt.close();
    return jrs;
  }
 catch (  SQLException e) {
    throw new VerdictDBDbmsException(e.getMessage());
  }
}

Fixed version (ground truth):
@Override public DbmsQueryResult execute(String sql) throws VerdictDBDbmsException {
  System.out.println("String_Node_Str" + sql);
  try {
    Statement stmt=conn.createStatement();
    JdbcQueryResult jrs=null;
    boolean doesResultExist=stmt.execute(sql);
    if (doesResultExist) {
      ResultSet rs=stmt.getResultSet();
      jrs=new JdbcQueryResult(rs);
      rs.close();
    }
 else {
      jrs=null;
    }
    stmt.close();
    return jrs;
  }
 catch (  SQLException e) {
    throw new VerdictDBDbmsException(e.getMessage());
  }
}
Program: 95950
Project: 95950
Buggy source:
protected void copyFields(QueryNodeWithPlaceHolders from,QueryNodeWithPlaceHolders to){
  super.copyFields(from,to);
  to.placeholderTables=new ArrayList<>();
  to.placeholderTables.addAll(from.placeholderTables);
  to.placeholderTablesinFilter=new ArrayList<>();
  to.placeholderTablesinFilter.addAll(from.placeholderTablesinFilter);
}

Fixed version (ground truth):
protected void copyFields(QueryNodeWithPlaceHolders from,QueryNodeWithPlaceHolders to){
  super.copyFields(from,to);
  to.placeholderTables=new ArrayList<>();
  to.placeholderTables.addAll(from.placeholderTables);
  to.placeholderTablesinFilter=new ArrayList<>();
  to.placeholderTablesinFilter.addAll(from.placeholderTablesinFilter);
  deepcopyPlaceHolderTable(to.placeholderTables,to.selectQuery);
}