Program: 95991
Project: 95991
Buggy source:
@Test public void Query1Test() 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"+ "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(1,queryExecutionPlan.root.dependents.size());
  assertEquals(0,queryExecutionPlan.root.getDependents().get(0).dependents.size());
  BaseTable base=new BaseTable("String_Node_Str","String_Node_Str","String_Node_Str");
  List<UnnamedColumn> operand1=Arrays.<UnnamedColumn>asList(ConstantColumn.valueOf(1),new BaseColumn("String_Node_Str","String_Node_Str"));
  List<UnnamedColumn> operand2=Arrays.<UnnamedColumn>asList(new BaseColumn("String_Node_Str","String_Node_Str"),new ColumnOp("String_Node_Str",operand1));
  List<UnnamedColumn> operand3=Arrays.<UnnamedColumn>asList(ConstantColumn.valueOf(1),new BaseColumn("String_Node_Str","String_Node_Str"));
  List<UnnamedColumn> operand4=Arrays.<UnnamedColumn>asList(new ColumnOp("String_Node_Str",operand2),new ColumnOp("String_Node_Str",operand3));
  List<UnnamedColumn> operand5=Arrays.<UnnamedColumn>asList(new BaseColumn("String_Node_Str","String_Node_Str"),new ColumnOp("String_Node_Str",ConstantColumn.valueOf("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 BaseColumn("String_Node_Str","String_Node_Str"),"String_Node_Str"),new AliasedColumn(new ColumnOp("String_Node_Str",new BaseColumn("String_Node_Str","String_Node_Str")),"String_Node_Str"),new AliasedColumn(new ColumnOp("String_Node_Str",new BaseColumn("String_Node_Str","String_Node_Str")),"String_Node_Str"),new AliasedColumn(new ColumnOp("String_Node_Str",new ColumnOp("String_Node_Str",operand2)),"String_Node_Str"),new AliasedColumn(new ColumnOp("String_Node_Str",new ColumnOp("String_Node_Str",operand4)),"String_Node_Str"),new AliasedColumn(new ColumnOp("String_Node_Str",new BaseColumn("String_Node_Str","String_Node_Str")),"String_Node_Str"),new AliasedColumn(new ColumnOp("String_Node_Str",new BaseColumn("String_Node_Str","String_Node_Str")),"String_Node_Str"),new AliasedColumn(new ColumnOp("String_Node_Str",new BaseColumn("String_Node_Str","String_Node_Str")),"String_Node_Str"),new AliasedColumn(new ColumnOp("String_Node_Str",new AsteriskColumn()),"String_Node_Str")),base,new ColumnOp("String_Node_Str",operand5));
  expected.addGroupby(Arrays.<GroupingAttribute>asList(new AliasReference("String_Node_Str"),new AliasReference("String_Node_Str")));
  expected.addOrderby(Arrays.<OrderbyAttribute>asList(new OrderbyAttribute("String_Node_Str"),new OrderbyAttribute("String_Node_Str")));
  expected.addLimit(ConstantColumn.valueOf(1));
  assertEquals(expected,((CreateTableAsSelectNode)queryExecutionPlan.root.getDependents().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 Query1Test() 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"+ "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(1,queryExecutionPlan.root.dependents.size());
  assertEquals(0,queryExecutionPlan.root.getDependents().get(0).dependents.size());
  BaseTable base=new BaseTable("String_Node_Str","String_Node_Str","String_Node_Str");
  List<UnnamedColumn> operand1=Arrays.<UnnamedColumn>asList(ConstantColumn.valueOf(1),new BaseColumn("String_Node_Str","String_Node_Str"));
  List<UnnamedColumn> operand2=Arrays.<UnnamedColumn>asList(new BaseColumn("String_Node_Str","String_Node_Str"),new ColumnOp("String_Node_Str",operand1));
  List<UnnamedColumn> operand3=Arrays.<UnnamedColumn>asList(ConstantColumn.valueOf(1),new BaseColumn("String_Node_Str","String_Node_Str"));
  List<UnnamedColumn> operand4=Arrays.<UnnamedColumn>asList(new ColumnOp("String_Node_Str",operand2),new ColumnOp("String_Node_Str",operand3));
  List<UnnamedColumn> operand5=Arrays.<UnnamedColumn>asList(new BaseColumn("String_Node_Str","String_Node_Str"),new ColumnOp("String_Node_Str",ConstantColumn.valueOf("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 BaseColumn("String_Node_Str","String_Node_Str"),"String_Node_Str"),new AliasedColumn(new ColumnOp("String_Node_Str",new BaseColumn("String_Node_Str","String_Node_Str")),"String_Node_Str"),new AliasedColumn(new ColumnOp("String_Node_Str",new BaseColumn("String_Node_Str","String_Node_Str")),"String_Node_Str"),new AliasedColumn(new ColumnOp("String_Node_Str",new ColumnOp("String_Node_Str",operand2)),"String_Node_Str"),new AliasedColumn(new ColumnOp("String_Node_Str",new ColumnOp("String_Node_Str",operand4)),"String_Node_Str"),new AliasedColumn(new ColumnOp("String_Node_Str",new BaseColumn("String_Node_Str","String_Node_Str")),"String_Node_Str"),new AliasedColumn(new ColumnOp("String_Node_Str",new BaseColumn("String_Node_Str","String_Node_Str")),"String_Node_Str"),new AliasedColumn(new ColumnOp("String_Node_Str",new BaseColumn("String_Node_Str","String_Node_Str")),"String_Node_Str"),new AliasedColumn(new ColumnOp("String_Node_Str",new AsteriskColumn()),"String_Node_Str")),base,new ColumnOp("String_Node_Str",operand5));
  expected.addGroupby(Arrays.<GroupingAttribute>asList(new AliasReference("String_Node_Str"),new AliasReference("String_Node_Str")));
  expected.addOrderby(Arrays.<OrderbyAttribute>asList(new OrderbyAttribute("String_Node_Str"),new OrderbyAttribute("String_Node_Str")));
  expected.addLimit(ConstantColumn.valueOf(1));
  assertEquals(expected,((CreateTableAsSelectNode)queryExecutionPlan.root.getDependents().get(0)).selectQuery);
  stmt.execute("String_Node_Str");
  ExecutablePlanRunner.runTillEnd(new JdbcConnection(conn,new H2Syntax()),queryExecutionPlan);
  stmt.execute("String_Node_Str");
}