Program: 68138
Project: 68138
Buggy source:
/** 
 * merge the drill result set with base result into bufferdStructureArray.
 */
public DrilledAggregateResultSet(IAggregationResultSet baseResultSet,List<IAggregationResultSet> drillsRs,List<IEdgeDrillFilter> drillsDefn) throws IOException {
  Object[] params={baseResultSet,drillsRs,drillsDefn};
  logger.entering(AggregationResultSet.class.getName(),"String_Node_Str",params);
  this.levelCount=baseResultSet.getLevelCount();
  this.metaResultSet=baseResultSet;
  this.statusForRs=new boolean[drillsRs.size()];
  for (int i=0; i < drillsRs.size(); i++) {
    if (levelCount < ((IAggregationResultSet)drillsRs.get(i)).getLevelCount()) {
      metaResultSet=((IAggregationResultSet)drillsRs.get(i));
      levelCount=metaResultSet.getLevelCount();
    }
    ((IAggregationResultSet)drillsRs.get(i)).seek(0);
    statusForRs[i]=true;
  }
  this.bufferedStructureArray=passBaseCubeResultSet(baseResultSet,drillsRs,drillsDefn);
  updateStatus(drillsRs);
  while (!isComplete()) {
    this.bufferedStructureArray=passInterimCubeResultSet(bufferedStructureArray,drillsRs,drillsDefn);
    updateStatus(drillsRs);
  }
  this.resultObject=(IAggregationResultRow)bufferedStructureArray.get(0);
  if (resultObject.getLevelMembers() != null) {
    keyDataTypes=new int[resultObject.getLevelMembers().length][];
    attributeDataTypes=new int[resultObject.getLevelMembers().length][];
    for (int i=0; i < resultObject.getLevelMembers().length; i++) {
      keyDataTypes[i]=new int[resultObject.getLevelMembers()[i].getKeyValues().length];
      for (int j=0; j < resultObject.getLevelMembers()[i].getKeyValues().length; j++) {
        keyDataTypes[i][j]=DataType.getDataType(resultObject.getLevelMembers()[i].getKeyValues()[j].getClass());
      }
      if (resultObject.getLevelMembers()[i].getAttributes() != null) {
        attributeDataTypes[i]=new int[resultObject.getLevelMembers()[i].getAttributes().length];
        for (int j=0; j < attributeDataTypes[i].length; j++) {
          if (resultObject.getLevelMembers()[i].getAttributes()[j] != null)           attributeDataTypes[i][j]=DataType.getDataType(resultObject.getLevelMembers()[i].getAttributes()[j].getClass());
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * merge the drill result set with base result into bufferdStructureArray.
 */
public DrilledAggregateResultSet(IAggregationResultSet baseResultSet,List<IAggregationResultSet> drillsRs,List<IEdgeDrillFilter> drillsDefn) throws IOException {
  Object[] params={baseResultSet,drillsRs,drillsDefn};
  logger.entering(AggregationResultSet.class.getName(),"String_Node_Str",params);
  this.levelCount=baseResultSet.getLevelCount();
  this.metaResultSet=baseResultSet;
  this.statusForRs=new boolean[drillsRs.size()];
  for (int i=0; i < drillsRs.size(); i++) {
    if (levelCount < ((IAggregationResultSet)drillsRs.get(i)).getLevelCount()) {
      metaResultSet=((IAggregationResultSet)drillsRs.get(i));
      levelCount=metaResultSet.getLevelCount();
    }
    if (((IAggregationResultSet)drillsRs.get(i)).length() > 0)     ((IAggregationResultSet)drillsRs.get(i)).seek(0);
    statusForRs[i]=true;
  }
  this.bufferedStructureArray=passBaseCubeResultSet(baseResultSet,drillsRs,drillsDefn);
  updateStatus(drillsRs);
  while (!isComplete()) {
    this.bufferedStructureArray=passInterimCubeResultSet(bufferedStructureArray,drillsRs,drillsDefn);
    updateStatus(drillsRs);
  }
  this.resultObject=(IAggregationResultRow)bufferedStructureArray.get(0);
  if (resultObject.getLevelMembers() != null) {
    keyDataTypes=new int[resultObject.getLevelMembers().length][];
    attributeDataTypes=new int[resultObject.getLevelMembers().length][];
    for (int i=0; i < resultObject.getLevelMembers().length; i++) {
      keyDataTypes[i]=new int[resultObject.getLevelMembers()[i].getKeyValues().length];
      for (int j=0; j < resultObject.getLevelMembers()[i].getKeyValues().length; j++) {
        keyDataTypes[i][j]=DataType.getDataType(resultObject.getLevelMembers()[i].getKeyValues()[j].getClass());
      }
      if (resultObject.getLevelMembers()[i].getAttributes() != null) {
        attributeDataTypes[i]=new int[resultObject.getLevelMembers()[i].getAttributes().length];
        for (int j=0; j < attributeDataTypes[i].length; j++) {
          if (resultObject.getLevelMembers()[i].getAttributes()[j] != null)           attributeDataTypes[i][j]=DataType.getDataType(resultObject.getLevelMembers()[i].getAttributes()[j].getClass());
        }
      }
    }
  }
}