Program: 73648
Project: 73648
Buggy source:
/** 
 * @throws BirtException
 */
private void genBasicIV() throws BirtException {
  QueryDefinition qd=newGenIVReportQuery();
  if (!this.usesDetails) {
    qd.setUsesDetails(false);
  }
  IQueryResults qr=myGenDataEngine.prepare(qd).execute(scope);
  GEN_queryResultID=qr.getID();
  IResultIterator ri=qr.getResultIterator();
  while (ri.next()) {
    String abc="String_Node_Str";
    for (int i=0; i < rowExprName.length; i++)     abc+=ri.getValue(this.rowExprName[i]) + "String_Node_Str";
    if (!this.notIncludeAggr) {
      for (int i=0; i < totalExprName.length; i++)       abc+=ri.getValue(this.totalExprName[i]) + "String_Node_Str";
    }
    if (this.GEN_print == true)     this.testPrintln(abc);
    if (this.GEN_add_subquery == true) {
      IResultIterator subRi=ri.getSecondaryIterator(subQueryName1,scope);
      while (subRi.next()) {
        abc="String_Node_Str";
        for (int i=0; i < subRowExprName1.length; i++) {
          abc+=subRi.getValue(subRowExprName1[i]) + "String_Node_Str";
        }
        if (this.USE_DATE_IN_SUBQUERY)         abc+=subRi.getValue("String_Node_Str");
      }
      subRi.close();
    }
  }
  if (this.add_subquery_on_query) {
    IResultIterator subRi=ri.getSecondaryIterator(subQueryName1,scope);
    String abc="String_Node_Str";
    for (int i=0; i < subRowExprName1.length; i++)     abc+=subRi.getValue(subRowExprName1[i]) + "String_Node_Str";
    if (this.GEN_print)     this.testPrintln(abc);
    while (subRi.next()) {
      abc="String_Node_Str";
      for (int i=0; i < subRowExprName1.length; i++)       abc+=subRi.getValue(subRowExprName1[i]) + "String_Node_Str";
      this.testPrintln(abc);
    }
  }
  if (this.GEN_print == true)   this.testPrintln("String_Node_Str");
  ri.close();
  qr.close();
  myGenDataEngine.shutdown();
}

Fixed version (ground truth):
/** 
 * @throws BirtException
 */
private void genBasicIV() throws BirtException {
  QueryDefinition qd=newGenIVReportQuery();
  if (!this.usesDetails) {
    qd.setUsesDetails(false);
  }
  IQueryResults qr=myGenDataEngine.prepare(qd).execute(scope);
  GEN_queryResultID=qr.getID();
  IResultIterator ri=qr.getResultIterator();
  while (ri.next()) {
    String abc="String_Node_Str";
    for (int i=0; i < rowExprName.length; i++)     abc+=ri.getValue(this.rowExprName[i]) + "String_Node_Str";
    if (!this.notIncludeAggr) {
      for (int i=0; i < totalExprName.length; i++)       abc+=ri.getValue(this.totalExprName[i]) + "String_Node_Str";
    }
    if (this.GEN_print == true)     this.testPrintln(abc);
    if (this.GEN_add_subquery == true) {
      IResultIterator subRi=ri.getSecondaryIterator(subQueryName1,scope);
      while (subRi.next()) {
        abc="String_Node_Str";
        for (int i=0; i < subRowExprName1.length; i++) {
          abc+=subRi.getValue(subRowExprName1[i]) + "String_Node_Str";
        }
        if (this.USE_DATE_IN_SUBQUERY)         abc+=subRi.getValue("String_Node_Str");
      }
      subRi.close();
    }
  }
  if (this.add_subquery_on_query) {
    IResultIterator subRi=ri.getSecondaryIterator(subQueryName1,scope);
    String abc="String_Node_Str";
    for (int i=0; i < subRowExprName1.length; i++)     abc+=subRi.getValue(subRowExprName1[i]) + "String_Node_Str";
    if (this.GEN_print)     this.testPrintln(abc);
    while (subRi.next()) {
      abc="String_Node_Str";
      for (int i=0; i < subRowExprName1.length; i++)       abc+=subRi.getValue(subRowExprName1[i]) + "String_Node_Str";
      this.testPrintln(abc);
    }
  }
  if (this.GEN_print == true)   this.testPrintln("String_Node_Str");
  ri.close();
  qr.close();
  myGenDataEngine.shutdown();
  myGenDataEngine.clearCache(dataSource,dataSet);
}