nus-yam/ex-repair huggingface dataset:
Program: 75578
Project: 75578
Buggy source:
private void processor(List ori,List newList) throws SemanticException {
  for (int i=0; i < ori.size(); i++) {
    LevelHandle tempHandle=(LevelHandle)ori.get(i);
    if (!newList.contains(tempHandle)) {
      viewHandle.removeLevel(tempHandle.getQualifiedName());
    }
  }
  Collections.sort(newList,new LevelComparator());
  for (int i=0; i < newList.size(); i++) {
    LevelHandle tempHandle=(LevelHandle)newList.get(i);
    if (viewHandle.getLevel(tempHandle.getQualifiedName()) == null) {
      insertLevelHandle(tempHandle,i);
    }
  }
}

Fixed version (ground truth):
private void processor(List ori,List newList,List nullLevelHandle) throws SemanticException {
  for (int i=nullLevelHandle.size() - 1; i >= 0; i--) {
    int index=((Integer)nullLevelHandle.get(i)).intValue();
    viewHandle.removeLevel(index);
  }
  for (int i=0; i < ori.size(); i++) {
    LevelHandle tempHandle=(LevelHandle)ori.get(i);
    if (!newList.contains(tempHandle)) {
      viewHandle.removeLevel(tempHandle.getQualifiedName());
    }
  }
  Collections.sort(newList,new LevelComparator());
  for (int i=0; i < newList.size(); i++) {
    LevelHandle tempHandle=(LevelHandle)newList.get(i);
    if (viewHandle.getLevel(tempHandle.getQualifiedName()) == null) {
      insertLevelHandle(tempHandle,i);
    }
  }
}
Program: 75579
Project: 75579
Buggy source:
/** 
 * @return
 * @throws DataException
 */
private void populateComputedColumns(List aggCCList) throws DataException {
  if (!psController.needDoOperation(PassStatusController.DATA_SET_COMPUTED_COLUMN_POPULATING))   return;
  if (!psController.needDoOperation(PassStatusController.DATA_SET_FILTERING)) {
    PassUtil.pass(this.populator,new OdiResultSetWrapper(populator.getResultIterator()),false,this.session);
  }
  computedColumnHelper.getComputedColumnList().clear();
  computedColumnHelper.getComputedColumnList().addAll(aggCCList);
  computedColumnHelper.setModel(TransformationConstants.DATA_SET_MODEL);
  iccState.setModel(TransformationConstants.DATA_SET_MODEL);
  if (iccState.getCount() > 0) {
    ComputedColumnCalculator.populateComputedColumns(this.populator,new OdiResultSetWrapper(this.populator.getResultIterator()),iccState,computedColumnHelper,this.session);
  }
  computedColumnHelper.setModel(TransformationConstants.NONE_MODEL);
}

Fixed version (ground truth):
/** 
 * @return
 * @throws DataException
 */
private void populateComputedColumns(List aggCCList) throws DataException {
  if (!psController.needDoOperation(PassStatusController.DATA_SET_COMPUTED_COLUMN_POPULATING))   return;
  if (!psController.needDoOperation(PassStatusController.DATA_SET_FILTERING)) {
    if (iccState != null) {
      for (int i=0; i < iccState.getCount(); i++) {
        if (iccState.isValueAvailable(i)) {
          for (int k=0; k < this.populator.getQuery().getFetchEvents().size(); k++) {
            if (this.populator.getQuery().getFetchEvents().get(k) instanceof ComputedColumnHelper) {
              ComputedColumnHelper helper=(ComputedColumnHelper)this.populator.getQuery().getFetchEvents().get(k);
              helper.getComputedColumnList().remove(iccState.getComputedColumn(i));
              break;
            }
          }
        }
      }
    }
    PassUtil.pass(this.populator,new OdiResultSetWrapper(populator.getResultIterator()),false,this.session);
  }
  computedColumnHelper.getComputedColumnList().clear();
  computedColumnHelper.getComputedColumnList().addAll(aggCCList);
  computedColumnHelper.setModel(TransformationConstants.DATA_SET_MODEL);
  iccState.setModel(TransformationConstants.DATA_SET_MODEL);
  if (iccState.getCount() > 0) {
    ComputedColumnCalculator.populateComputedColumns(this.populator,new OdiResultSetWrapper(this.populator.getResultIterator()),iccState,computedColumnHelper,this.session);
  }
  computedColumnHelper.setModel(TransformationConstants.NONE_MODEL);
}
Program: 75580
Project: 75580
Buggy source:
/** 
 * @param odaResultSet
 * @throws DataException
 */
private void populateResultSetCacheInResultSetPopulator(OdiResultSetWrapper odaResultSet) throws DataException {
  int max=0;
  if (computedColumnHelper != null)   computedColumnHelper.setModel(TransformationConstants.NONE_MODEL);
  if (filterByRow != null) {
    filterByRow.setWorkingFilterSet(FilterByRow.NO_FILTER);
  }
  max=this.populator.getQuery().getMaxRows();
  if (filterByRow != null)   this.populator.getQuery().setMaxRows(0);
  PassUtil.pass(this.populator,odaResultSet,false,this.session);
  this.removeOnFetchScriptHelper();
  this.populator.getQuery().setMaxRows(max);
}

Fixed version (ground truth):
/** 
 * @param odaResultSet
 * @throws DataException
 */
private void populateResultSetCacheInResultSetPopulator(OdiResultSetWrapper odaResultSet) throws DataException {
  int max=0;
  if (computedColumnHelper != null)   computedColumnHelper.setModel(TransformationConstants.PRE_CALCULATE_MODEL);
  if (filterByRow != null) {
    filterByRow.setWorkingFilterSet(FilterByRow.NO_FILTER);
  }
  max=this.populator.getQuery().getMaxRows();
  if (filterByRow != null)   this.populator.getQuery().setMaxRows(0);
  PassUtil.pass(this.populator,odaResultSet,false,this.session);
  this.removeOnFetchScriptHelper();
  this.populator.getQuery().setMaxRows(max);
}
Program: 75581
Project: 75581
Buggy source:
/** 
 * @return
 */
private ComputedColumnHelperInstance getCurrentInstance(){
  if (this.currentModel == TransformationConstants.DATA_SET_MODEL)   return this.dataSetInstance;
 else   if (this.currentModel == TransformationConstants.RESULT_SET_MODEL)   return this.resultSetInstance;
  return null;
}

Fixed version (ground truth):
/** 
 * @return
 */
private ComputedColumnHelperInstance getCurrentInstance(){
  if (this.currentModel == TransformationConstants.DATA_SET_MODEL)   return this.dataSetInstance;
 else   if (this.currentModel == TransformationConstants.RESULT_SET_MODEL)   return this.resultSetInstance;
 else   if (this.currentModel == TransformationConstants.PRE_CALCULATE_MODEL)   return this.availableModeInstance;
  return null;
}
Program: 75582
Project: 75582
Buggy source:
/** 
 * @param dataSet
 * @param dataSetCCList
 * @param resultSetCCList
 */
