Program: 69650
Project: 69650
Buggy source:
/** 
 * @param ids
 * @throws BirtException
 * @throws DataException
 */
private void preBasicNestedQuery(List ids) throws BirtException, DataException {
  DataEngineContext deContext2=newContext(DataEngineContext.MODE_UPDATE,fileName,fileName);
  myPreDataEngine=DataEngine.newDataEngine(deContext2);
  IBaseExpression[] rowBeArray=getRowExpr();
  IBaseExpression[] totalBeArray=getAggrExpr();
  QueryDefinition qd=new QueryDefinition();
  populateColumnBinding(qd,rowBeArray,totalBeArray);
  qd.setQueryResultsID(this.GEN_queryResultID);
  QueryDefinition qd2=newReportQuery();
  populateColumnBinding(qd2,rowBeArray,totalBeArray);
  ConditionalExpression filterExpr=new ConditionalExpression("String_Node_Str",IConditionalExpression.OP_EQ,"String_Node_Str");
  qd2.addFilter(new FilterDefinition(filterExpr));
  GroupDefinition gd=new GroupDefinition();
  gd.setKeyColumn("String_Node_Str");
  qd2.addGroup(gd);
  IQueryResults qr=myPreDataEngine.prepare(qd).execute(null);
  this.UPDATE_queryResultID=qr.getID();
  assertTrue(qr.getResultMetaData() != null);
  IResultIterator ri=qr.getResultIterator();
  ri.next();
  do {
    String abc="String_Node_Str";
    for (int i=0; i < rowExprName.length; i++)     abc+=ri.getValue(rowExprName[i]) + "String_Node_Str";
    for (int i=0; i < totalExprName.length; i++)     abc+=ri.getValue(totalExprName[i]) + "String_Node_Str";
    this.testPrintln(abc + ri.getRowId());
    qd2.setQueryResultsID(ids.get(0).toString());
    ids.remove(0);
    IResultIterator subRi=myPreDataEngine.prepare(qd2).execute(qr,null).getResultIterator();
    while (subRi.next()) {
      abc="String_Node_Str";
      for (int i=0; i < rowExprName.length; i++)       abc+=subRi.getValue(rowExprName[i]) + "String_Node_Str";
      this.testPrintln(abc);
    }
  }
 while (ri.next());
  this.testPrintln("String_Node_Str");
  ri.close();
  myPreDataEngine.shutdown();
  this.closeArchiveReader();
  this.closeArchiveWriter();
}

Fixed version (ground truth):
/** 
 * @param ids
 * @throws BirtException
 * @throws DataException
 */
private void preBasicNestedQuery(List ids) throws BirtException, DataException {
  DataEngineContext deContext2=newContext(DataEngineContext.MODE_UPDATE,fileName,fileName);
  myPreDataEngine=DataEngine.newDataEngine(deContext2);
  IBaseExpression[] rowBeArray=getRowExpr();
  IBinding[] totalBeArray=getAggrExpr();
  QueryDefinition qd=new QueryDefinition();
  populateColumnBinding(qd,rowBeArray,totalBeArray);
  qd.setQueryResultsID(this.GEN_queryResultID);
  QueryDefinition qd2=newReportQuery();
  populateColumnBinding(qd2,rowBeArray,totalBeArray);
  ConditionalExpression filterExpr=new ConditionalExpression("String_Node_Str",IConditionalExpression.OP_EQ,"String_Node_Str");
  qd2.addFilter(new FilterDefinition(filterExpr));
  GroupDefinition gd=new GroupDefinition();
  gd.setKeyColumn("String_Node_Str");
  qd2.addGroup(gd);
  IQueryResults qr=myPreDataEngine.prepare(qd).execute(null);
  this.UPDATE_queryResultID=qr.getID();
  assertTrue(qr.getResultMetaData() != null);
  IResultIterator ri=qr.getResultIterator();
  ri.next();
  do {
    String abc="String_Node_Str";
    for (int i=0; i < rowExprName.length; i++)     abc+=ri.getValue(rowExprName[i]) + "String_Node_Str";
    for (int i=0; i < totalExprName.length; i++)     abc+=ri.getValue(totalExprName[i]) + "String_Node_Str";
    this.testPrintln(abc + ri.getRowId());
    qd2.setQueryResultsID(ids.get(0).toString());
    ids.remove(0);
    IResultIterator subRi=myPreDataEngine.prepare(qd2).execute(qr,null).getResultIterator();
    while (subRi.next()) {
      abc="String_Node_Str";
      for (int i=0; i < rowExprName.length; i++)       abc+=subRi.getValue(rowExprName[i]) + "String_Node_Str";
      this.testPrintln(abc);
    }
  }
 while (ri.next());
  this.testPrintln("String_Node_Str");
  ri.close();
  myPreDataEngine.shutdown();
  this.closeArchiveReader();
  this.closeArchiveWriter();
}