nus-yam/ex-repair huggingface dataset:
Program: 95952
Project: 95952
Buggy source:
@Test public void test13Tpch() throws VerdictDBException, SQLException {
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  stmt.execute("String_Node_Str");
  SelectQueryCoordinator coordinator=new SelectQueryCoordinator(new JdbcConnection(conn,new MysqlSyntax()));
  coordinator.setScrambleMetaSet(meta);
  coordinator.setDefaultSchema("String_Node_Str");
  ExecutionResultReader reader=coordinator.process(sql);
  NonValidatingSQLParser sqlToRelation=new NonValidatingSQLParser();
  AbstractRelation relation=sqlToRelation.toRelation(sql);
  RelationStandardizer gen=new RelationStandardizer(coordinator.getStaticMetaData());
  relation=gen.standardize((SelectQuery)relation);
  SelectQueryToSql selectQueryToSql=new SelectQueryToSql(new MysqlSyntax());
  String stdQuery=selectQueryToSql.toSql(relation);
  int cnt=0;
  while (reader.hasNext()) {
    DbmsQueryResult dbmsQueryResult=reader.next();
    cnt++;
    if (cnt == 3) {
      ResultSet rs=stmt.executeQuery(stdQuery);
      while (rs.next()) {
        dbmsQueryResult.next();
        assertEquals(rs.getString(1),dbmsQueryResult.getString(0));
        assertEquals(rs.getDouble(2),dbmsQueryResult.getDouble(1),1e-5);
      }
    }
  }
  assertEquals(3,cnt);
  stmt.execute("String_Node_Str");
}

Fixed version (ground truth):
@Test public void test13Tpch() throws VerdictDBException, SQLException {
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  stmt.execute("String_Node_Str");
  SelectQueryCoordinator coordinator=new SelectQueryCoordinator(new JdbcConnection(conn,new MysqlSyntax()));
  coordinator.setScrambleMetaSet(meta);
  coordinator.setDefaultSchema("String_Node_Str");
  ExecutionResultReader reader=coordinator.process(sql);
  NonValidatingSQLParser sqlToRelation=new NonValidatingSQLParser();
  AbstractRelation relation=sqlToRelation.toRelation(sql);
  RelationStandardizer gen=new RelationStandardizer(coordinator.getStaticMetaData());
  relation=gen.standardize((SelectQuery)relation);
  SelectQueryToSql selectQueryToSql=new SelectQueryToSql(new MysqlSyntax());
  String stdQuery=selectQueryToSql.toSql(relation);
  int cnt=0;
  while (reader.hasNext()) {
    DbmsQueryResult dbmsQueryResult=reader.next();
    cnt++;
    if (cnt == 3) {
      ResultSet rs=stmt.executeQuery(stdQuery);
      while (rs.next()) {
        dbmsQueryResult.next();
        assertEquals(rs.getString(1),dbmsQueryResult.getString(0));
        assertEquals(rs.getDouble(2),dbmsQueryResult.getDouble(1),1e-5);
      }
    }
  }
  assertEquals(3,cnt);
  stmt.execute("String_Node_Str");
  System.out.println("String_Node_Str");
}
Program: 95954
Project: 95954
Buggy source:
@Test public void test15Tpch() throws VerdictDBException, SQLException {
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  stmt.execute("String_Node_Str");
  SelectQueryCoordinator coordinator=new SelectQueryCoordinator(new JdbcConnection(conn,new MysqlSyntax()));
  coordinator.setScrambleMetaSet(meta);
  coordinator.setDefaultSchema("String_Node_Str");
  ExecutionResultReader reader=coordinator.process(sql);
  NonValidatingSQLParser sqlToRelation=new NonValidatingSQLParser();
  AbstractRelation relation=sqlToRelation.toRelation(sql);
  RelationStandardizer gen=new RelationStandardizer(coordinator.getStaticMetaData());
  relation=gen.standardize((SelectQuery)relation);
  SelectQueryToSql selectQueryToSql=new SelectQueryToSql(new MysqlSyntax());
  String stdQuery=selectQueryToSql.toSql(relation);
  int cnt=0;
  while (reader.hasNext()) {
    DbmsQueryResult dbmsQueryResult=reader.next();
    cnt++;
    if (cnt == 10) {
      ResultSet rs=stmt.executeQuery(stdQuery);
      while (rs.next()) {
        dbmsQueryResult.next();
        assertEquals(rs.getDouble(2),dbmsQueryResult.getDouble(1),1e-5);
        assertEquals(rs.getDouble(1),dbmsQueryResult.getDouble(0),1e-5);
      }
    }
  }
  assertEquals(10,cnt);
  stmt.execute("String_Node_Str");
}

