Program: 69626
Project: 69626
Buggy source:
/** 
 * @throws BirtException
 */
private void genComputedColumn() throws BirtException {
  String[] ccName=new String[]{"String_Node_Str","String_Node_Str"};
  String[] ccExpr=new String[]{"String_Node_Str","String_Node_Str"};
  int[] dataTypes=new int[]{DataType.STRING_TYPE,DataType.INTEGER_TYPE};
  for (int i=0; i < 2; i++) {
    ComputedColumn computedColumn=new ComputedColumn(ccName[i],ccExpr[i],dataTypes[i]);
    ((BaseDataSetDesign)this.dataSet).addComputedColumn(computedColumn);
  }
  QueryDefinition qd=newReportQuery();
  IBaseExpression[] tempArray=getRowExpr();
  int length=tempArray.length;
  IBaseExpression[] rowBeArray=new IBaseExpression[length + 2];
  System.arraycopy(tempArray,0,rowBeArray,0,length);
  for (int i=0; i < ccName.length; i++)   rowBeArray[length + i]=new ScriptExpression("String_Node_Str" + ccName[i]);
  rowExprName=new String[rowBeArray.length];
  for (int i=0; i < rowExprName.length; i++) {
    rowExprName[i]="String_Node_Str" + i;
  }
  IBaseExpression[] totalBeArray=getAggrExpr();
  totalExprName=getAggrExprName();
  prepareExprNameAndQuery(rowExprName,rowBeArray,totalExprName,totalBeArray,qd);
  IQueryResults qr=myGenDataEngine.prepare(qd).execute(scope);
  saveForPresentation(qr,rowBeArray,totalBeArray);
  IResultIterator ri=qr.getResultIterator();
  while (ri.next()) {
    for (int i=0; i < rowBeArray.length; i++)     expectedValue.add(ri.getValue(rowExprName[i]));
    for (int i=0; i < totalBeArray.length; i++)     expectedValue.add(ri.getValue(totalExprName[i]));
  }
  ri.close();
  qr.close();
  myGenDataEngine.shutdown();
}

Fixed version (ground truth):
/** 
 * @throws BirtException
 */
private void genComputedColumn() throws BirtException {
  String[] ccName=new String[]{"String_Node_Str","String_Node_Str"};
  String[] ccExpr=new String[]{"String_Node_Str","String_Node_Str"};
  int[] dataTypes=new int[]{DataType.STRING_TYPE,DataType.INTEGER_TYPE};
  for (int i=0; i < 2; i++) {
    ComputedColumn computedColumn=new ComputedColumn(ccName[i],ccExpr[i],dataTypes[i]);
    ((BaseDataSetDesign)this.dataSet).addComputedColumn(computedColumn);
  }
  QueryDefinition qd=newReportQuery();
  IBaseExpression[] tempArray=getRowExpr();
  int length=tempArray.length;
  IBaseExpression[] rowBeArray=new IBaseExpression[length + 2];
  System.arraycopy(tempArray,0,rowBeArray,0,length);
  for (int i=0; i < ccName.length; i++)   rowBeArray[length + i]=new ScriptExpression("String_Node_Str" + ccName[i]);
  rowExprName=new String[rowBeArray.length];
  for (int i=0; i < rowExprName.length; i++) {
    rowExprName[i]="String_Node_Str" + i;
  }
  IBaseExpression[] totalBeArray=getAggrExpr();
  totalExprName=getAggrExprName();
  IBaseExpression[] totalBeArray2=getAggrExpr();
  IBinding total1=new Binding(this.totalExprName[0],totalBeArray2[0]);
  total1.setAggrFunction("String_Node_Str");
  IBinding total2=new Binding(this.totalExprName[1],totalBeArray2[1]);
  total2.setAggrFunction("String_Node_Str");
  qd.addBinding(total1);
  qd.addBinding(total2);
  for (int i=0; i < rowExprName.length; i++) {
    qd.addBinding(new Binding(this.rowExprName[i],rowBeArray[i]));
  }
  IQueryResults qr=myGenDataEngine.prepare(qd).execute(scope);
  saveForPresentation(qr);
  IResultIterator ri=qr.getResultIterator();
  while (ri.next()) {
    for (int i=0; i < rowBeArray.length; i++)     expectedValue.add(ri.getValue(rowExprName[i]));
    for (int i=0; i < totalBeArray.length; i++)     expectedValue.add(ri.getValue(totalExprName[i]));
  }
  ri.close();
  qr.close();
  myGenDataEngine.shutdown();
}