ComputedColumnHelper(DataSetRuntime dataSet,List dataSetCCList,List resultSetCCList){
  Object[] params={dataSet,dataSetCCList,resultSetCCList};
  logger.entering(ComputedColumnHelper.class.getName(),"String_Node_Str",params);
  this.dataSetInstance=new ComputedColumnHelperInstance(dataSet,dataSetCCList);
  this.resultSetInstance=new ComputedColumnHelperInstance(dataSet,resultSetCCList);
  this.currentModel=TransformationConstants.DATA_SET_MODEL;
  this.allCC=new ArrayList();
  this.allCC.addAll(dataSetCCList);
  this.allCC.addAll(resultSetCCList);
  logger.exiting(ComputedColumnHelper.class.getName(),"String_Node_Str");
}

Fixed version (ground truth):
/** 
 */
ComputedColumnHelper(DataSetRuntime dataSet,List dataSetCCList,List resultSetCCList) throws DataException {
  Object[] params={dataSet,dataSetCCList,resultSetCCList};
  logger.entering(ComputedColumnHelper.class.getName(),"String_Node_Str",params);
  this.dataSetInstance=new ComputedColumnHelperInstance(dataSet,dataSetCCList);
  this.resultSetInstance=new ComputedColumnHelperInstance(dataSet,resultSetCCList);
  List availableCCList=new ArrayList();
  getAvailableComputedList(getComputedNameList(dataSetCCList),dataSetCCList,availableCCList);
  this.availableModeInstance=new ComputedColumnHelperInstance(dataSet,availableCCList);
  this.currentModel=TransformationConstants.DATA_SET_MODEL;
  this.allCC=new ArrayList();
  this.allCC.addAll(dataSetCCList);
  this.allCC.addAll(resultSetCCList);
  logger.exiting(ComputedColumnHelper.class.getName(),"String_Node_Str");
}
Program: 75585
Project: 75585
Buggy source:
/** 
 * @param strArray
 * @param str
 * @return
 */
private static int find(String[] strArray,String str){
  if (strArray == null || str == null) {
    return -1;
  }
  for (int i=0; i < strArray.length; i++) {
    if (str.equals(strArray[i])) {
      return i;
    }
  }
  return -1;
}

Fixed version (ground truth):
/** 
 * @param colArray
 * @param col
 * @return
 */
private static int find(DimColumn[] colArray,DimColumn col){
  if (colArray == null || col == null) {
    return -1;
  }
  for (int i=0; i < colArray.length; i++) {
    if (col.equals(colArray[i])) {
      return i;
    }
  }
  return -1;
}
Program: 75587
Project: 75587
Buggy source:
private void getParameterColIndex(AggregationDefinition[] aggregations) throws DataException {
  List colNameList=new ArrayList();
  for (int i=0; i < aggregations.length; i++) {
    AggregationFunctionDefinition[] functions=aggregations[i].getAggregationFunctions();
    if (functions == null) {
      continue;
    }
    for (int j=0; j < functions.length; j++) {
      String colName=functions[j].getParaColName();
      if (colName != null) {
        if (!exist(colNameList,colName)) {
          colNameList.add(colName);
        }
      }
    }
  }
  if (colNameList.size() == 0) {
    return;
  }
  parameterColNames=new String[colNameList.size()];
  for (int i=0; i < colNameList.size(); i++) {
    parameterColNames[i]=(String)(colNameList.get(i));
  }
  parameterColIndexs=new int[colNameList.size()][4];
  findColumnIndex();
}

Fixed version (ground truth):
private void getParameterColIndex(AggregationDefinition[] aggregations) throws DataException {
  List paraColList=new ArrayList();
  for (int i=0; i < aggregations.length; i++) {
    AggregationFunctionDefinition[] functions=aggregations[i].getAggregationFunctions();
    if (functions == null) {
      continue;
    }
    for (int j=0; j < functions.length; j++) {
      DimColumn paraCol=functions[j].getParaCol();
      if (paraCol != null) {
        if (!exist(paraColList,paraCol)) {
          paraColList.add(paraCol);
        }
      }
    }
  }
  if (paraColList.size() == 0) {
    return;
  }
  paraColumns=new DimColumn[paraColList.size()];
  for (int i=0; i < paraColList.size(); i++) {
    paraColumns[i]=(DimColumn)(paraColList.get(i));
  }
  parameterColIndexs=new int[paraColList.size()][4];
  findColumnIndex();
}
Program: 75588
Project: 75588
Buggy source:
/** 
 * @throws DataException
 */
private void findColumnIndex() throws DataException {
  if (parameterColNames == null) {
    return;
  }
  for (int i=0; i < parameterColNames.length; i++) {
    parameterColIndexs[i][0]=-1;
    for (int j=0; j < dimesionResultIterators.length; j++) {
      ILevel[] levels=dimesionResultIterators[j].getDimesion().getHierarchy().getLevels();
      for (int k=0; k < levels.length; k++) {
        String[] columns=levels[k].getKeyNames();
        int index=find(columns,parameterColNames[i]);
        if (index >= 0) {
          parameterColIndexs[i][0]=0;
          parameterColIndexs[i][1]=j;
          parameterColIndexs[i][2]=k;
          parameterColIndexs[i][3]=index;
          break;
        }
        columns=levels[k].getAttributeNames();
        index=find(columns,parameterColNames[i]);
        if (index >= 0) {
          parameterColIndexs[i][0]=1;
          parameterColIndexs[i][1]=j;
          parameterColIndexs[i][2]=k;
          parameterColIndexs[i][3]=index;
          break;
        }
      }
      if (parameterColIndexs[i][0] != -1) {
        break;
      }
    }
    if (parameterColIndexs[i][0] == -1) {
      throw new DataException(ResourceConstants.PARAMETER_COL_OF_AGGREGATION_NOT_EXIST,parameterColNames[i]);
    }
  }
}

Fixed version (ground truth):
/** 
 * @throws DataException
 */