Fixed version (ground truth):
@Test public void test15Tpch() throws VerdictDBException, SQLException {
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  stmt.execute("String_Node_Str");
  SelectQueryCoordinator coordinator=new SelectQueryCoordinator(new JdbcConnection(conn,new MysqlSyntax()));
  coordinator.setScrambleMetaSet(meta);
  coordinator.setDefaultSchema("String_Node_Str");
  ExecutionResultReader reader=coordinator.process(sql);
  NonValidatingSQLParser sqlToRelation=new NonValidatingSQLParser();
  AbstractRelation relation=sqlToRelation.toRelation(sql);
  RelationStandardizer gen=new RelationStandardizer(coordinator.getStaticMetaData());
  relation=gen.standardize((SelectQuery)relation);
  SelectQueryToSql selectQueryToSql=new SelectQueryToSql(new MysqlSyntax());
  String stdQuery=selectQueryToSql.toSql(relation);
  int cnt=0;
  while (reader.hasNext()) {
    DbmsQueryResult dbmsQueryResult=reader.next();
    cnt++;
    if (cnt == 10) {
      ResultSet rs=stmt.executeQuery(stdQuery);
      while (rs.next()) {
        dbmsQueryResult.next();
        assertEquals(rs.getDouble(2),dbmsQueryResult.getDouble(1),1e-5);
        assertEquals(rs.getDouble(1),dbmsQueryResult.getDouble(0),1e-5);
      }
    }
  }
  assertEquals(10,cnt);
  stmt.execute("String_Node_Str");
  System.out.println("String_Node_Str");
}
Program: 95964
Project: 95964
Buggy source:
@Test public void test14Tpch() throws VerdictDBException, SQLException {
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  stmt.execute("String_Node_Str");
  SelectQueryCoordinator coordinator=new SelectQueryCoordinator(new JdbcConnection(conn,new MysqlSyntax()));
  coordinator.setScrambleMetaSet(meta);
  coordinator.setDefaultSchema("String_Node_Str");
  ExecutionResultReader reader=coordinator.process(sql);
  NonValidatingSQLParser sqlToRelation=new NonValidatingSQLParser();
  AbstractRelation relation=sqlToRelation.toRelation(sql);
  RelationStandardizer gen=new RelationStandardizer(coordinator.getStaticMetaData());
  relation=gen.standardize((SelectQuery)relation);
  SelectQueryToSql selectQueryToSql=new SelectQueryToSql(new MysqlSyntax());
  String stdQuery=selectQueryToSql.toSql(relation);
  int cnt=0;
  while (reader.hasNext()) {
    DbmsQueryResult dbmsQueryResult=reader.next();
    cnt++;
    if (cnt == 10) {
      ResultSet rs=stmt.executeQuery(stdQuery);
      while (rs.next()) {
        dbmsQueryResult.next();
        assertEquals(rs.getDouble(2),dbmsQueryResult.getDouble(1),1e-5);
        assertEquals(rs.getDouble(1),dbmsQueryResult.getDouble(0),1e-5);
      }
    }
  }
  assertEquals(10,cnt);
  stmt.execute("String_Node_Str");
}

Fixed version (ground truth):
@Test public void test14Tpch() throws VerdictDBException, SQLException {
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  stmt.execute("String_Node_Str");
  SelectQueryCoordinator coordinator=new SelectQueryCoordinator(new JdbcConnection(conn,new MysqlSyntax()));
  coordinator.setScrambleMetaSet(meta);
  coordinator.setDefaultSchema("String_Node_Str");
  ExecutionResultReader reader=coordinator.process(sql);
  NonValidatingSQLParser sqlToRelation=new NonValidatingSQLParser();
  AbstractRelation relation=sqlToRelation.toRelation(sql);
  RelationStandardizer gen=new RelationStandardizer(coordinator.getStaticMetaData());
  relation=gen.standardize((SelectQuery)relation);
  SelectQueryToSql selectQueryToSql=new SelectQueryToSql(new MysqlSyntax());
  String stdQuery=selectQueryToSql.toSql(relation);
  int cnt=0;
  while (reader.hasNext()) {
    DbmsQueryResult dbmsQueryResult=reader.next();
    cnt++;
    if (cnt == 10) {
      ResultSet rs=stmt.executeQuery(stdQuery);
      while (rs.next()) {
        dbmsQueryResult.next();
        assertEquals(rs.getDouble(2),dbmsQueryResult.getDouble(1),1e-5);
        assertEquals(rs.getDouble(1),dbmsQueryResult.getDouble(0),1e-5);
      }
    }
  }
  assertEquals(10,cnt);
  stmt.execute("String_Node_Str");
  System.out.println("String_Node_Str");
}
Program: 95966
Project: 95966
Buggy source:
@Test public void test6Tpch() throws VerdictDBException, SQLException {
  RelationStandardizer.resetItemID();
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  stmt.execute("String_Node_Str");
  SelectQueryCoordinator coordinator=new SelectQueryCoordinator(new JdbcConnection(conn,new MysqlSyntax()));
  coordinator.setScrambleMetaSet(meta);
  coordinator.setDefaultSchema("String_Node_Str");
  ExecutionResultReader reader=coordinator.process(sql);
  NonValidatingSQLParser sqlToRelation=new NonValidatingSQLParser();
  AbstractRelation relation=sqlToRelation.toRelation(sql);
  RelationStandardizer gen=new RelationStandardizer(coordinator.getStaticMetaData());
  relation=gen.standardize((SelectQuery)relation);
  SelectQueryToSql selectQueryToSql=new SelectQueryToSql(new MysqlSyntax());
  String stdQuery=selectQueryToSql.toSql(relation);
  int cnt=0;
  while (reader.hasNext()) {
    DbmsQueryResult dbmsQueryResult=reader.next();
    cnt++;
    if (cnt == 10) {
      ResultSet rs=stmt.executeQuery(stdQuery);
      while (rs.next()) {
        dbmsQueryResult.next();
        assertEquals(rs.getDouble(1),dbmsQueryResult.getDouble(0),1e-5);
      }
    }
  }
  assertEquals(10,cnt);
  stmt.execute("String_Node_Str");
}

