Program: 69653
Project: 69653
Buggy source:
public void testEmptyResult() throws BirtException {
  try {
    QueryDefinition qd1=newReportQuery();
    IBaseExpression[] rowBeArray=getRowExpr();
    IBaseExpression[] totalBeArray=getAggrExpr();
    populateColumnBinding(qd1,rowBeArray,totalBeArray);
    qd1.addFilter(new FilterDefinition(new ScriptExpression("String_Node_Str")));
    IQueryResults qr1=myGenDataEngine.prepare(qd1).execute(scope);
    GEN_queryResultID=qr1.getID();
    IResultIterator ri1=qr1.getResultIterator();
    while (ri1.next()) {
      String abc="String_Node_Str";
      for (int i=0; i < rowExprName.length; i++)       abc+=ri1.getValue(this.rowExprName[i]) + "String_Node_Str";
      for (int i=0; i < totalExprName.length; i++)       abc+=ri1.getValue(this.totalExprName[i]) + "String_Node_Str";
    }
    ri1.close();
    myGenDataEngine.shutdown();
    this.closeArchiveWriter();
    DataEngineContext deContext2=newContext(DataEngineContext.MODE_UPDATE,fileName,fileName);
    myPreDataEngine=DataEngine.newDataEngine(deContext2);
    QueryDefinition qd2=newReportQuery();
    populateColumnBinding(qd2,rowBeArray,totalBeArray);
    qd2.addFilter(new FilterDefinition(new ScriptExpression("String_Node_Str")));
    SortDefinition sortDefn=new SortDefinition();
    sortDefn.setColumn("String_Node_Str");
    qd2.addSort(sortDefn);
    qd2.setQueryResultsID(GEN_queryResultID);
    IQueryResults qr2=myPreDataEngine.prepare(qd2).execute(scope);
    IResultIterator ri2=qr2.getResultIterator();
    while (ri2.next()) {
      String abc="String_Node_Str";
      for (int i=0; i < rowExprName.length; i++)       abc+=ri2.getValue(this.rowExprName[i]) + "String_Node_Str";
      for (int i=0; i < totalExprName.length; i++)       abc+=ri2.getValue(this.totalExprName[i]) + "String_Node_Str";
    }
    ri2.close();
    myPreDataEngine.shutdown();
    this.closeArchiveReader();
    this.closeArchiveWriter();
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
}

Fixed version (ground truth):
public void testEmptyResult() throws BirtException {
  try {
    QueryDefinition qd1=newReportQuery();
    IBaseExpression[] rowBeArray=getRowExpr();
    IBinding[] totalBeArray=getAggrExpr();
    populateColumnBinding(qd1,rowBeArray,totalBeArray);
    qd1.addFilter(new FilterDefinition(new ScriptExpression("String_Node_Str")));
    IQueryResults qr1=myGenDataEngine.prepare(qd1).execute(scope);
    GEN_queryResultID=qr1.getID();
    IResultIterator ri1=qr1.getResultIterator();
    while (ri1.next()) {
      String abc="String_Node_Str";
      for (int i=0; i < rowExprName.length; i++)       abc+=ri1.getValue(this.rowExprName[i]) + "String_Node_Str";
      for (int i=0; i < totalExprName.length; i++)       abc+=ri1.getValue(this.totalExprName[i]) + "String_Node_Str";
    }
    ri1.close();
    myGenDataEngine.shutdown();
    this.closeArchiveWriter();
    DataEngineContext deContext2=newContext(DataEngineContext.MODE_UPDATE,fileName,fileName);
    myPreDataEngine=DataEngine.newDataEngine(deContext2);
    QueryDefinition qd2=newReportQuery();
    populateColumnBinding(qd2,rowBeArray,totalBeArray);
    qd2.addFilter(new FilterDefinition(new ScriptExpression("String_Node_Str")));
    SortDefinition sortDefn=new SortDefinition();
    sortDefn.setColumn("String_Node_Str");
    qd2.addSort(sortDefn);
    qd2.setQueryResultsID(GEN_queryResultID);
    IQueryResults qr2=myPreDataEngine.prepare(qd2).execute(scope);
    IResultIterator ri2=qr2.getResultIterator();
    while (ri2.next()) {
      String abc="String_Node_Str";
      for (int i=0; i < rowExprName.length; i++)       abc+=ri2.getValue(this.rowExprName[i]) + "String_Node_Str";
      for (int i=0; i < totalExprName.length; i++)       abc+=ri2.getValue(this.totalExprName[i]) + "String_Node_Str";
    }
    ri2.close();
    myPreDataEngine.shutdown();
    this.closeArchiveReader();
    this.closeArchiveWriter();
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
}