private void findColumnIndex() throws DataException {
  if (paraColumns == null) {
    return;
  }
  for (int i=0; i < paraColumns.length; i++) {
    parameterColIndexs[i][0]=-1;
    for (int j=0; j < dimesionResultIterators.length; j++) {
      if (!dimesionResultIterators[j].getDimesion().getName().equals(paraColumns[i].getDimensionName())) {
        continue;
      }
      ILevel[] levels=dimesionResultIterators[j].getDimesion().getHierarchy().getLevels();
      for (int k=0; k < levels.length; k++) {
        if (!levels[k].getName().equals(paraColumns[i].getLevelName())) {
          continue;
        }
        String[] columns=levels[k].getKeyNames();
        int index=find(columns,paraColumns[i].getColumnName());
        if (index >= 0) {
          parameterColIndexs[i][0]=0;
          parameterColIndexs[i][1]=j;
          parameterColIndexs[i][2]=k;
          parameterColIndexs[i][3]=index;
          break;
        }
        columns=levels[k].getAttributeNames();
        index=find(columns,paraColumns[i].getColumnName());
        if (index >= 0) {
          parameterColIndexs[i][0]=1;
          parameterColIndexs[i][1]=j;
          parameterColIndexs[i][2]=k;
          parameterColIndexs[i][3]=index;
          break;
        }
      }
      if (parameterColIndexs[i][0] != -1) {
        break;
      }
    }
    if (parameterColIndexs[i][0] == -1) {
      throw new DataException(ResourceConstants.PARAMETER_COL_OF_AGGREGATION_NOT_EXIST,paraColumns[i]);
    }
  }
}
Program: 75589
Project: 75589
Buggy source:
/** 
 * @param strList
 * @param str
 * @return
 */