Fixed version (ground truth):
@Test public void test6Tpch() throws VerdictDBException, SQLException {
  RelationStandardizer.resetItemID();
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  stmt.execute("String_Node_Str");
  SelectQueryCoordinator coordinator=new SelectQueryCoordinator(new JdbcConnection(conn,new MysqlSyntax()));
  coordinator.setScrambleMetaSet(meta);
  coordinator.setDefaultSchema("String_Node_Str");
  ExecutionResultReader reader=coordinator.process(sql);
  NonValidatingSQLParser sqlToRelation=new NonValidatingSQLParser();
  AbstractRelation relation=sqlToRelation.toRelation(sql);
  RelationStandardizer gen=new RelationStandardizer(coordinator.getStaticMetaData());
  relation=gen.standardize((SelectQuery)relation);
  SelectQueryToSql selectQueryToSql=new SelectQueryToSql(new MysqlSyntax());
  String stdQuery=selectQueryToSql.toSql(relation);
  int cnt=0;
  while (reader.hasNext()) {
    DbmsQueryResult dbmsQueryResult=reader.next();
    cnt++;
    if (cnt == 10) {
      ResultSet rs=stmt.executeQuery(stdQuery);
      while (rs.next()) {
        dbmsQueryResult.next();
        assertEquals(rs.getDouble(1),dbmsQueryResult.getDouble(0),1e-5);
      }
    }
  }
  assertEquals(10,cnt);
  stmt.execute("String_Node_Str");
  System.out.println("String_Node_Str");
}
Program: 95967
Project: 95967
Buggy source:
@Test public void test4Tpch() throws VerdictDBException, SQLException {
  RelationStandardizer.resetItemID();
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  stmt.execute("String_Node_Str");
  SelectQueryCoordinator coordinator=new SelectQueryCoordinator(new JdbcConnection(conn,new MysqlSyntax()));
  coordinator.setScrambleMetaSet(meta);
  coordinator.setDefaultSchema("String_Node_Str");
  ExecutionResultReader reader=coordinator.process(sql);
  NonValidatingSQLParser sqlToRelation=new NonValidatingSQLParser();
  AbstractRelation relation=sqlToRelation.toRelation(sql);
  RelationStandardizer gen=new RelationStandardizer(coordinator.getStaticMetaData());
  relation=gen.standardize((SelectQuery)relation);
  SelectQueryToSql selectQueryToSql=new SelectQueryToSql(new MysqlSyntax());
  String stdQuery=selectQueryToSql.toSql(relation);
  int cnt=0;
  while (reader.hasNext()) {
    DbmsQueryResult dbmsQueryResult=reader.next();
    cnt++;
    if (cnt == 12) {
      ResultSet rs=stmt.executeQuery(stdQuery);
      while (rs.next()) {
        dbmsQueryResult.next();
        assertEquals(rs.getString(1),dbmsQueryResult.getString(0));
        assertEquals(rs.getDouble(2),dbmsQueryResult.getDouble(1),1e-5);
      }
    }
  }
  assertEquals(12,cnt);
  stmt.execute("String_Node_Str");
}

Fixed version (ground truth):
@Test public void test4Tpch() throws VerdictDBException, SQLException {
  RelationStandardizer.resetItemID();
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  stmt.execute("String_Node_Str");
  SelectQueryCoordinator coordinator=new SelectQueryCoordinator(new JdbcConnection(conn,new MysqlSyntax()));
  coordinator.setScrambleMetaSet(meta);
  coordinator.setDefaultSchema("String_Node_Str");
  ExecutionResultReader reader=coordinator.process(sql);
  NonValidatingSQLParser sqlToRelation=new NonValidatingSQLParser();
  AbstractRelation relation=sqlToRelation.toRelation(sql);
  RelationStandardizer gen=new RelationStandardizer(coordinator.getStaticMetaData());
  relation=gen.standardize((SelectQuery)relation);
  SelectQueryToSql selectQueryToSql=new SelectQueryToSql(new MysqlSyntax());
  String stdQuery=selectQueryToSql.toSql(relation);
  int cnt=0;
  while (reader.hasNext()) {
    DbmsQueryResult dbmsQueryResult=reader.next();
    cnt++;
    if (cnt == 12) {
      ResultSet rs=stmt.executeQuery(stdQuery);
      while (rs.next()) {
        dbmsQueryResult.next();
        assertEquals(rs.getString(1),dbmsQueryResult.getString(0));
        assertEquals(rs.getDouble(2),dbmsQueryResult.getDouble(1),1e-5);
      }
    }
  }
  assertEquals(12,cnt);
  stmt.execute("String_Node_Str");
  System.out.println("String_Node_Str");
}
Program: 95969
Project: 95969
Buggy source:
@Override public AbstractRelation getScramblingSource(String originalSchema,String originalTable,Map<String,Object> metaData){
  if (primaryColumnName.isPresent()) {
    Pair<String,String> fullTableName=(Pair<String,String>)metaData.get(LargeGroupListNode.class.getSimpleName());
    String largeGroupListSchemaName=fullTableName.getLeft();
    String largeGroupListTableName=fullTableName.getRight();
    JoinTable source=JoinTable.create(Arrays.<AbstractRelation>asList(new BaseTable(originalSchema,originalTable,MAIN_TABLE_SOURCE_ALIAS_NAME),new BaseTable(largeGroupListSchemaName,largeGroupListTableName,RIGHT_TABLE_SOURCE_ALIAS_NAME)),Arrays.asList(JoinTable.JoinType.leftouter),Arrays.<UnnamedColumn>asList(ColumnOp.equal(new BaseColumn(MAIN_TABLE_SOURCE_ALIAS_NAME,primaryColumnName.get()),new BaseColumn(RIGHT_TABLE_SOURCE_ALIAS_NAME,LargeGroupListNode.PRIMARY_GROUP_RENAME))));
    return source;
  }
 else {
    return new BaseTable(originalSchema,originalTable,MAIN_TABLE_SOURCE_ALIAS_NAME);
  }
}

Fixed version (ground truth):
@Override public AbstractRelation getScramblingSource(String originalSchema,String originalTable,Map<String,Object> metaData){
  if (primaryColumnName.isPresent()) {
    @SuppressWarnings("String_Node_Str") Pair<String,String> fullTableName=(Pair<String,String>)metaData.get(LargeGroupListNode.class.getSimpleName());
    String largeGroupListSchemaName=fullTableName.getLeft();
    String largeGroupListTableName=fullTableName.getRight();
    JoinTable source=JoinTable.create(Arrays.<AbstractRelation>asList(new BaseTable(originalSchema,originalTable,MAIN_TABLE_SOURCE_ALIAS_NAME),new BaseTable(largeGroupListSchemaName,largeGroupListTableName,RIGHT_TABLE_SOURCE_ALIAS_NAME)),Arrays.asList(JoinTable.JoinType.leftouter),Arrays.<UnnamedColumn>asList(ColumnOp.equal(new BaseColumn(MAIN_TABLE_SOURCE_ALIAS_NAME,primaryColumnName.get()),new BaseColumn(RIGHT_TABLE_SOURCE_ALIAS_NAME,LargeGroupListNode.PRIMARY_GROUP_RENAME))));
    return source;
  }
 else {
    return new BaseTable(originalSchema,originalTable,MAIN_TABLE_SOURCE_ALIAS_NAME);
  }
}
Program: 95971
Project: 95971
Buggy source:
@Test public void testUniformScramblingPlanNonEmptyTable() throws VerdictDBException, SQLException {
  mysqlConn.createStatement().execute("String_Node_Str");
  String newSchemaName="String_Node_Str";
  String newTableName="String_Node_Str";
  String oldSchemaName="String_Node_Str";
  String oldTableName="String_Node_Str";
  int blockCount=10;
  ScramblingMethod method=new UniformScramblingMethod(blockCount);
  Map<String,String> options=new HashMap<>();
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  mysqlConn.createStatement().execute(String.format("String_Node_Str",newSchemaName,newTableName));
  ScramblingPlan plan=ScramblingPlan.create(newSchemaName,newTableName,oldSchemaName,oldTableName,method,options);
  DbmsConnection conn=new JdbcConnection(mysqlConn);
  ExecutablePlanRunner.runTillEnd(conn,plan);
  mysqlConn.createStatement().execute("String_Node_Str");
}

Fixed version (ground truth):
@Test public void testUniformScramblingPlanNonEmptyTable() throws VerdictDBException, SQLException {
  for (int i=0; i < 10; i++) {
    mysqlConn.createStatement().execute(String.format("String_Node_Str",i));
  }
  String newSchemaName="String_Node_Str";
  String newTableName="String_Node_Str";
  String oldSchemaName="String_Node_Str";
  String oldTableName="String_Node_Str";
  int blockSize=2;
  ScramblingMethod method=new UniformScramblingMethod(blockSize);
  Map<String,String> options=new HashMap<>();
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  mysqlConn.createStatement().execute(String.format("String_Node_Str",newSchemaName,newTableName));
  ScramblingPlan plan=ScramblingPlan.create(newSchemaName,newTableName,oldSchemaName,oldTableName,method,options);
  DbmsConnection conn=new JdbcConnection(mysqlConn);
  ExecutablePlanRunner.runTillEnd(conn,plan);
  DbmsQueryResult result=conn.execute(String.format("String_Node_Str",newSchemaName,newTableName));
  result.printContent();
  mysqlConn.createStatement().execute("String_Node_Str");
}
Program: 95972
Project: 95972
Buggy source:
@Override public List<Double> getCumulativeProbabilityDistributionForTier(Map<String,Object> metaData,int tier){
  DbmsQueryResult tableSizeResult=(DbmsQueryResult)metaData.get("String_Node_Str");
  tableSizeResult.next();
  long tableSize=tableSizeResult.getLong(0);
  long totalNumberOfblocks=(long)Math.ceil(tableSize / (float)blockSize);
  List<Double> prob=new ArrayList<>();
  for (int i=0; i < totalNumberOfblocks; i++) {
    prob.add((i + 1) / (double)totalNumberOfblocks);
  }
  return prob;
}

Fixed version (ground truth):
@Override public List<Double> getCumulativeProbabilityDistributionForTier(Map<String,Object> metaData,int tier){
  DbmsQueryResult tableSizeResult=(DbmsQueryResult)metaData.get(TableSizeCountNode.class.getSimpleName());
  tableSizeResult.next();
  long tableSize=tableSizeResult.getLong(TableSizeCountNode.TOTAL_COUNT_ALIAS_NAME);
  long totalNumberOfblocks=(long)Math.ceil(tableSize / (float)blockSize);
  List<Double> prob=new ArrayList<>();
  for (int i=0; i < totalNumberOfblocks; i++) {
    prob.add((i + 1) / (double)totalNumberOfblocks);
  }
  return prob;
}
Program: 95973
Project: 95973
Buggy source:
@Test public void testGetTierExpressions() throws VerdictDBDbmsException {
  int blockSize=10;
  String scratchpadSchemaName="String_Node_Str";
  String primaryGroupColumnName="String_Node_Str";
  FastConvergeScramblingMethod method=new FastConvergeScramblingMethod(blockSize,scratchpadSchemaName,primaryGroupColumnName);
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  DbmsConnection conn=new JdbcConnection(h2conn);
  DbmsQueryResult queryResult=conn.execute(sql);
  Map<String,Object> metaData=new HashMap<>();
  metaData.put("String_Node_Str",queryResult);
  List<UnnamedColumn> tiers=method.getTierExpressions(metaData);
  assertEquals("String_Node_Str",((ColumnOp)tiers.get(0)).getOpType());
  assertEquals("String_Node_Str",((ColumnOp)tiers.get(1)).getOpType());
}

Fixed version (ground truth):
@Test public void testGetTierExpressions() throws VerdictDBDbmsException {
  int blockSize=10;
  String scratchpadSchemaName="String_Node_Str";
  String primaryGroupColumnName="String_Node_Str";
  FastConvergeScramblingMethod method=new FastConvergeScramblingMethod(blockSize,scratchpadSchemaName,primaryGroupColumnName);
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  DbmsConnection conn=new JdbcConnection(h2conn);
  DbmsQueryResult queryResult=conn.execute(sql);
  Map<String,Object> metaData=new HashMap<>();
  metaData.put(PercentilesAndCountNode.class.getSimpleName(),queryResult);
  List<UnnamedColumn> tiers=method.getTierExpressions(metaData);
  assertEquals("String_Node_Str",((ColumnOp)tiers.get(0)).getOpType());
  assertEquals("String_Node_Str",((ColumnOp)tiers.get(1)).getOpType());
}
Program: 95974
Project: 95974
Buggy source:
@Test public void testScramblingNodeCreation() throws VerdictDBException, SQLException {
  String newSchemaName="String_Node_Str";
  String newTableName="String_Node_Str";
  String oldSchemaName="String_Node_Str";
  String oldTableName="String_Node_Str";
  int blockSize=2;
  ScramblingMethod method=new UniformScramblingMethod(blockSize);
  Map<String,String> options=new HashMap<>();
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  String sql="String_Node_Str";
  DbmsConnection conn=new JdbcConnection(mysqlConn);
  DbmsQueryResult queryResult=conn.execute(sql);
  ScramblingNode node=ScramblingNode.create(newSchemaName,newTableName,oldSchemaName,oldTableName,method,options);
  List<ExecutionInfoToken> tokens=new ArrayList<>();
  ExecutionInfoToken e=new ExecutionInfoToken();
  e.setKeyValue("String_Node_Str",queryResult);
  tokens.add(e);
  e=new ExecutionInfoToken();
  e.setKeyValue("String_Node_Str",newSchemaName);
  e.setKeyValue("String_Node_Str",newTableName);
  tokens.add(e);
  SqlConvertible query=node.createQuery(tokens);
  sql=QueryToSql.convert(new MysqlSyntax(),query);
  String expected="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  assertEquals(expected,sql);
  mysqlConn.createStatement().execute("String_Node_Str");
  mysqlConn.createStatement().execute(sql);
}