private boolean exist(List strList,String str){
  for (int i=0; i < strList.size(); i++) {
    if (str.equals(strList.get(i))) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * @param colList
 * @param col
 * @return
 */
private boolean exist(List colList,DimColumn col){
  for (int i=0; i < colList.size(); i++) {
    if (col.equals(colList.get(i))) {
      return true;
    }
  }
  return false;
}
Program: 75590
Project: 75590
Buggy source:
/** 
 * @param dimesionResultIterators
 * @param facttableRowIterator
 * @param aggregations
 * @throws BirtOlapException 
 */
public AggregationExecutor(IDimensionResultIterator[] dimesionResultIterators,IFactTableRowIterator facttableRowIterator,AggregationDefinition[] aggregations) throws DataException {
  Object[] params={dimesionResultIterators,facttableRowIterator,aggregations};
  logger.entering(AggregationExecutor.class.getName(),"String_Node_Str",params);
  this.dimesionResultIterators=dimesionResultIterators;
  getParameterColIndex(aggregations);
  this.aggregationCalculators=new AggregationCalculator[aggregations.length];
  for (int i=0; i < this.aggregationCalculators.length; i++) {
    this.aggregationCalculators[i]=new AggregationCalculator(aggregations[i],parameterColNames,facttableRowIterator);
  }
  sortedFactRows=new DiskSortedStackWrapper[aggregations.length];
  this.facttableRowIterator=facttableRowIterator;
  getAggregationLevelIndex();
  logger.exiting(AggregationExecutor.class.getName(),"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @param dimesionResultIterators
 * @param facttableRowIterator
 * @param aggregations
 * @throws BirtOlapException 
 */
public AggregationExecutor(IDimensionResultIterator[] dimesionResultIterators,IFactTableRowIterator facttableRowIterator,AggregationDefinition[] aggregations) throws DataException {
  Object[] params={dimesionResultIterators,facttableRowIterator,aggregations};
  logger.entering(AggregationExecutor.class.getName(),"String_Node_Str",params);
  this.dimesionResultIterators=dimesionResultIterators;
  getParameterColIndex(aggregations);
  this.aggregationCalculators=new AggregationCalculator[aggregations.length];
  for (int i=0; i < this.aggregationCalculators.length; i++) {
    this.aggregationCalculators[i]=new AggregationCalculator(aggregations[i],paraColumns,facttableRowIterator);
  }
  sortedFactRows=new DiskSortedStackWrapper[aggregations.length];
  this.facttableRowIterator=facttableRowIterator;
  getAggregationLevelIndex();
  logger.exiting(AggregationExecutor.class.getName(),"String_Node_Str");
}
Program: 75591
Project: 75591
Buggy source:
private List getGrandTotalInfo(){
  List retValue=new ArrayList();
  DimensionViewHandle viewHandle=getDimensionViewHandle();
  CrosstabReportItemHandle reportHandle=levelHandle.getCrosstab();
  int measureCount=reportHandle.getMeasureCount();
  for (int i=0; i < measureCount; i++) {
    AggregationDialog.GrandTotalInfo info=new AggregationDialog.GrandTotalInfo();
    info.setMeasure(reportHandle.getMeasure(i).getCubeMeasure());
    retValue.add(info);
  }
  List measures=reportHandle.getAggregationMeasures(viewHandle.getAxisType());
  for (int i=0; i < measures.size(); i++) {
    AggregationDialog.GrandTotalInfo info=new AggregationDialog.GrandTotalInfo();
    MeasureViewHandle measureViewHandle=(MeasureViewHandle)measures.get(i);
    info.setMeasure(measureViewHandle.getCubeMeasure());
    info.setFunction(measureViewHandle.getCubeMeasure().getFunction());
    replaceInfo(info,retValue);
  }
  return retValue;
}

Fixed version (ground truth):
private List getGrandTotalInfo(){
  List retValue=new ArrayList();
  DimensionViewHandle viewHandle=getDimensionViewHandle();
  CrosstabReportItemHandle reportHandle=levelHandle.getCrosstab();
  int measureCount=reportHandle.getMeasureCount();
  for (int i=0; i < measureCount; i++) {
    AggregationDialog.GrandTotalInfo info=new AggregationDialog.GrandTotalInfo();
    info.setMeasure(reportHandle.getMeasure(i).getCubeMeasure());
    info.setFunction(reportHandle.getMeasure(i).getCubeMeasure().getFunction());
    retValue.add(info);
  }
  List measures=reportHandle.getAggregationMeasures(viewHandle.getAxisType());
  for (int i=0; i < measures.size(); i++) {
    AggregationDialog.GrandTotalInfo info=new AggregationDialog.GrandTotalInfo();
    MeasureViewHandle measureViewHandle=(MeasureViewHandle)measures.get(i);
    info.setMeasure(measureViewHandle.getCubeMeasure());
    info.setFunction(measureViewHandle.getCubeMeasure().getFunction());
    replaceInfo(info,retValue);
  }
  return retValue;
}
Program: 75592
Project: 75592
Buggy source:
private List getSubTotalInfo(){
  List retValue=new ArrayList();
  DimensionViewHandle viewHandle=getDimensionViewHandle();
  CrosstabReportItemHandle reportHandle=viewHandle.getCrosstab();
  int count=viewHandle.getLevelCount();
  int measureCount=reportHandle.getMeasureCount();
  LevelViewHandle lastLevelHandle=getLastLevelViewHandle();
  for (int i=0; i < count; i++) {
    LevelViewHandle tempViewHandle=viewHandle.getLevel(i);
    if (tempViewHandle == lastLevelHandle) {
      continue;
    }
    LevelHandle tempHandle=tempViewHandle.getCubeLevel();
    for (int j=0; j < measureCount; j++) {
      AggregationDialog.SubTotalInfo info=new AggregationDialog.SubTotalInfo();
      info.setLevel(tempHandle);
      info.setAggregateOnMeasure(reportHandle.getMeasure(j).getCubeMeasure());
      retValue.add(info);
    }
  }
  count=viewHandle.getLevelCount();
  for (int i=0; i < count; i++) {
    LevelViewHandle tempViewHandle=viewHandle.getLevel(i);
    LevelHandle tempHandle=tempViewHandle.getCubeLevel();
    List measures=tempViewHandle.getAggregationMeasures();
    for (int j=0; j < measures.size(); j++) {
      MeasureHandle tempMeasureHandle=((MeasureViewHandle)measures.get(j)).getCubeMeasure();
      AggregationDialog.SubTotalInfo info=new AggregationDialog.SubTotalInfo();
      info.setLevel(tempHandle);
      info.setAggregateOnMeasure(tempMeasureHandle);
      info.setFunction(tempMeasureHandle.getFunction());
      replaceInfo(info,retValue);
    }
  }
  return retValue;
}

Fixed version (ground truth):
private List getSubTotalInfo(){
  List retValue=new ArrayList();
  DimensionViewHandle viewHandle=getDimensionViewHandle();
  CrosstabReportItemHandle reportHandle=viewHandle.getCrosstab();
  int count=viewHandle.getLevelCount();
  int measureCount=reportHandle.getMeasureCount();
  LevelViewHandle lastLevelHandle=getLastLevelViewHandle();
  for (int i=0; i < count; i++) {
    LevelViewHandle tempViewHandle=viewHandle.getLevel(i);
    if (tempViewHandle == lastLevelHandle) {
      continue;
    }
    LevelHandle tempHandle=tempViewHandle.getCubeLevel();
    for (int j=0; j < measureCount; j++) {
      AggregationDialog.SubTotalInfo info=new AggregationDialog.SubTotalInfo();
      info.setLevel(tempHandle);
      info.setAggregateOnMeasure(reportHandle.getMeasure(j).getCubeMeasure());
      info.setFunction(reportHandle.getMeasure(j).getCubeMeasure().getFunction());
      retValue.add(info);
    }
  }
  count=viewHandle.getLevelCount();
  for (int i=0; i < count; i++) {
    LevelViewHandle tempViewHandle=viewHandle.getLevel(i);
    LevelHandle tempHandle=tempViewHandle.getCubeLevel();
    List measures=tempViewHandle.getAggregationMeasures();
    for (int j=0; j < measures.size(); j++) {
      MeasureHandle tempMeasureHandle=((MeasureViewHandle)measures.get(j)).getCubeMeasure();
      AggregationDialog.SubTotalInfo info=new AggregationDialog.SubTotalInfo();
      info.setLevel(tempHandle);
      info.setAggregateOnMeasure(tempMeasureHandle);
      info.setFunction(tempMeasureHandle.getFunction());
      replaceInfo(info,retValue);
    }
  }
  return retValue;
}
Program: 75593
Project: 75593
Buggy source:
protected String getText(){
  String text=((DataItemHandle)getModel()).getResultSetColumn();
  if (text == null || text.length() == 0) {
    text=FIGURE_DEFAULT_TEXT;
  }
 else {
    if (text.length() > TRUNCATE_LENGTH) {
      text=text.substring(0,TRUNCATE_LENGTH - 2) + ELLIPSIS;
    }
    text="String_Node_Str" + text + "String_Node_Str";
  }
  return text;
}

Fixed version (ground truth):
protected String getText(){
  String text=((DataItemHandle)getModel()).getResultSetColumn();
  if (text == null || text.length() == 0) {
    text=FIGURE_DEFAULT_TEXT;
  }
 else {
    if (text.length() > TRUNCATE_LENGTH) {
      text=text.substring(0,TRUNCATE_LENGTH - 2) + ELLIPSIS;
    }
    text="String_Node_Str" + text + "String_Node_Str";
  }
  if (hasBindingFunction()) {
    text=PREFIX + text;
  }
  return text;
}
Program: 75594
Project: 75594
Buggy source:
/** 
 * Add default value into list
 * @param paramName
 * @param attrBean
 * @return
 * @throws RemoteException
 * @throws ReportServiceException
 */
private List preHandleCascadeParameterSelectionList(ParameterDefinition parameter,ViewerAttributeBean attrBean) throws RemoteException, ReportServiceException {
  int index=0;
  List selectionList=new ArrayList();
  Object obj=attrBean.getDefaultValues().get(parameter.getName());
  String defaultValue=null;
  String defaultLabel=null;
  if (obj != null) {
    defaultValue=DataUtil.getDisplayValue(obj);
    defaultLabel=ParameterValidationUtil.getDisplayValue(null,parameter.getPattern(),obj,attrBean.getLocale());
  }
  if (defaultValue != null) {
    selectionList.add(index++,new SelectItemChoice(defaultValue,defaultLabel));
    if (!parameter.isRequired()) {
      if (defaultValue.length() > 0) {
        selectionList.add(index++,new SelectItemChoice("String_Node_Str","String_Node_Str"));
      }
      selectionList.add(index++,new SelectItemChoice("String_Node_Str",IBirtConstants.NULL_VALUE));
    }
  }
 else {
    if (!parameter.isRequired()) {
      selectionList.add(index++,new SelectItemChoice("String_Node_Str",IBirtConstants.NULL_VALUE));
      selectionList.add(index++,new SelectItemChoice("String_Node_Str","String_Node_Str"));
    }
  }
  return selectionList;
}

Fixed version (ground truth):
/** 
 * Add default value into list
 * @param paramName
 * @param attrBean
 * @return
 * @throws RemoteException
 * @throws ReportServiceException
 */
private List preHandleCascadeParameterSelectionList(ParameterDefinition parameter,ViewerAttributeBean attrBean) throws RemoteException, ReportServiceException {
  int index=0;
  List selectionList=new ArrayList();
  Object obj=attrBean.getDefaultValues().get(parameter.getName());
  String defaultValue=null;
  String defaultLabel=null;
  if (obj != null) {
    defaultValue=DataUtil.getDisplayValue(obj);
    defaultLabel=ParameterValidationUtil.getDisplayValue(null,parameter.getPattern(),obj,attrBean.getLocale());
  }
  if (defaultValue != null) {
    selectionList.add(index++,new SelectItemChoice(defaultValue,defaultLabel));
    if (!parameter.isRequired()) {
      if (defaultValue.trim().length() > 0) {
        selectionList.add(index++,new SelectItemChoice("String_Node_Str","String_Node_Str"));
      }
      selectionList.add(index++,new SelectItemChoice("String_Node_Str",IBirtConstants.NULL_VALUE));
    }
  }
 else {
    if (!parameter.isRequired()) {
      selectionList.add(index++,new SelectItemChoice("String_Node_Str",IBirtConstants.NULL_VALUE));
      selectionList.add(index++,new SelectItemChoice("String_Node_Str","String_Node_Str"));
    }
 else {
      selectionList.add(index++,new SelectItemChoice("String_Node_Str","String_Node_Str"));
    }
  }
  return selectionList;
}
Program: 75595
Project: 75595
Buggy source:
/** 
 * Resets size of column.
 * @param start
 * @param end
 * @param value
 */
public void resizeColumn(int start,int end,int value){
  Object startColumn=getColumn(start);
  ColumnHandleAdapter startAdapt=HandleAdapterFactory.getInstance().getColumnHandleAdapter(startColumn);
  Object endColumn=getColumn(end);
  ColumnHandleAdapter endAdapt=HandleAdapterFactory.getInstance().getColumnHandleAdapter(endColumn);
  int startWidth=0;
  int endWidth=0;
  startWidth=TableUtil.caleVisualWidth(this,startColumn);
  endWidth=TableUtil.caleVisualWidth(this,endColumn);
  try {
    getTableAdapter().transStar(RESIZE_COLUMN_TRANS_LABEL);
    startAdapt.setWidth(startWidth + value);
    endAdapt.setWidth(endWidth - value);
    getTableAdapter().transEnd();
  }
 catch (  SemanticException e) {
    ExceptionHandler.handle(e);
  }
}

Fixed version (ground truth):
/** 
 * Resets size of column.
 * @param start
 * @param end
 * @param value
 */
public void resizeColumn(int start,int end,int value){
  Object startColumn=getColumn(start);
  ColumnHandleAdapter startAdapt=HandleAdapterFactory.getInstance().getColumnHandleAdapter(startColumn);
  Object endColumn=getColumn(end);
  ColumnHandleAdapter endAdapt=HandleAdapterFactory.getInstance().getColumnHandleAdapter(endColumn);
  int startWidth=0;
  int endWidth=0;
  startWidth=TableUtil.caleVisualWidth(this,startColumn);
  endWidth=TableUtil.caleVisualWidth(this,endColumn);
  try {
    getTableAdapter().transStar(RESIZE_COLUMN_TRANS_LABEL);
    startAdapt.setWidth(startWidth + value);
    getTableAdapter().transEnd();
  }
 catch (  SemanticException e) {
    ExceptionHandler.handle(e);
  }
}
Program: 75596
Project: 75596
Buggy source:
/** 
 * Resets size of column.
 * @param start
 * @param end
 * @param value
 */
public void resizeColumn(int start,int end,int value){
  CrosstabTableEditPart part=(CrosstabTableEditPart)getSourceEditPart().getParent();
  CrosstabHandleAdapter crosstabAdapter=part.getCrosstabHandleAdapter();
  int startWidth=0;
  int endWidth=0;
  startWidth=CrosstabTableUtil.caleVisualWidth(part,start);
  endWidth=CrosstabTableUtil.caleVisualWidth(part,end);
  part.getCrosstabHandleAdapter().getCrosstabItemHandle().getModuleHandle().getCommandStack().startTrans(RESIZE_COLUMN_TRANS_LABEL);
  crosstabAdapter.setColumnWidth(start,startWidth + value);
  crosstabAdapter.setColumnWidth(end,endWidth - value);
  part.getCrosstabHandleAdapter().getCrosstabItemHandle().getModuleHandle().getCommandStack().commit();
}

Fixed version (ground truth):
/** 
 * Resets size of column.
 * @param start
 * @param end
 * @param value
 */
public void resizeColumn(int start,int end,int value){
  CrosstabTableEditPart part=(CrosstabTableEditPart)getSourceEditPart().getParent();
  CrosstabHandleAdapter crosstabAdapter=part.getCrosstabHandleAdapter();
  int startWidth=0;
  int endWidth=0;
  startWidth=CrosstabTableUtil.caleVisualWidth(part,start);
  endWidth=CrosstabTableUtil.caleVisualWidth(part,end);
  part.getCrosstabHandleAdapter().getCrosstabItemHandle().getModuleHandle().getCommandStack().startTrans(RESIZE_COLUMN_TRANS_LABEL);
  crosstabAdapter.setColumnWidth(start,startWidth + value);
  part.getCrosstabHandleAdapter().getCrosstabItemHandle().getModuleHandle().getCommandStack().commit();
}
Program: 75597
Project: 75597
Buggy source:
public void calculateTopStyles(){
  if (styles.size() > 0) {
    StyleEntry style=(StyleEntry)styles.peek();
    if (((Boolean)style2top.get(style)).booleanValue()) {
      Span span=(Span)spans.peek();
      int start=((Integer)pos.peek()).intValue();
      applyContainerTopBorder(span,start);
      style2top.put(style,Boolean.FALSE);
    }
  }
}

Fixed version (ground truth):
public void calculateTopStyles(){
  if (styles.size() > 0) {
    StyleEntry style=(StyleEntry)styles.peek();
    Boolean value=(Boolean)style2top.get(style);
    if (value != null && value.booleanValue()) {
      Span span=(Span)spans.peek();
      int start=((Integer)pos.peek()).intValue();
      applyContainerTopBorder(span,start);
      style2top.put(style,Boolean.FALSE);
    }
  }
}
Program: 75598
Project: 75598
Buggy source:
/** 
 * Draws a line from (startX, startY) to (endX, endY) with specified line width, color and line style. Line style can be "dotted", "dash", and "double".
 * @param startX the x coordinate of start point.
 * @param startY the y coordinate of start point.
 * @param endX the x coordinate of end point.
 * @param endY the y coordinate of end point.
 * @param width the line width.
 * @param color the color.
 * @param lineStyle the line style.
 */
public void drawLine(float startX,float startY,float endX,float endY,float width,Color color,String lineStyle){
  gSave();
  if (color != null) {
    setColor(color);
  }
  setLineWidth(width);
  if (null == color || 0f == width || "String_Node_Str".equalsIgnoreCase(lineStyle)) {
    return;
  }
  if ("String_Node_Str".equalsIgnoreCase(lineStyle)) {
    return;
  }
  if ("String_Node_Str".equalsIgnoreCase(lineStyle)) {
    setDashLine(width);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(lineStyle)) {
    setDottedLine(width);
  }
  drawLine(startX,startY,endX,endY);
  gRestore();
}

Fixed version (ground truth):
/** 
 * Draws a line from (startX, startY) to (endX, endY) with specified line width, color and line style. Line style can be "dotted", "dash", and "double".
 * @param startX the x coordinate of start point.
 * @param startY the y coordinate of start point.
 * @param endX the x coordinate of end point.
 * @param endY the y coordinate of end point.
 * @param width the line width.
 * @param color the color.
 * @param lineStyle the line style.
 */
public void drawLine(float startX,float startY,float endX,float endY,float width,Color color,String lineStyle){
  if (null == color || 0f == width || "String_Node_Str".equalsIgnoreCase(lineStyle)) {
    return;
  }
  if ("String_Node_Str".equalsIgnoreCase(lineStyle)) {
    return;
  }
  gSave();
  if (color != null) {
    setColor(color);
  }
  setLineWidth(width);
  if ("String_Node_Str".equalsIgnoreCase(lineStyle)) {
    setDashLine(width);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(lineStyle)) {
    setDottedLine(width);
  }
  drawLine(startX,startY,endX,endY);
  gRestore();
}
Program: 75599
Project: 75599
Buggy source:
/** 
 * This method will be invoked while a containerArea ends.
 * @param container the ContainerArea specified from layout
 */
protected void endContainer(IContainerArea container){
  if (container instanceof PageArea) {
    pageGraphic.dispose();
  }
  if (!containerStack.isEmpty()) {
    containerStack.pop();
  }
}

Fixed version (ground truth):
/** 
 * This method will be invoked while a containerArea ends.
 * @param container the ContainerArea specified from layout
 */
protected void endContainer(IContainerArea container){
  if (container instanceof PageArea) {
    pageGraphic.dispose();
  }
 else {
    if (needClip(container)) {
      pageGraphic.clipRestore();
    }
  }
  if (!containerStack.isEmpty()) {
    containerStack.pop();
  }
}
Program: 75600
Project: 75600
Buggy source:
/** 
 * If the container is a PageArea, this method creates a pdf page. If the container is the other containerAreas, such as TableArea, or just the border of textArea/imageArea this method draws the border and background of the given container.
 * @param container the ContainerArea specified from layout
 */
protected void startContainer(IContainerArea container){
  if (container instanceof PageArea) {
    scale=container.getScale();
    hTextSpace=(int)(H_TEXT_SPACE * scale);
    vTextSpace=(int)(V_TEXT_SPACE * scale);
    newPage(container);
    containerStack.push(new ContainerPosition(0,0));
  }
 else {
    drawContainer(container);
    ContainerPosition pos;
    if (!containerStack.isEmpty()) {
      pos=(ContainerPosition)containerStack.peek();
      ContainerPosition current=new ContainerPosition(pos.x + getX(container),pos.y + getY(container));
      containerStack.push(current);
    }
 else {
      containerStack.push(new ContainerPosition(getX(container),getY(container)));
    }
  }
}

Fixed version (ground truth):
/** 
 * If the container is a PageArea, this method creates a pdf page. If the container is the other containerAreas, such as TableArea, or just the border of textArea/imageArea this method draws the border and background of the given container.
 * @param container the ContainerArea specified from layout
 */
protected void startContainer(IContainerArea container){
  if (container instanceof PageArea) {
    scale=container.getScale();
    hTextSpace=(int)(H_TEXT_SPACE * scale);
    vTextSpace=(int)(V_TEXT_SPACE * scale);
    newPage(container);
    containerStack.push(new ContainerPosition(0,0));
  }
 else {
    if (needClip(container)) {
      pageGraphic.clipSave();
      clip(container);
    }
    drawContainer(container);
    ContainerPosition pos;
    if (!containerStack.isEmpty()) {
      pos=(ContainerPosition)containerStack.peek();
      ContainerPosition current=new ContainerPosition(pos.x + getX(container),pos.y + getY(container));
      containerStack.push(current);
    }
 else {
      containerStack.push(new ContainerPosition(getX(container),getY(container)));
    }
  }
}
Program: 75602
Project: 75602
Buggy source:
private void createSubTotalArea(Composite content){
  Label subTotalLabel=new Label(content,SWT.NONE);
  subTotalLabel.setText(Messages.getString("String_Node_Str"));
  Table table=new Table(content,SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL| SWT.V_SCROLL| SWT.FULL_SELECTION| SWT.CHECK);
  table.setLinesVisible(true);
  table.setHeaderVisible(true);
  GridData gd=new GridData(GridData.FILL_BOTH);
  gd.heightHint=150;
  table.setLayoutData(gd);
  subTableViewer=new CheckboxTableViewer(table);
  SubTotalProvider provider=new SubTotalProvider(subTableViewer);
  String[] columnNames=provider.getColumnNames();
  int[] columnWidths=provider.columnWidths();
  for (int i=0; i < columnNames.length; i++) {
    TableColumn column=new TableColumn(table,SWT.LEFT);
    column.setText(columnNames[i]);
    column.setWidth(columnWidths[i]);
  }
  subTableViewer.setUseHashlookup(true);
  subTableViewer.setColumnProperties(provider.getColumnNames());
  subTableViewer.setCellEditors(provider.getEditors(table));
  subTableViewer.setContentProvider(provider);
  subTableViewer.setLabelProvider(provider);
  subTableViewer.setCellModifier(provider);
  subTableViewer.addCheckStateListener(new ICheckStateListener(){
    public void checkStateChanged(    CheckStateChangedEvent event){
      SubTotalInfo info=(SubTotalInfo)event.getElement();
      if (event.getChecked()) {
        info.setAggregationOn(true);
      }
 else       info.setAggregationOn(false);
    }
  }
);
}

Fixed version (ground truth):
private void createSubTotalArea(Composite content){
  Label subTotalLabel=new Label(content,SWT.NONE);
  subTotalLabel.setText(Messages.getString("String_Node_Str"));
  Table table=new Table(content,SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL| SWT.V_SCROLL| SWT.FULL_SELECTION| SWT.CHECK);
  table.setLinesVisible(false);
  table.setHeaderVisible(false);
  GridData gd=new GridData(GridData.FILL_BOTH);
  gd.heightHint=150;
  table.setLayoutData(gd);
  subTableViewer=new CheckboxTableViewer(table);
  SubTotalProvider provider=new SubTotalProvider(subTableViewer);
  String[] columnNames=provider.getColumnNames();
  int[] columnWidths=provider.columnWidths();
  for (int i=0; i < columnNames.length; i++) {
    TableColumn column=new TableColumn(table,SWT.LEFT);
    column.setText(columnNames[i]);
    column.setWidth(columnWidths[i]);
  }
  subTableViewer.setUseHashlookup(true);
  subTableViewer.setColumnProperties(provider.getColumnNames());
  subTableViewer.setContentProvider(provider);
  subTableViewer.setLabelProvider(provider);
  subTableViewer.addCheckStateListener(new ICheckStateListener(){
    public void checkStateChanged(    CheckStateChangedEvent event){
      SubTotalInfo info=(SubTotalInfo)event.getElement();
      if (event.getChecked()) {
        info.setAggregationOn(true);
      }
 else       info.setAggregationOn(false);
    }
  }
);
}
Program: 75603
Project: 75603
Buggy source:
private void createGrandTotalArea(Composite content){
  Label grandTotalLabel=new Label(content,SWT.NONE);
  grandTotalLabel.setText(Messages.getString("String_Node_Str"));
  Table table=new Table(content,SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL| SWT.V_SCROLL| SWT.FULL_SELECTION| SWT.CHECK);
  table.setLinesVisible(true);
  table.setHeaderVisible(true);
  GridData gd=new GridData(GridData.FILL_BOTH);
  gd.heightHint=150;
  table.setLayoutData(gd);
  grandTableViewer=new CheckboxTableViewer(table);
  GrandTotalProvider provider=new GrandTotalProvider(grandTableViewer);
  String[] columnNames=provider.getColumnNames();
  int[] columnWidths=provider.columnWidths();
  for (int i=0; i < columnNames.length; i++) {
    TableColumn column=new TableColumn(table,SWT.LEFT);
    column.setText(columnNames[i]);
    column.setWidth(columnWidths[i]);
  }
  grandTableViewer.setUseHashlookup(true);
  grandTableViewer.setColumnProperties(provider.getColumnNames());
  grandTableViewer.setCellEditors(provider.getEditors(table));
  grandTableViewer.setContentProvider(provider);
  grandTableViewer.setLabelProvider(provider);
  grandTableViewer.setCellModifier(provider);
  grandTableViewer.addCheckStateListener(new ICheckStateListener(){
    public void checkStateChanged(    CheckStateChangedEvent event){
      GrandTotalInfo info=(GrandTotalInfo)event.getElement();
      if (event.getChecked()) {
        info.setAggregationOn(true);
      }
 else       info.setAggregationOn(false);
    }
  }
);
}

Fixed version (ground truth):
private void createGrandTotalArea(Composite content){
  Label grandTotalLabel=new Label(content,SWT.NONE);
  grandTotalLabel.setText(Messages.getString("String_Node_Str"));
  Table table=new Table(content,SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL| SWT.V_SCROLL| SWT.FULL_SELECTION| SWT.CHECK);
  table.setLinesVisible(false);
  table.setHeaderVisible(false);
  GridData gd=new GridData(GridData.FILL_BOTH);
  gd.heightHint=150;
  table.setLayoutData(gd);
  grandTableViewer=new CheckboxTableViewer(table);
  GrandTotalProvider provider=new GrandTotalProvider(grandTableViewer);
  String[] columnNames=provider.getColumnNames();
  int[] columnWidths=provider.columnWidths();
  for (int i=0; i < columnNames.length; i++) {
    TableColumn column=new TableColumn(table,SWT.LEFT);
    column.setText(columnNames[i]);
    column.setWidth(columnWidths[i]);
  }
  grandTableViewer.setUseHashlookup(true);
  grandTableViewer.setColumnProperties(provider.getColumnNames());
  grandTableViewer.setContentProvider(provider);
  grandTableViewer.setLabelProvider(provider);
  grandTableViewer.addCheckStateListener(new ICheckStateListener(){
    public void checkStateChanged(    CheckStateChangedEvent event){
      GrandTotalInfo info=(GrandTotalInfo)event.getElement();
      if (event.getChecked()) {
        info.setAggregationOn(true);
      }
 else       info.setAggregationOn(false);
    }
  }
);
}
Program: 75604
Project: 75604
Buggy source:
public String getColumnText(Object element,int columnIndex){
  GrandTotalInfo info=(GrandTotalInfo)element;
switch (columnIndex) {
case 0:
    return "String_Node_Str";
case 1:
  return info.getMeasure() == null ? "String_Node_Str" : info.getMeasure().getName();
case 2:
if (info.getFunction() == null || info.getFunction().trim().equals("String_Node_Str")) info.setFunction(getFunctionNames()[0]);
return getFunctionDisplayName(info.getFunction());
default :
break;
}
return "String_Node_Str";
}

Fixed version (ground truth):
public String getColumnText(Object element,int columnIndex){
  GrandTotalInfo info=(GrandTotalInfo)element;
switch (columnIndex) {
case 0:
    return "String_Node_Str";
case 1:
  return info.getMeasure() == null ? "String_Node_Str" : info.getMeasure().getName();
default :
break;
}
return "String_Node_Str";
}
Program: 75605
Project: 75605
Buggy source:
public int[] columnWidths(){
  return new int[]{20,120,120,120};
}

Fixed version (ground truth):
public int[] columnWidths(){
  return new int[]{20,300};
}
Program: 75606
Project: 75606
Buggy source:
public String getColumnText(Object element,int columnIndex){
  SubTotalInfo info=(SubTotalInfo)element;
switch (columnIndex) {
case 0:
    return "String_Node_Str";
case 1:
  return info.getLevel().getName();
case 2:
return info.getAggregateOnMeasure() == null ? "String_Node_Str" : info.getAggregateOnMeasure().getName();
case 3:
if (info.getFunction() == null || info.getFunction().trim().equals("String_Node_Str")) info.setFunction(getFunctionNames()[0]);
return getFunctionDisplayName(info.getFunction());
default :
break;
}
return "String_Node_Str";
}

Fixed version (ground truth):
public String getColumnText(Object element,int columnIndex){
  SubTotalInfo info=(SubTotalInfo)element;
switch (columnIndex) {
case 0:
    return "String_Node_Str";
case 1:
  return info.getLevel().getName() + "String_Node_Str" + (info.getAggregateOnMeasure() == null ? "String_Node_Str" : info.getAggregateOnMeasure().getName());
default :
break;
}
return "String_Node_Str";
}
Program: 75607
Project: 75607
Buggy source:
public int[] columnWidths(){
  return new int[]{20,120,120,120};
}

Fixed version (ground truth):
public int[] columnWidths(){
  return new int[]{20,300};
}
Program: 75608
Project: 75608
Buggy source:
private List getGrandTotalInfo(){
  List retValue=new ArrayList();
  DimensionViewHandle viewHandle=getDimensionViewHandle();
  CrosstabReportItemHandle reportHandle=levelHandle.getCrosstab();
  int measureCount=reportHandle.getMeasureCount();
  for (int i=0; i < measureCount; i++) {
    AggregationDialog.GrandTotalInfo info=new AggregationDialog.GrandTotalInfo();
    info.setMeasure(reportHandle.getMeasure(i).getCubeMeasure());
    retValue.add(info);
  }
  List measures=reportHandle.getAggregationMeasures(viewHandle.getAxisType());
  for (int i=0; i < measures.size(); i++) {
    AggregationDialog.GrandTotalInfo info=new AggregationDialog.GrandTotalInfo();
    MeasureViewHandle measureViewHandle=(MeasureViewHandle)measures.get(i);
    info.setMeasure(measureViewHandle.getCubeMeasure());
    info.setFunction(reportHandle.getAggregationFunction(viewHandle.getAxisType(),measureViewHandle));
    replaceInfo(info,retValue);
  }
  return retValue;
}

Fixed version (ground truth):
private List getGrandTotalInfo(){
  List retValue=new ArrayList();
  DimensionViewHandle viewHandle=getDimensionViewHandle();
  CrosstabReportItemHandle reportHandle=levelHandle.getCrosstab();
  int measureCount=reportHandle.getMeasureCount();
  for (int i=0; i < measureCount; i++) {
    AggregationDialog.GrandTotalInfo info=new AggregationDialog.GrandTotalInfo();
    info.setMeasure(reportHandle.getMeasure(i).getCubeMeasure());
    retValue.add(info);
  }
  List measures=reportHandle.getAggregationMeasures(viewHandle.getAxisType());
  for (int i=0; i < measures.size(); i++) {
    AggregationDialog.GrandTotalInfo info=new AggregationDialog.GrandTotalInfo();
    MeasureViewHandle measureViewHandle=(MeasureViewHandle)measures.get(i);
    info.setMeasure(measureViewHandle.getCubeMeasure());
    info.setFunction(measureViewHandle.getCubeMeasure().getFunction());
    replaceInfo(info,retValue);
  }
  return retValue;
}
Program: 75609
Project: 75609
Buggy source:
private List getSubTotalInfo(){
  List retValue=new ArrayList();
  DimensionViewHandle viewHandle=getDimensionViewHandle();
  CrosstabReportItemHandle reportHandle=viewHandle.getCrosstab();
  int count=viewHandle.getLevelCount();
  int measureCount=reportHandle.getMeasureCount();
  LevelViewHandle lastLevelHandle=getLastLevelViewHandle();
  for (int i=0; i < count; i++) {
    LevelViewHandle tempViewHandle=viewHandle.getLevel(i);
    if (tempViewHandle == lastLevelHandle) {
      continue;
    }
    LevelHandle tempHandle=tempViewHandle.getCubeLevel();
    for (int j=0; j < measureCount; j++) {
      AggregationDialog.SubTotalInfo info=new AggregationDialog.SubTotalInfo();
      info.setLevel(tempHandle);
      info.setAggregateOnMeasure(reportHandle.getMeasure(j).getCubeMeasure());
      retValue.add(info);
    }
  }
  count=viewHandle.getLevelCount();
  for (int i=0; i < count; i++) {
    LevelViewHandle tempViewHandle=viewHandle.getLevel(i);
    LevelHandle tempHandle=tempViewHandle.getCubeLevel();
    List measures=tempViewHandle.getAggregationMeasures();
    for (int j=0; j < measures.size(); j++) {
      MeasureHandle tempMeasureHandle=((MeasureViewHandle)measures.get(j)).getCubeMeasure();
      AggregationDialog.SubTotalInfo info=new AggregationDialog.SubTotalInfo();
      info.setLevel(tempHandle);
      info.setAggregateOnMeasure(tempMeasureHandle);
      info.setFunction(tempViewHandle.getAggregationFunction((MeasureViewHandle)measures.get(j)));
      replaceInfo(info,retValue);
    }
  }
  return retValue;
}

Fixed version (ground truth):
private List getSubTotalInfo(){
  List retValue=new ArrayList();
  DimensionViewHandle viewHandle=getDimensionViewHandle();
  CrosstabReportItemHandle reportHandle=viewHandle.getCrosstab();
  int count=viewHandle.getLevelCount();
  int measureCount=reportHandle.getMeasureCount();
  LevelViewHandle lastLevelHandle=getLastLevelViewHandle();
  for (int i=0; i < count; i++) {
    LevelViewHandle tempViewHandle=viewHandle.getLevel(i);
    if (tempViewHandle == lastLevelHandle) {
      continue;
    }
    LevelHandle tempHandle=tempViewHandle.getCubeLevel();
    for (int j=0; j < measureCount; j++) {
      AggregationDialog.SubTotalInfo info=new AggregationDialog.SubTotalInfo();
      info.setLevel(tempHandle);
      info.setAggregateOnMeasure(reportHandle.getMeasure(j).getCubeMeasure());
      retValue.add(info);
    }
  }
  count=viewHandle.getLevelCount();
  for (int i=0; i < count; i++) {
    LevelViewHandle tempViewHandle=viewHandle.getLevel(i);
    LevelHandle tempHandle=tempViewHandle.getCubeLevel();
    List measures=tempViewHandle.getAggregationMeasures();
    for (int j=0; j < measures.size(); j++) {
      MeasureHandle tempMeasureHandle=((MeasureViewHandle)measures.get(j)).getCubeMeasure();
      AggregationDialog.SubTotalInfo info=new AggregationDialog.SubTotalInfo();
      info.setLevel(tempHandle);
      info.setAggregateOnMeasure(tempMeasureHandle);
      info.setFunction(tempMeasureHandle.getFunction());
      replaceInfo(info,retValue);
    }
  }
  return retValue;
}
Program: 75610
Project: 75610
Buggy source:
public Object calculate(Object value) throws BirtException {
  if (value == null) {
    return new Double(-1);
  }
  double dValue=(DataTypeUtil.toDouble(value)).doubleValue();
  if (dValue < doubleStartValue) {
    return new Double(-1);
  }
 else {
    return new Double(Math.floor((dValue - doubleStartValue) / intervalRange));
  }
}

Fixed version (ground truth):
public Object calculate(Object value) throws BirtException {
  double dValue=-1;
  if (value != null)   dValue=(DataTypeUtil.toDouble(value)).doubleValue();
  if (dValue < doubleStartValue) {
    if (this.firstValue == Double.MIN_VALUE) {
      this.firstValue=dValue;
    }
    return new Double(this.firstValue);
  }
 else {
    return new Double(doubleStartValue + Math.floor((dValue - doubleStartValue) / intervalRange) * intervalRange);
  }
}
Program: 75611
Project: 75611
Buggy source:
public CubeQueryUtil(DataRequestSession session){
  this.session=session;
}

Fixed version (ground truth):
public CubeQueryUtil(DataRequestSessionImpl session){
  this.session=session;
}
Program: 75612
Project: 75612
Buggy source:
protected IContent doCreateContent(){
  return report.createContainerContent();
}

Fixed version (ground truth):
protected IContent doCreateContent(){
  return report.createListContent();
}