Fixed version (ground truth):
@Test public void testScramblingNodeCreation() throws VerdictDBException, SQLException {
  String newSchemaName="String_Node_Str";
  String newTableName="String_Node_Str";
  String oldSchemaName="String_Node_Str";
  String oldTableName="String_Node_Str";
  int blockSize=2;
  ScramblingMethod method=new UniformScramblingMethod(blockSize);
  Map<String,String> options=new HashMap<>();
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  String sql="String_Node_Str";
  DbmsConnection conn=new JdbcConnection(mysqlConn);
  DbmsQueryResult queryResult=conn.execute(sql);
  ScramblingNode node=ScramblingNode.create(newSchemaName,newTableName,oldSchemaName,oldTableName,method,options);
  List<ExecutionInfoToken> tokens=new ArrayList<>();
  ExecutionInfoToken e=new ExecutionInfoToken();
  e.setKeyValue(TableSizeCountNode.class.getSimpleName(),queryResult);
  tokens.add(e);
  e=new ExecutionInfoToken();
  e.setKeyValue("String_Node_Str",newSchemaName);
  e.setKeyValue("String_Node_Str",newTableName);
  tokens.add(e);
  SqlConvertible query=node.createQuery(tokens);
  sql=QueryToSql.convert(new MysqlSyntax(),query);
  String expected="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  assertEquals(expected,sql);
  mysqlConn.createStatement().execute("String_Node_Str");
  mysqlConn.createStatement().execute(sql);
}
Program: 95975
Project: 95975
Buggy source:
@Test public void testUniformScramblingPlanEmptyTable() throws VerdictDBException, SQLException {
  mysqlConn.createStatement().execute("String_Node_Str");
  String newSchemaName="String_Node_Str";
  String newTableName="String_Node_Str";
  String oldSchemaName="String_Node_Str";
  String oldTableName="String_Node_Str";
  int blockCount=10;
  ScramblingMethod method=new UniformScramblingMethod(blockCount);
  Map<String,String> options=new HashMap<>();
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  mysqlConn.createStatement().execute(String.format("String_Node_Str",newSchemaName,newTableName));
  ScramblingPlan plan=ScramblingPlan.create(newSchemaName,newTableName,oldSchemaName,oldTableName,method,options);
  DbmsConnection conn=new JdbcConnection(mysqlConn);
  ExecutablePlanRunner.runTillEnd(conn,plan);
}

Fixed version (ground truth):
@Test public void testUniformScramblingPlanEmptyTable() throws VerdictDBException, SQLException {
  mysqlConn.createStatement().execute("String_Node_Str");
  String newSchemaName="String_Node_Str";
  String newTableName="String_Node_Str";
  String oldSchemaName="String_Node_Str";
  String oldTableName="String_Node_Str";
  int blockSize=3;
  ScramblingMethod method=new UniformScramblingMethod(blockSize);
  Map<String,String> options=new HashMap<>();
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  mysqlConn.createStatement().execute(String.format("String_Node_Str",newSchemaName,newTableName));
  ScramblingPlan plan=ScramblingPlan.create(newSchemaName,newTableName,oldSchemaName,oldTableName,method,options);
  DbmsConnection conn=new JdbcConnection(mysqlConn);
  ExecutablePlanRunner.runTillEnd(conn,plan);
}
Program: 95976
Project: 95976
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: 95977
Project: 95977
Buggy source:
@Override public void printContent(){
  StringBuilder row;
  boolean isFirstCol=true;
  row=new StringBuilder();
  for (  String col : columnNames) {
    if (isFirstCol) {
      row.append(col);
      isFirstCol=false;
    }
 else {
      row.append("String_Node_Str" + col);
    }
  }
  System.out.println(row.toString());
  int colCount=getColumnCount();
  while (this.next()) {
    row=new StringBuilder();
    for (int i=0; i < colCount; i++) {
      if (i == 0) {
        row.append(getValue(i).toString());
      }
 else {
        row.append("String_Node_Str");
        row.append(getValue(i).toString());
      }
    }
    System.out.println(row.toString());
  }
}

Fixed version (ground truth):
@Override public void printContent(){
  StringBuilder row;
  boolean isFirstCol=true;
  row=new StringBuilder();
  for (  String col : columnNames) {
    if (isFirstCol) {
      row.append(col);
      isFirstCol=false;
    }
 else {
      row.append("String_Node_Str" + col);
    }
  }
  System.out.println(row.toString());
  int colCount=getColumnCount();
  while (next()) {
    row=new StringBuilder();
    for (int i=0; i < colCount; i++) {
      if (i == 0) {
        row.append(getString(i));
      }
 else {
        row.append("String_Node_Str");
        row.append(getString(i));
      }
    }
    System.out.println(row.toString());
  }
}
Program: 95978
Project: 95978
Buggy source:
/** 
 * Probability distribution for Tier2: the tuples that do not belong to tier0 or tier1.
 * @param metaData
 */
private void populateTier2CumulProbDist(Map<String,Object> metaData){
  List<Double> cumulProbDist=new ArrayList<>();
  Pair<Long,Long> tableSizeAndBlockNumber=retrieveTableSizeAndBlockNumber(metaData);
  long tableSize=tableSizeAndBlockNumber.getLeft();
  long totalNumberOfblocks=tableSizeAndBlockNumber.getRight();
  long tier2Size=tableSize - outlierSize - smallGroupSizeSum;
  for (int i=0; i < totalNumberOfblocks; i++) {
    long thisTier0Size;
    long thisTier1Size;
    if (i == 0) {
      thisTier0Size=(long)(outlierSize * tier0CumulProbDist.get(i));
      thisTier1Size=(long)(smallGroupSizeSum * tier1CumulProbDist.get(i));
    }
 else {
      thisTier0Size=(long)(outlierSize * (tier0CumulProbDist.get(i) - tier0CumulProbDist.get(i - 1)));
      thisTier1Size=(long)(smallGroupSizeSum * (tier1CumulProbDist.get(i) - tier1CumulProbDist.get(i - 1)));
    }
    long thisBlockSize=blockSize - thisTier0Size - thisTier1Size;
    if (tier2Size == 0) {
      cumulProbDist.add(1.0);
    }
 else {
      double thisBlockRatio=thisBlockSize / tier2Size;
      cumulProbDist.add(thisBlockRatio);
    }
  }
  tier2CumulProbDist=cumulProbDist;
}

Fixed version (ground truth):
/** 
 * Probability distribution for Tier2: the tuples that do not belong to tier0 or tier1.
 * @param metaData
 */
private void populateTier2CumulProbDist(Map<String,Object> metaData){
  List<Double> cumulProbDist=new ArrayList<>();
  Pair<Long,Long> tableSizeAndBlockNumber=retrieveTableSizeAndBlockNumber(metaData);
  long tableSize=tableSizeAndBlockNumber.getLeft();
  long totalNumberOfblocks=tableSizeAndBlockNumber.getRight();
  long tier2Size=tableSize - outlierSize - smallGroupSizeSum;
  for (int i=0; i < totalNumberOfblocks; i++) {
    long thisTier0Size;
    long thisTier1Size;
    if (i == 0) {
      thisTier0Size=(long)(outlierSize * tier0CumulProbDist.get(i));
      thisTier1Size=(long)(smallGroupSizeSum * tier1CumulProbDist.get(i));
    }
 else {
      thisTier0Size=(long)(outlierSize * (tier0CumulProbDist.get(i) - tier0CumulProbDist.get(i - 1)));
      thisTier1Size=(long)(smallGroupSizeSum * (tier1CumulProbDist.get(i) - tier1CumulProbDist.get(i - 1)));
    }
    long thisBlockSize=blockSize - thisTier0Size - thisTier1Size;
    if (tier2Size == 0) {
      cumulProbDist.add(1.0);
    }
 else {
      double thisBlockRatio=thisBlockSize / (double)tier2Size;
      if (i == 0) {
        cumulProbDist.add(thisBlockRatio);
      }
 else {
        cumulProbDist.add(cumulProbDist.get(i - 1) + thisBlockRatio);
      }
    }
  }
  tier2CumulProbDist=cumulProbDist;
}
Program: 95980
Project: 95980
Buggy source:
@Override public AbstractRelation getScramblingSource(String originalSchema,String originalTable,Map<String,Object> metaData){
  String tableSourceAlias="String_Node_Str";
  return new BaseTable(originalSchema,originalTable,tableSourceAlias);
}

Fixed version (ground truth):
@Override public AbstractRelation getScramblingSource(String originalSchema,String originalTable,Map<String,Object> metaData){
  String tableSourceAlias=MAIN_TABLE_SOURCE_ALIAS;
  return new BaseTable(originalSchema,originalTable,tableSourceAlias);
}
Program: 95981
Project: 95981
Buggy source:
@Test public void testFastConvergeScramblingPlanNonEmptyTable() throws VerdictDBException, SQLException {
  mysqlConn.createStatement().execute("String_Node_Str");
  for (int i=0; i < 10; i++) {
    mysqlConn.createStatement().execute(String.format("String_Node_Str",i % 2,i));
  }
  String newSchemaName="String_Node_Str";
  String newTableName="String_Node_Str";
  String oldSchemaName="String_Node_Str";
  String oldTableName="String_Node_Str";
  String scratchpadSchemaName="String_Node_Str";
  String primaryColumn="String_Node_Str";
  int blockSize=2;
  ScramblingMethod method=new FastConvergeScramblingMethod(blockSize,scratchpadSchemaName,primaryColumn);
  Map<String,String> options=new HashMap<>();
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  mysqlConn.createStatement().execute(String.format("String_Node_Str",newSchemaName,newTableName));
  ScramblingPlan plan=ScramblingPlan.create(newSchemaName,newTableName,oldSchemaName,oldTableName,method,options);
  DbmsConnection conn=new JdbcConnection(mysqlConn);
  ExecutablePlanRunner.runTillEnd(conn,plan);
}

Fixed version (ground truth):
@Test public void testFastConvergeScramblingPlanNonEmptyTable() throws VerdictDBException, SQLException {
  mysqlConn.createStatement().execute("String_Node_Str");
  for (int i=0; i < 10; i++) {
    mysqlConn.createStatement().execute(String.format("String_Node_Str",i % 2,i));
  }
  String newSchemaName="String_Node_Str";
  String newTableName="String_Node_Str";
  String oldSchemaName="String_Node_Str";
  String oldTableName="String_Node_Str";
  String scratchpadSchemaName="String_Node_Str";
  String primaryColumn="String_Node_Str";
  int blockSize=2;
  ScramblingMethod method=new FastConvergeScramblingMethod(blockSize,scratchpadSchemaName,primaryColumn);
  Map<String,String> options=new HashMap<>();
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  mysqlConn.createStatement().execute(String.format("String_Node_Str",newSchemaName,newTableName));
  ScramblingPlan plan=ScramblingPlan.create(newSchemaName,newTableName,oldSchemaName,oldTableName,method,options);
  DbmsConnection conn=new JdbcConnection(mysqlConn);
  ExecutablePlanRunner.runTillEnd(conn,plan);
  DbmsQueryResult result=conn.execute(String.format("String_Node_Str",newSchemaName,newTableName));
  result.printContent();
}
Program: 95982
Project: 95982
Buggy source:
@Test public void testFastConvergeScramblingPlanNonEmptyTableNoPrimaryGroup() throws VerdictDBException, SQLException {
  mysqlConn.createStatement().execute("String_Node_Str");
  for (int i=0; i < 10; i++) {
    mysqlConn.createStatement().execute(String.format("String_Node_Str",i % 2,i));
  }
  String newSchemaName="String_Node_Str";
  String newTableName="String_Node_Str";
  String oldSchemaName="String_Node_Str";
  String oldTableName="String_Node_Str";
  String scratchpadSchemaName="String_Node_Str";
  int blockSize=2;
  ScramblingMethod method=new FastConvergeScramblingMethod(blockSize,scratchpadSchemaName);
  Map<String,String> options=new HashMap<>();
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  mysqlConn.createStatement().execute(String.format("String_Node_Str",newSchemaName,newTableName));
  ScramblingPlan plan=ScramblingPlan.create(newSchemaName,newTableName,oldSchemaName,oldTableName,method,options);
  DbmsConnection conn=new JdbcConnection(mysqlConn);
  ExecutablePlanRunner.runTillEnd(conn,plan);
}

Fixed version (ground truth):
@Test public void testFastConvergeScramblingPlanNonEmptyTableNoPrimaryGroup() throws VerdictDBException, SQLException {
  mysqlConn.createStatement().execute("String_Node_Str");
  for (int i=0; i < 10; i++) {
    mysqlConn.createStatement().execute(String.format("String_Node_Str",i % 2,i));
  }
  String newSchemaName="String_Node_Str";
  String newTableName="String_Node_Str";
  String oldSchemaName="String_Node_Str";
  String oldTableName="String_Node_Str";
  String scratchpadSchemaName="String_Node_Str";
  int blockSize=2;
  ScramblingMethod method=new FastConvergeScramblingMethod(blockSize,scratchpadSchemaName);
  Map<String,String> options=new HashMap<>();
  options.put("String_Node_Str","String_Node_Str");
  options.put("String_Node_Str","String_Node_Str");
  mysqlConn.createStatement().execute(String.format("String_Node_Str",newSchemaName,newTableName));
  ScramblingPlan plan=ScramblingPlan.create(newSchemaName,newTableName,oldSchemaName,oldTableName,method,options);
  DbmsConnection conn=new JdbcConnection(mysqlConn);
  ExecutablePlanRunner.runTillEnd(conn,plan);
  DbmsQueryResult result=conn.execute(String.format("String_Node_Str",newSchemaName,newTableName));
  result.printContent();
}
Program: 95983
Project: 95983
Buggy source:
@Test public void Query4Test() throws VerdictDBException, SQLException {
  RelationStandardizer.resetItemID();
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  NonValidatingSQLParser sqlToRelation=new NonValidatingSQLParser();
  AbstractRelation relation=sqlToRelation.toRelation(sql);
  RelationStandardizer gen=new RelationStandardizer(staticMetaData);
  relation=gen.standardize((SelectQuery)relation);
  QueryExecutionPlan queryExecutionPlan=new QueryExecutionPlan("String_Node_Str",meta,(SelectQuery)relation);
  queryExecutionPlan.cleanUp();
  assertEquals(0,queryExecutionPlan.root.dependents.get(0).dependents.size());
  AbstractRelation orders=new BaseTable("String_Node_Str","String_Node_Str","String_Node_Str");
  SelectQuery expected=SelectQuery.create(Arrays.<SelectItem>asList(new AliasedColumn(new BaseColumn("String_Node_Str","String_Node_Str"),"String_Node_Str"),new AliasedColumn(new ColumnOp("String_Node_Str",new AsteriskColumn()),"String_Node_Str")),orders);
  assertEquals(expected.getSelectList(),((CreateTableAsSelectNode)queryExecutionPlan.root.getDependents().get(0)).selectQuery.getSelectList());
  stmt.execute("String_Node_Str");
  ExecutablePlanRunner.runTillEnd(new JdbcConnection(conn,new H2Syntax()),queryExecutionPlan);
  stmt.execute("String_Node_Str");
}

Fixed version (ground truth):
public void Query4Test() throws VerdictDBException, SQLException {
  RelationStandardizer.resetItemID();
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  NonValidatingSQLParser sqlToRelation=new NonValidatingSQLParser();
  AbstractRelation relation=sqlToRelation.toRelation(sql);
  RelationStandardizer gen=new RelationStandardizer(staticMetaData);
  relation=gen.standardize((SelectQuery)relation);
  QueryExecutionPlan queryExecutionPlan=new QueryExecutionPlan("String_Node_Str",meta,(SelectQuery)relation);
  queryExecutionPlan.cleanUp();
  assertEquals(0,queryExecutionPlan.root.dependents.get(0).dependents.size());
  AbstractRelation orders=new BaseTable("String_Node_Str","String_Node_Str","String_Node_Str");
  SelectQuery expected=SelectQuery.create(Arrays.<SelectItem>asList(new AliasedColumn(new BaseColumn("String_Node_Str","String_Node_Str"),"String_Node_Str"),new AliasedColumn(new ColumnOp("String_Node_Str",new AsteriskColumn()),"String_Node_Str")),orders);
  assertEquals(expected.getSelectList(),((CreateTableAsSelectNode)queryExecutionPlan.root.getDependents().get(0)).selectQuery.getSelectList());
  stmt.execute("String_Node_Str");
  ExecutablePlanRunner.runTillEnd(new JdbcConnection(conn,new H2Syntax()),queryExecutionPlan);
  stmt.execute("String_Node_Str");
}
Program: 96000
Project: 96000
Buggy source:
@Test public void SubqueryInFilterTestExists() 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=new QueryExecutionPlan("String_Node_Str",meta,(SelectQuery)relation);
  queryExecutionPlan.cleanUp();
  String alias=((CreateTableAsSelectNode)(queryExecutionPlan.root.dependents.get(0))).getPlaceholderTables().get(0).getAliasName().get();
  SelectQuery rewritten=SelectQuery.create(Arrays.<SelectItem>asList(new AsteriskColumn()),new BaseTable(placeholderSchemaName,placeholderTableName,alias));
  assertEquals(rewritten,((SubqueryColumn)((ColumnOp)((CreateTableAsSelectNode)(queryExecutionPlan.root.dependents.get(0))).getSelectQuery().getFilter().get()).getOperand(0)).getSubquery());
  SelectQuery expected=SelectQuery.create(Arrays.<SelectItem>asList(new AsteriskColumn()),new BaseTable("String_Node_Str","String_Node_Str","String_Node_Str"));
  assertEquals(expected,((CreateTableAsSelectNode)queryExecutionPlan.root.dependents.get(0).dependents.get(0)).selectQuery);
  stmt.execute("String_Node_Str");
  ExecutablePlanRunner.runTillEnd(new JdbcConnection(conn,new H2Syntax()),queryExecutionPlan);
  stmt.execute("String_Node_Str");
}

Fixed version (ground truth):
public void SubqueryInFilterTestExists() 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=new QueryExecutionPlan("String_Node_Str",meta,(SelectQuery)relation);
  queryExecutionPlan.cleanUp();
  String alias=((CreateTableAsSelectNode)(queryExecutionPlan.root.dependents.get(0))).getPlaceholderTables().get(0).getAliasName().get();
  SelectQuery rewritten=SelectQuery.create(Arrays.<SelectItem>asList(new AsteriskColumn()),new BaseTable(placeholderSchemaName,placeholderTableName,alias));
  assertEquals(rewritten,((SubqueryColumn)((ColumnOp)((CreateTableAsSelectNode)(queryExecutionPlan.root.dependents.get(0))).getSelectQuery().getFilter().get()).getOperand(0)).getSubquery());
  SelectQuery expected=SelectQuery.create(Arrays.<SelectItem>asList(new AsteriskColumn()),new BaseTable("String_Node_Str","String_Node_Str","String_Node_Str"));
  assertEquals(expected,((CreateTableAsSelectNode)queryExecutionPlan.root.dependents.get(0).dependents.get(0)).selectQuery);
  stmt.execute("String_Node_Str");
  ExecutablePlanRunner.runTillEnd(new JdbcConnection(conn,new H2Syntax()),queryExecutionPlan);
  stmt.execute("String_Node_Str");
}
Program: 96005
Project: 96005
Buggy source:
@Override public void run(){
  if (node.getSourceQueues().size() == 0) {
    try {
      executeAndBroadcast(Arrays.<ExecutionInfoToken>asList());
      broadcast(ExecutionInfoToken.successToken());
      return;
    }
 catch (    VerdictDBException e) {
      e.printStackTrace();
      broadcast(ExecutionInfoToken.failureToken(e));
    }
  }
  while (true) {
    List<ExecutionInfoToken> tokens=retrieve();
    if (tokens == null) {
      continue;
    }
    ExecutionInfoToken failureToken=getFailureTokenIfExists(tokens);
    if (failureToken != null) {
      broadcast(failureToken);
      break;
    }
    if (areAllSuccess(tokens)) {
      broadcast(ExecutionInfoToken.successToken());
      break;
    }
    try {
      executeAndBroadcast(tokens);
    }
 catch (    VerdictDBException e) {
      e.printStackTrace();
      broadcast(ExecutionInfoToken.failureToken(e));
      break;
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (node.getSourceQueues().size() == 0) {
    try {
      executeAndBroadcast(Arrays.<ExecutionInfoToken>asList());
      broadcast(ExecutionInfoToken.successToken());
      return;
    }
 catch (    VerdictDBException e) {
      e.printStackTrace();
      broadcast(ExecutionInfoToken.failureToken(e));
    }
  }
  while (true) {
    List<ExecutionInfoToken> tokens=retrieve();
    if (tokens == null) {
      continue;
    }
    ExecutionInfoToken failureToken=getFailureTokenIfExists(tokens);
    if (failureToken != null) {
      broadcast(failureToken);
      break;
    }
    if (areAllSuccess(tokens)) {
      System.out.println(new ToStringBuilder(node,ToStringStyle.DEFAULT_STYLE) + "String_Node_Str" + successSourceCount);
      broadcast(ExecutionInfoToken.successToken());
      break;
    }
    try {
      executeAndBroadcast(tokens);
    }
 catch (    VerdictDBException e) {
      e.printStackTrace();
      broadcast(ExecutionInfoToken.failureToken(e));
      break;
    }
  }
}
Program: 96006
Project: 96006
Buggy source:
public static void runTillEnd(DbmsConnection conn,ExecutablePlan plan) throws VerdictDBException {
  ExecutionTokenReader reader=(new ExecutablePlanRunner(conn,plan)).getTokenReader();
  while (true) {
    ExecutionInfoToken token=reader.next();
    if (token == null) {
      break;
    }
  }
}

Fixed version (ground truth):
public static void runTillEnd(DbmsConnection conn,ExecutablePlan plan) throws VerdictDBException {
  ExecutionTokenReader reader=(new ExecutablePlanRunner(conn,plan)).getTokenReader();
  while (true) {
    ExecutionInfoToken token=reader.next();
    System.out.println("String_Node_Str" + token);
    if (token == null) {
      break;
    }
  }
}
Program: 96007
Project: 96007
Buggy source:
public void clearSubscribers(){
  for (  ExecutableNodeBase s : subscribers) {
    s.cancelSubscriptionTo(this);
  }
}

Fixed version (ground truth):
public void clearSubscribers(){
  for (  ExecutableNodeBase s : subscribers) {
    s.cancelSubscriptionTo(this);
  }
  subscribers=new ArrayList<>();
}
Program: 96008
Project: 96008
Buggy source:
@Override public String toString(){
  return new ToStringBuilder(this,ToStringStyle.DEFAULT_STYLE).append("String_Node_Str",sources).append("String_Node_Str",channels).toString();
}

Fixed version (ground truth):
@Override public String toString(){
  return new ToStringBuilder(this,ToStringStyle.DEFAULT_STYLE).append("String_Node_Str",subscribers.size()).append("String_Node_Str",sources).toString();
}