nus-yam/ex-repair huggingface dataset:
Program: 73487
Project: 73487
Buggy source:
protected IBaseResultSet doExecuteQuery(IBaseResultSet parentResultSet,IQueryDefinition query,boolean useCache) throws BirtException {
  IPreparedQuery pQuery=(IPreparedQuery)queryMap.get(query);
  if (pQuery == null) {
    return null;
  }
  Scriptable scope=context.getSharedScope();
  IBaseQueryResults dteResults=null;
  if (useCache) {
    dteResults=getCachedQueryResult(query);
  }
  if (dteResults == null) {
    if (parentResultSet == null) {
      dteResults=dteSession.execute(pQuery,null,scope);
    }
 else {
      dteResults=dteSession.execute(pQuery,parentResultSet.getQueryResults(),scope);
    }
    if (query.cacheQueryResults()) {
      cachedQueryToResults.put(query,dteResults.getID());
    }
  }
  if (parentResultSet == null) {
    return new QueryResultSet(this,context,query,(IQueryResults)dteResults);
  }
 else {
    return new QueryResultSet(this,context,parentResultSet,query,(IQueryResults)dteResults);
  }
}

Fixed version (ground truth):
protected IBaseResultSet doExecuteQuery(IBaseResultSet parentResultSet,IQueryDefinition query,boolean useCache) throws BirtException {
  IPreparedQuery pQuery=(IPreparedQuery)queryMap.get(query);
  if (pQuery == null) {
    return null;
  }
  Scriptable scope=context.getSharedScope();
  IBaseQueryResults dteResults=null;
  if (useCache) {
    dteResults=getCachedQueryResult(query,parentResultSet);
  }
  if (dteResults == null) {
    if (parentResultSet == null) {
      dteResults=dteSession.execute(pQuery,null,scope);
    }
 else {
      dteResults=dteSession.execute(pQuery,parentResultSet.getQueryResults(),scope);
    }
    putCachedQueryResult(query,dteResults.getID());
  }
  if (parentResultSet == null) {
    return new QueryResultSet(this,context,query,(IQueryResults)dteResults);
  }
 else {
    return new QueryResultSet(this,context,parentResultSet,query,(IQueryResults)dteResults);
  }
}
Program: 73489
Project: 73489
Buggy source:
private void addAggregateOn(ICubeQueryDefinition cubeQuery,CubeHandle cube,Binding binding,List lstAggOn) throws BirtException {
  for (Iterator iAggs=lstAggOn.iterator(); iAggs.hasNext(); ) {
    String aggOn=(String)iAggs.next();
    String[] levelNames=CubeUtil.splitLevelName(aggOn);
    String dimExpr=ExpressionUtil.createJSDimensionExpression(levelNames[0],levelNames[1]);
    binding.addAggregateOn(dimExpr);
    bindSeriesQuery(QueryImpl.create(dimExpr),cubeQuery,cube);
  }
}

Fixed version (ground truth):
private void addAggregateOn(Binding binding,List lstAggOn,ICubeQueryDefinition cubeQuery,CubeHandle cube) throws BirtException {
  for (Iterator iAggs=lstAggOn.iterator(); iAggs.hasNext(); ) {
    String aggOn=(String)iAggs.next();
    String[] levelNames=CubeUtil.splitLevelName(aggOn);
    String dimExpr=ExpressionUtil.createJSDimensionExpression(levelNames[0],levelNames[1]);
    binding.addAggregateOn(dimExpr);
    if (cubeQuery != null && cube != null) {
      bindSeriesQuery(QueryImpl.create(dimExpr),cubeQuery,cube);
    }
  }
}
Program: 73490
Project: 73490
Buggy source:
private void initBindings(ICubeQueryDefinition cubeQuery,CubeHandle cube) throws BirtException {
  for (Iterator bindings=ChartReportItemUtil.getAllColumnBindingsIterator(handle); bindings.hasNext(); ) {
    ComputedColumnHandle column=(ComputedColumnHandle)bindings.next();
    Binding binding=new Binding(column.getName());
    binding.setDataType(DataAdapterUtil.adaptModelDataType(column.getDataType()));
    binding.setExpression(new ScriptExpression(column.getExpression()));
    List lstAggOn=column.getAggregateOnList();
    if (!lstAggOn.isEmpty()) {
      addAggregateOn(cubeQuery,cube,binding,lstAggOn);
      binding.setAggrFunction(column.getAggregateFunction() == null ? null : DataAdapterUtil.adaptModelAggregationType(column.getAggregateFunction()));
    }
    registeredBindings.put(ExpressionUtil.createJSDataExpression(column.getName()),binding);
    registeredQueries.put(binding.getBindingName(),column.getExpression());
  }
}

Fixed version (ground truth):
private void initBindings(ICubeQueryDefinition cubeQuery,CubeHandle cube) throws BirtException {
  for (Iterator bindings=ChartReportItemUtil.getAllColumnBindingsIterator(handle); bindings.hasNext(); ) {
    ComputedColumnHandle column=(ComputedColumnHandle)bindings.next();
    Binding binding=new Binding(column.getName());
    binding.setDataType(DataAdapterUtil.adaptModelDataType(column.getDataType()));
    binding.setExpression(new ScriptExpression(column.getExpression()));
    List lstAggOn=column.getAggregateOnList();
    if (!lstAggOn.isEmpty()) {
      addAggregateOn(binding,lstAggOn,cubeQuery,cube);
      binding.setAggrFunction(column.getAggregateFunction() == null ? null : DataAdapterUtil.adaptModelAggregationType(column.getAggregateFunction()));
    }
    registeredBindings.put(ExpressionUtil.createJSDataExpression(column.getName()),binding);
    registeredQueries.put(binding.getBindingName(),column.getExpression());
  }
}
Program: 73491
Project: 73491
Buggy source:
public Object load(){
  if (DEUtil.getInputSize(input) != 1)   return null;
  DataSetHandle dataset=(DataSetHandle)((TabularCubeHandle)DEUtil.getInputFirstElement(input)).getDataSet();
  if (dataset != null)   return dataset.getName();
 else   return "String_Node_Str";
}

Fixed version (ground truth):
public Object load(){
  if (DEUtil.getInputSize(input) != 1)   return null;
  DataSetHandle dataset=((TabularCubeHandle)DEUtil.getInputFirstElement(input)).getDataSet();
  if (dataset != null)   return dataset.getName();
 else   return "String_Node_Str";
}
Program: 73492
Project: 73492
Buggy source:
private TreeItem getItem(String text){
  TreeItem topNode=(TreeItem)levelViewer.getTree().getItem(0);
  do {
    if (text.equals(topNode.getData()))     return topNode;
    topNode=topNode.getItem(0);
  }
 while (topNode.getItemCount() > 0);
  if (text.equals(topNode.getData()))   return topNode;
 else   return null;
}

Fixed version (ground truth):
private TreeItem getItem(String text){
  TreeItem topNode=levelViewer.getTree().getItem(0);
  do {
    if (text.equals(topNode.getData()))     return topNode;
    topNode=topNode.getItem(0);
  }
 while (topNode.getItemCount() > 0);
  if (text.equals(topNode.getData()))   return topNode;
 else   return null;
}
Program: 73493
Project: 73493
Buggy source:
private void initDialog(){
  nameText.setText(hierarchy.getContainer().getName());
  if (!isNew) {
    if (((DimensionHandle)hierarchy.getContainer()).isTimeType()) {
      dateButton.setSelection(true);
      handleButtonSelection(dateButton);
    }
 else {
      regularButton.setSelection(true);
      handleButtonSelection(regularButton);
    }
  }
 else {
    dateButton.setSelection(true);
    handleButtonSelection(dateButton);
  }
  if (!isNew) {
    WidgetUtil.setExcludeGridData(regularButton,true);
    WidgetUtil.setExcludeGridData(dateButton,true);
  }
  if (!isNew && !((DimensionHandle)hierarchy.getContainer()).isTimeType())   levelViewer.getTree().setVisible(false);
  levelViewer.setInput(getDateTypeNames(getLevelTypesByDateType()));
  levelViewer.expandAll();
  TreeItem topNode=(TreeItem)levelViewer.getTree().getItem(0);
  do {
    if (levelList.contains(topNode.getData()))     topNode.setChecked(true);
    topNode=topNode.getItem(0);
  }
 while (topNode.getItemCount() > 0);
  if (levelList.contains(topNode.getData()))   topNode.setChecked(true);
  checkOKButtonStatus();
}

Fixed version (ground truth):
private void initDialog(){
  nameText.setText(hierarchy.getContainer().getName());
  if (!isNew) {
    if (((DimensionHandle)hierarchy.getContainer()).isTimeType()) {
      dateButton.setSelection(true);
      handleButtonSelection(dateButton);
    }
 else {
      regularButton.setSelection(true);
      handleButtonSelection(regularButton);
    }
  }
 else {
    dateButton.setSelection(true);
    handleButtonSelection(dateButton);
  }
  if (!isNew) {
    WidgetUtil.setExcludeGridData(regularButton,true);
    WidgetUtil.setExcludeGridData(dateButton,true);
  }
  if (!isNew && !((DimensionHandle)hierarchy.getContainer()).isTimeType())   levelViewer.getTree().setVisible(false);
  levelViewer.setInput(getDateTypeNames(getLevelTypesByDateType()));
  levelViewer.expandAll();
  TreeItem topNode=levelViewer.getTree().getItem(0);
  do {
    if (levelList.contains(topNode.getData()))     topNode.setChecked(true);
    topNode=topNode.getItem(0);
  }
 while (topNode.getItemCount() > 0);
  if (levelList.contains(topNode.getData()))   topNode.setChecked(true);
  checkOKButtonStatus();
}
Program: 73494
Project: 73494
Buggy source:
public static String getType(Object val){
  if (val instanceof Number) {
    return Data.NUMBER;
  }
 else   if (val instanceof Date) {
    return Data.DATE;
  }
 else   if (val instanceof Calendar) {
    return Data.CALENDAR;
  }
 else   if (val instanceof CDateTime) {
    return Data.CDATETIME;
  }
 else {
    return Data.STRING;
  }
}

Fixed version (ground truth):
public static String getType(Object val){
  if (val instanceof Number) {
    if (isNumber(val.toString())) {
      return Data.NUMBER;
    }
 else {
      return Data.STRING;
    }
  }
 else   if (val instanceof Date) {
    return Data.DATE;
  }
 else   if (val instanceof Calendar) {
    return Data.CALENDAR;
  }
 else   if (val instanceof CDateTime) {
    return Data.CDATETIME;
  }
 else {
    return Data.STRING;
  }
}
Program: 73495
Project: 73495
Buggy source:
public static boolean isNumber(String val){
  NumberFormat nf=NumberFormat.getInstance();
  try {
    if (nf.parse(val).toString().length() == val.length()) {
      return true;
    }
 else {
      return false;
    }
  }
 catch (  Exception e) {
    return false;
  }
}

Fixed version (ground truth):
public static boolean isNumber(String val){
  try {
    new BigDecimal(val);
    return true;
  }
 catch (  Exception e) {
    return false;
  }
}
Program: 73496
Project: 73496
Buggy source:
/** 
 * @param aggregations
 * @param resultSet
 * @param levelFilterList
 * @throws DataException
 * @throws IOException
 */
private void applyAggrFilters(AggregationDefinition[] aggregations,IAggregationResultSet[] resultSet,List levelFilterList) throws DataException, IOException {
  for (Iterator i=aggrFilters.iterator(); i.hasNext(); ) {
    AggrFilterDefinition filter=(AggrFilterDefinition)i.next();
    for (int j=0; !isEmptyXtab && j < aggregations.length; j++) {
      if (aggregations[j].getAggregationFunctions() != null && FilterUtil.isEqualLevels(aggregations[j].getLevels(),filter.getAggrLevels())) {
        applyAggrFilter(aggregations,resultSet,j,filter,levelFilterList);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @param aggregations
 * @param resultSet
 * @param levelFilterList
 * @throws DataException
 * @throws IOException
 */
private void applyAggrFilters(AggregationDefinition[] aggregations,IAggregationResultSet[] resultSet,List levelFilterList) throws DataException, IOException {
  for (Iterator i=aggrFilters.iterator(); i.hasNext(); ) {
    AggrFilterDefinition filter=(AggrFilterDefinition)i.next();
    for (int j=0; !isEmptyXtab && j < aggregations.length; j++) {
      if (aggregations[j].getAggregationFunctions() != null && isMatch(aggregations[j],resultSet[j],filter)) {
        applyAggrFilter(resultSet[j],filter,levelFilterList);
      }
    }
  }
}
Program: 73500
Project: 73500
Buggy source:
/** 
 * @param rowEdgeList
 * @param columnEdgeList
 * @param target
 * @return
 * @throws AdapterException
 */
private static int getAxisQualifierEdgeType(List rowEdgeList,List columnEdgeList,DimensionLevel target) throws AdapterException {
  if (rowEdgeList != null) {
    for (Iterator i=rowEdgeList.iterator(); i.hasNext(); ) {
      String levelExpr=(String)i.next();
      DimensionLevel level=getTargetDimLevel(levelExpr);
      if (target.getDimensionName().equals(level.getDimensionName())) {
        return ICubeQueryDefinition.ROW_EDGE;
      }
    }
  }
  if (columnEdgeList != null) {
    for (Iterator i=columnEdgeList.iterator(); i.hasNext(); ) {
      String levelExpr=(String)i.next();
      DimensionLevel level=getTargetDimLevel(levelExpr);
      if (target.getDimensionName().equals(level.getDimensionName())) {
        return ICubeQueryDefinition.COLUMN_EDGE;
      }
    }
  }
  return -1;
}

Fixed version (ground truth):
/** 
 * @param rowEdgeList
 * @param columnEdgeList
 * @param target
 * @return
 * @throws AdapterException
 */
private static int getAxisQualifierEdgeType(List rowEdgeList,List columnEdgeList,DimensionLevel target) throws AdapterException {
  if (rowEdgeList != null) {
    for (Iterator i=rowEdgeList.iterator(); i.hasNext(); ) {
      String levelExpr=(String)i.next();
      DimensionLevel level=getTargetDimLevel(levelExpr);
      if (target.getDimensionName().equals(level.getDimensionName())) {
        return ICubeQueryDefinition.COLUMN_EDGE;
      }
    }
  }
  if (columnEdgeList != null) {
    for (Iterator i=columnEdgeList.iterator(); i.hasNext(); ) {
      String levelExpr=(String)i.next();
      DimensionLevel level=getTargetDimLevel(levelExpr);
      if (target.getDimensionName().equals(level.getDimensionName())) {
        return ICubeQueryDefinition.ROW_EDGE;
      }
    }
  }
  return -1;
}
Program: 73502
Project: 73502
Buggy source:
private void createMeasureMenu(IMenuManager menu,Object firstSelectedObj,IContributionItem beforeThis){
  DesignElementHandle element=null;
  String firstId=beforeThis.getId();
  if (firstSelectedObj instanceof DesignElementHandle) {
    element=(DesignElementHandle)firstSelectedObj;
  }
 else   if (firstSelectedObj instanceof CrosstabCellAdapter) {
    element=((CrosstabCellAdapter)firstSelectedObj).getDesignElementHandle();
  }
  if (element != null) {
    IAction action=new AddMesureViewHandleAction((DesignElementHandle)element);
    menu.insertBefore(firstId,action);
    action=new DeleteMeasureHandleAction((DesignElementHandle)element);
    menu.insertBefore(firstId,action);
  }
}

Fixed version (ground truth):
private void createMeasureMenu(IMenuManager menu,Object firstSelectedObj,IContributionItem beforeThis){
  DesignElementHandle element=null;
  String firstId=beforeThis.getId();
  if (firstSelectedObj instanceof DesignElementHandle) {
    element=(DesignElementHandle)firstSelectedObj;
  }
 else   if (firstSelectedObj instanceof CrosstabCellAdapter) {
    element=((CrosstabCellAdapter)firstSelectedObj).getDesignElementHandle();
  }
  if (element != null) {
    IAction action=new AddMesureViewHandleAction(element);
    menu.insertBefore(firstId,action);
    action=new DeleteMeasureHandleAction(element);
    menu.insertBefore(firstId,action);
  }
}
Program: 73503
Project: 73503
Buggy source:
private void createLevelMenu(IMenuManager menu,Object firstSelectedObj,IContributionItem beforeThis){
  DesignElementHandle element=null;
  if (firstSelectedObj instanceof DesignElementHandle) {
    element=(DesignElementHandle)firstSelectedObj;
  }
 else   if (firstSelectedObj instanceof CrosstabCellAdapter) {
    element=((CrosstabCellAdapter)firstSelectedObj).getDesignElementHandle();
  }
  String firstId=beforeThis.getId();
  if (element != null) {
    IAction action=new AddLevelHandleAction((DesignElementHandle)element);
    menu.insertBefore(firstId,action);
    action=new AddSubTotalAction((DesignElementHandle)element);
    menu.insertBefore(firstId,action);
    action=new DeleteDimensionViewHandleAction((DesignElementHandle)element);
    menu.insertBefore(firstId,action);
  }
}

Fixed version (ground truth):
private void createLevelMenu(IMenuManager menu,Object firstSelectedObj,IContributionItem beforeThis){
  DesignElementHandle element=null;
  if (firstSelectedObj instanceof DesignElementHandle) {
    element=(DesignElementHandle)firstSelectedObj;
  }
 else   if (firstSelectedObj instanceof CrosstabCellAdapter) {
    element=((CrosstabCellAdapter)firstSelectedObj).getDesignElementHandle();
  }
  String firstId=beforeThis.getId();
  if (element != null) {
    IAction action=new AddLevelHandleAction(element);
    menu.insertBefore(firstId,action);
    action=new AddSubTotalAction(element);
    menu.insertBefore(firstId,action);
    action=new DeleteDimensionViewHandleAction(element);
    menu.insertBefore(firstId,action);
  }
}
Program: 73504
Project: 73504
Buggy source:
/** 
 * @param levelExprList
 * @param result
 */
private static void populateLevels(List levelExprList,List result){
  for (Iterator i=levelExprList.iterator(); i.hasNext(); ) {
    String levelExpr=(String)i.next();
    result.add(getTargetLevel(levelExpr));
  }
}

Fixed version (ground truth):
/** 
 * @param levelExprList
 * @param result
 * @throws AdapterException 
 */
private static void populateLevels(List levelExprList,List result) throws AdapterException {
  for (Iterator i=levelExprList.iterator(); i.hasNext(); ) {
    String levelExpr=(String)i.next();
    result.add(getTargetDimLevel(levelExpr));
  }
}
Program: 73506
Project: 73506
Buggy source:
public String getDisplayLabel(Module module,int level){
  String displayLabel=super.getDisplayLabel(module,level);
  if (level == IDesignElementModel.FULL_LABEL) {
    String value=getStringProperty(module,IAutoTextModel.AUTOTEXT_TYPE_PROP);
    if (!StringUtil.isBlank(value)) {
      MetaDataDictionary dictionary=MetaDataDictionary.getInstance();
      IChoiceSet cSet=dictionary.getChoiceSet(DesignChoiceConstants.CHOICE_AUTO_TEXT_TYPE);
      IChoice choice=cSet.findChoice(value);
      if (choice != null) {
        value=choice.getDisplayName();
        value=limitStringLength(value);
        displayLabel+="String_Node_Str" + value + "String_Node_Str";
      }
    }
  }
  return displayLabel;
}

Fixed version (ground truth):
public String getDisplayLabel(Module module,int level){
  String displayLabel=super.getDisplayLabel(module,level);
  if (level == IDesignElementModel.FULL_LABEL) {
    String value=getStringProperty(module,IAutoTextModel.AUTOTEXT_TYPE_PROP);
    if (!StringUtil.isBlank(value)) {
      String rtnValue=getChoiceDisplayName(value);
      displayLabel+="String_Node_Str" + rtnValue + "String_Node_Str";
    }
  }
  return displayLabel;
}
Program: 73508
Project: 73508
Buggy source:
public void restoreView(AggregationCellHandle cell){
  try {
    Chart cm=ChartReportItemUtil.getChartFromHandle(getChartHandle(cell));
    ChartXTabUtil.removeAxisChartInXTab(cell,cm);
  }
 catch (  BirtException e) {
    ExceptionHandler.handle(e);
  }
}

Fixed version (ground truth):
public void restoreView(AggregationCellHandle cell){
  try {
    CrosstabCellHandle levelCell=ChartXTabUtil.getInnermostLevelCell(cell.getCrosstab(),ICrosstabConstants.ROW_AXIS_TYPE);
    if (levelCell != null) {
      cell.getCrosstab().setRowHeight(levelCell,null);
    }
    levelCell=ChartXTabUtil.getInnermostLevelCell(cell.getCrosstab(),ICrosstabConstants.COLUMN_AXIS_TYPE);
    if (levelCell != null) {
      cell.getCrosstab().setColumnWidth(levelCell,null);
    }
    Chart cm=ChartReportItemUtil.getChartFromHandle(getChartHandle(cell));
    ChartXTabUtil.removeAxisChartInXTab(cell,cm);
  }
 catch (  BirtException e) {
    ExceptionHandler.handle(e);
  }
}
Program: 73511
Project: 73511
Buggy source:
/** 
 * Check whether the command can be executed or not
 * @return true or false
 */
public boolean canExecute(){
  return super.canExecute() && ((ColumnHandle)handle).canDrop();
}

Fixed version (ground truth):
/** 
 * Check whether the command can be executed or not
 * @return true or false
 */
public boolean canExecute(){
  return super.canExecute() && handle.canDrop();
}
Program: 73512
Project: 73512
Buggy source:
/** 
 * Deletes the command
 * @param model the model
 */
public DeleteColumnCommand(Object model){
  Assert.isTrue(model instanceof ColumnHandle);
  this.handle=(ColumnHandle)model;
}

Fixed version (ground truth):
/** 
 * Deletes the command
 * @param model the model
 */
public DeleteColumnCommand(Object model){
}
Program: 73513
Project: 73513
Buggy source:
private boolean isExtendedCell(ExtendedItemHandle handle){
  return ((ExtendedItemHandle)handle).getExtensionName().indexOf("String_Node_Str") > -1;
}

Fixed version (ground truth):
private boolean isExtendedCell(ExtendedItemHandle handle){
  return handle.getExtensionName().indexOf("String_Node_Str") > -1;
}
Program: 73514
Project: 73514
Buggy source:
/** 
 * Check whether the command can be executed or not
 * @return true or false
 */
public boolean canExecute(){
  return super.canExecute() && ((RowHandle)handle).canDrop();
}

Fixed version (ground truth):
/** 
 * Check whether the command can be executed or not
 * @return true or false
 */
public boolean canExecute(){
  return super.canExecute() && handle.canDrop();
}
Program: 73515
Project: 73515
Buggy source:
/** 
 * Deletes the command
 * @param model the model
 */
public DeleteRowCommand(Object model){
  Assert.isTrue(model instanceof RowHandle);
  this.handle=(RowHandle)model;
}

Fixed version (ground truth):
/** 
 * Deletes the command
 * @param model the model
 */
public DeleteRowCommand(Object model){
}
Program: 73516
Project: 73516
Buggy source:
/** 
 * Get current eitor model
 * @param current The current editor model to set.
 * @param type	The type
 */
public void setCurrentEditorModel(Object current,String type){
  oldEditorModel=this.currentEditorModel;
  if (current == null || current instanceof LibraryHandle) {
    this.currentEditorModel=new LibRootModel(current);
  }
 else {
    this.currentEditorModel=current;
  }
  PropertyChangeEvent event=new PropertyChangeEvent(this,type,oldEditorModel,this.currentEditorModel);
  firePropertyChangeEvent(event);
}

Fixed version (ground truth):
/** 
 * Get current eitor model
 * @param current The current editor model to set.
 * @param type The type
 */
public void setCurrentEditorModel(Object current,String type){
  oldEditorModel=this.currentEditorModel;
  if (current == null || current instanceof LibraryHandle) {
    this.currentEditorModel=new LibRootModel(current);
  }
 else {
    this.currentEditorModel=current;
  }
  PropertyChangeEvent event=new PropertyChangeEvent(this,type,oldEditorModel,this.currentEditorModel);
  firePropertyChangeEvent(event);
}
Program: 73517
Project: 73517
Buggy source:
/** 
 * Gets the row number.
 * @return The row number.
 */
public int getRowNumber(){
  Assert.isLegal(getCellHandle().getContainer() instanceof RowHandle);
  return HandleAdapterFactory.getInstance().getRowHandleAdapter(getCellHandle().getContainer()).getRowNumber();
}

Fixed version (ground truth):
/** 
 * Gets the row number.
 * @return The row number.
 */
public int getRowNumber(){
}
Program: 73518
Project: 73518
Buggy source:
/** 
 * Gets the column number
 * @return The column number.
 */
public int getColumnNumber(){
  Assert.isLegal(getCellHandle().getContainer() instanceof RowHandle);
  if (getCellHandle().getColumn() == 0) {
    TableHandleAdapter adapt=HandleAdapterFactory.getInstance().getTableHandleAdapter(getTableParent());
    TableHandleAdapter.RowUIInfomation info=adapt.getRowInfo(getHandle().getContainer());
    return info.getAllChildren().indexOf(getHandle()) + 1;
  }
  return getCellHandle().getColumn();
}

Fixed version (ground truth):
/** 
 * Gets the column number
 * @return The column number.
 */
public int getColumnNumber(){
}
Program: 73519
Project: 73519
Buggy source:
/** 
 * Provides remove group function.
 * @param group
 * @throws SemanticException
 */
public void removeGroup(Object group) throws SemanticException {
  Assert.isLegal(group instanceof ListBandProxy);
  ((ListBandProxy)group).getElemtHandle().drop();
}

Fixed version (ground truth):
/** 
 * Provides remove group function.
 * @param group
 * @throws SemanticException
 */
public void removeGroup(Object group) throws SemanticException {
}
Program: 73521
Project: 73521
Buggy source:
public void setLength(long length) throws IOException {
  ensureSize(length);
  entry.setLength(length);
}

Fixed version (ground truth):
public synchronized void setLength(long length) throws IOException {
  ensureSize(length);
  entry.setLength(length);
}
Program: 73522
Project: 73522
Buggy source:
public int read(long pos,byte[] b,int off,int len) throws IOException {
  long length=entry.getLength();
  if (pos >= length) {
    return -1;
  }
  if (pos + len > length) {
    len=(int)(length - pos);
  }
  if (len == 0) {
    return 0;
  }
  int blockId=(int)(pos / BLOCK_SIZE);
  int blockOff=(int)(pos % BLOCK_SIZE);
  int readSize=BLOCK_SIZE - blockOff;
  if (len < readSize) {
    readSize=len;
  }
  int phyBlockId=index.getBlock(blockId);
  af.read(phyBlockId,blockOff,b,off,readSize);
  int remainSize=len - readSize;
  while (remainSize >= BLOCK_SIZE) {
    blockId++;
    phyBlockId=index.getBlock(blockId);
    af.read(phyBlockId,0,b,off + readSize,BLOCK_SIZE);
    readSize+=BLOCK_SIZE;
    remainSize-=BLOCK_SIZE;
  }
  if (remainSize > 0) {
    blockId++;
    phyBlockId=index.getBlock(blockId);
    af.read(phyBlockId,0,b,off + readSize,remainSize);
    readSize+=remainSize;
  }
  return readSize;
}

Fixed version (ground truth):
public synchronized int read(long pos,byte[] b,int off,int len) throws IOException {
  long length=entry.getLength();
  if (pos >= length) {
    return -1;
  }
  if (pos + len > length) {
    len=(int)(length - pos);
  }
  if (len == 0) {
    return 0;
  }
  int blockId=(int)(pos / BLOCK_SIZE);
  int blockOff=(int)(pos % BLOCK_SIZE);
  int readSize=BLOCK_SIZE - blockOff;
  if (len < readSize) {
    readSize=len;
  }
  int phyBlockId=index.getBlock(blockId);
  af.read(phyBlockId,blockOff,b,off,readSize);
  int remainSize=len - readSize;
  while (remainSize >= BLOCK_SIZE) {
    blockId++;
    phyBlockId=index.getBlock(blockId);
    af.read(phyBlockId,0,b,off + readSize,BLOCK_SIZE);
    readSize+=BLOCK_SIZE;
    remainSize-=BLOCK_SIZE;
  }
  if (remainSize > 0) {
    blockId++;
    phyBlockId=index.getBlock(blockId);
    af.read(phyBlockId,0,b,off + readSize,remainSize);
    readSize+=remainSize;
  }
  return readSize;
}
Program: 73523
Project: 73523
Buggy source:
public void flush() throws IOException {
}

Fixed version (ground truth):
public synchronized void flush() throws IOException {
}
Program: 73524
Project: 73524
Buggy source:
public long getLength() throws IOException {
  return entry.getLength();
}

Fixed version (ground truth):
public synchronized long getLength() throws IOException {
  return entry.getLength();
}
Program: 73525
Project: 73525
Buggy source:
public void refresh() throws IOException {
}

Fixed version (ground truth):
public synchronized void refresh() throws IOException {
}
Program: 73526
Project: 73526
Buggy source:
public void write(long pos,byte[] b,int off,int len) throws IOException {
  ensureSize(pos + len);
  if (len == 0) {
    return;
  }
  int blockId=(int)(pos / BLOCK_SIZE);
  int phyBlockId=index.getBlock(blockId);
  int blockOff=(int)(pos % BLOCK_SIZE);
  int writeSize=BLOCK_SIZE - blockOff;
  if (len < writeSize) {
    writeSize=len;
  }
  af.write(phyBlockId,blockOff,b,off,writeSize);
  int remainSize=len - writeSize;
  while (remainSize >= BLOCK_SIZE) {
    blockId++;
    phyBlockId=index.getBlock(blockId);
    af.write(phyBlockId,0,b,off + writeSize,BLOCK_SIZE);
    writeSize+=BLOCK_SIZE;
    remainSize-=BLOCK_SIZE;
  }
  if (remainSize > 0) {
    blockId++;
    phyBlockId=index.getBlock(blockId);
    af.write(phyBlockId,0,b,off + writeSize,remainSize);
  }
  long length=entry.getLength();
  long offset=pos + len;
  if (length < offset) {
    setLength(offset);
  }
}

Fixed version (ground truth):
public synchronized void write(long pos,byte[] b,int off,int len) throws IOException {
  ensureSize(pos + len);
  if (len == 0) {
    return;
  }
  int blockId=(int)(pos / BLOCK_SIZE);
  int phyBlockId=index.getBlock(blockId);
  int blockOff=(int)(pos % BLOCK_SIZE);
  int writeSize=BLOCK_SIZE - blockOff;
  if (len < writeSize) {
    writeSize=len;
  }
  af.write(phyBlockId,blockOff,b,off,writeSize);
  int remainSize=len - writeSize;
  while (remainSize >= BLOCK_SIZE) {
    blockId++;
    phyBlockId=index.getBlock(blockId);
    af.write(phyBlockId,0,b,off + writeSize,BLOCK_SIZE);
    writeSize+=BLOCK_SIZE;
    remainSize-=BLOCK_SIZE;
  }
  if (remainSize > 0) {
    blockId++;
    phyBlockId=index.getBlock(blockId);
    af.write(phyBlockId,0,b,off + writeSize,remainSize);
  }
  long length=entry.getLength();
  long offset=pos + len;
  if (length < offset) {
    setLength(offset);
  }
}
Program: 73527
Project: 73527
Buggy source:
public boolean removeEntry(String name) throws IOException {
  assertWritable();
  if (!name.startsWith(ArchiveUtil.UNIX_SEPERATOR))   name=ArchiveUtil.UNIX_SEPERATOR + name;
  ArchiveEntryV2 entry=(ArchiveEntryV2)entries.get(name);
  if (entry != null) {
    entries.remove(name);
    entryTbl.removeEntry(entry.entry);
    if (entry.index != null) {
      allocTbl.removeEntry(entry.index);
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
public synchronized boolean removeEntry(String name) throws IOException {
  assertWritable();
  if (!name.startsWith(ArchiveUtil.UNIX_SEPERATOR))   name=ArchiveUtil.UNIX_SEPERATOR + name;
  ArchiveEntryV2 entry=(ArchiveEntryV2)entries.get(name);
  if (entry != null) {
    entries.remove(name);
    entryTbl.removeEntry(entry.entry);
    if (entry.index != null) {
      allocTbl.removeEntry(entry.index);
    }
    return true;
  }
  return false;
}
Program: 73528
Project: 73528
Buggy source:
public void save() throws IOException {
  assertWritable();
  if (isTransient) {
    isTransient=false;
  }
  flush();
}

Fixed version (ground truth):
public synchronized void save() throws IOException {
  assertWritable();
  if (isTransient) {
    isTransient=false;
  }
  flush();
}
Program: 73529
Project: 73529
Buggy source:
public ArchiveEntry getEntry(String name){
  return (ArchiveEntry)entries.get(name);
}

Fixed version (ground truth):
public synchronized ArchiveEntry getEntry(String name){
  return (ArchiveEntry)entries.get(name);
}
Program: 73530
Project: 73530
Buggy source:
/** 
 * close the archive. all changed data will be flushed into disk if the file is opened for write. the file will be removed if it is opend as transient. after close, the instance can't be used any more.
 * @throws IOException
 */
public void close() throws IOException {
  if (isWritable) {
    head.setStatus(FILE_STATUS_FINISHED);
    if (!isTransient) {
      flush();
    }
  }
  if (rf != null) {
    rf.close();
    rf=null;
  }
  if (isTransient) {
    new File(archiveName).delete();
  }
  caches.reset();
  isClosed=true;
}

Fixed version (ground truth):
/** 
 * close the archive. all changed data will be flushed into disk if the file is opened for write. the file will be removed if it is opend as transient. after close, the instance can't be used any more.
 * @throws IOException
 */
public synchronized void close() throws IOException {
  if (isWritable) {
    head.setStatus(FILE_STATUS_FINISHED);
    if (!isTransient) {
      flush();
    }
  }
  if (rf != null) {
    rf.close();
    rf=null;
  }
  if (isTransient) {
    new File(archiveName).delete();
  }
  caches.reset();
  isClosed=true;
}
Program: 73531
Project: 73531
Buggy source:
public List listEntries(String namePattern){
  ArrayList list=new ArrayList();
  Iterator iter=entries.keySet().iterator();
  while (iter.hasNext()) {
    String name=(String)iter.next();
    if (namePattern == null || name.startsWith(namePattern)) {
      list.add(name);
    }
  }
  return list;
}

Fixed version (ground truth):
public synchronized List listEntries(String namePattern){
  ArrayList list=new ArrayList();
  Iterator iter=entries.keySet().iterator();
  while (iter.hasNext()) {
    String name=(String)iter.next();
    if (namePattern == null || name.startsWith(namePattern)) {
      list.add(name);
    }
  }
  return list;
}
Program: 73532
Project: 73532
Buggy source:
public ArchiveEntry createEntry(String name) throws IOException {
  assertWritable();
  if (!name.startsWith(ArchiveUtil.UNIX_SEPERATOR))   name=ArchiveUtil.UNIX_SEPERATOR + name;
  ArchiveEntry entry=(ArchiveEntry)entries.get(name);
  if (entry != null) {
    entry.setLength(0L);
    return entry;
  }
  NameEntry nameEnt=entryTbl.createEntry(name);
  entry=new ArchiveEntryV2(this,nameEnt);
  entries.put(name,entry);
  return entry;
}

Fixed version (ground truth):
public synchronized ArchiveEntry createEntry(String name) throws IOException {
  assertWritable();
  if (!name.startsWith(ArchiveUtil.UNIX_SEPERATOR))   name=ArchiveUtil.UNIX_SEPERATOR + name;
  ArchiveEntry entry=(ArchiveEntry)entries.get(name);
  if (entry != null) {
    entry.setLength(0L);
    return entry;
  }
  NameEntry nameEnt=entryTbl.createEntry(name);
  entry=new ArchiveEntryV2(this,nameEnt);
  entries.put(name,entry);
  return entry;
}
Program: 73533
Project: 73533
Buggy source:
public boolean exists(String name){
  return entries.containsKey(name);
}

Fixed version (ground truth):
public synchronized boolean exists(String name){
  return entries.containsKey(name);
}
Program: 73534
Project: 73534
Buggy source:
public void startData(IDataContent data){
  super.startData(data);
  HyperlinkDef url=parseHyperLink(data);
  BookmarkDef bookmark=getBookmark(data);
  if (((StyledElementDesign)data.getGenerateBy()).getMap() != null && ((StyledElementDesign)data.getGenerateBy()).getMap().getRuleCount() > 0) {
    engine.addData(data.getText().trim(),data.getComputedStyle(),url,bookmark);
  }
 else   if (!ExcelUtil.getType(data.getValue()).equals(Data.NUMBER)) {
    engine.addData(data.getText(),data.getComputedStyle(),url,bookmark);
  }
 else {
    engine.addData(data.getValue(),data.getComputedStyle(),url,bookmark);
  }
}

Fixed version (ground truth):
public void startData(IDataContent data){
  super.startData(data);
  HyperlinkDef url=parseHyperLink(data);
  BookmarkDef bookmark=getBookmark(data);
  if (((StyledElementDesign)data.getGenerateBy()).getMap() != null && ((StyledElementDesign)data.getGenerateBy()).getMap().getRuleCount() > 0 && data.getLabelText() != null) {
    engine.addData(data.getLabelText().trim(),data.getComputedStyle(),url,bookmark);
  }
 else   if (!ExcelUtil.getType(data.getValue()).equals(Data.NUMBER)) {
    engine.addData(data.getText(),data.getComputedStyle(),url,bookmark);
  }
 else {
    engine.addData(data.getValue(),data.getComputedStyle(),url,bookmark);
  }
}
Program: 73535
Project: 73535
Buggy source:
private String getExpression(Control control){
  if (control instanceof Text) {
    return ((Text)control).getText();
  }
  if (control instanceof Combo) {
    Combo c=((Combo)control);
    if (c.getSelectionIndex() >= 0) {
      Object value=((Object[])c.getData())[c.getSelectionIndex()];
      if (value instanceof String) {
        return (String)value;
      }
 else       if (value instanceof ColumnBindingInfo) {
        ColumnBindingInfo chi=(ColumnBindingInfo)value;
        return chi.getExpression();
      }
    }
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
private String getExpression(Control control){
  return ChartUIUtil.getActualExpression(control);
}
Program: 73536
Project: 73536
Buggy source:
public void modifyText(ModifyEvent e){
  if (e.getSource().equals(getInputControl())) {
    isQueryModified=true;
    getInputControl().setToolTipText(getTooltipForDataText(getExpression(getInputControl())));
  }
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
  if (e.getSource().equals(getInputControl())) {
    isQueryModified=true;
    setTooltipForInputControl();
  }
}
Program: 73538
Project: 73538
Buggy source:
public void updateQuery(Control control){
  if (textCollection.containsKey(control)) {
    Query query=(Query)textCollection.get(control);
    query.setDefinition(getText(control));
    adjustScaleData(query);
    ColorPalette.getInstance().putColor(getText(control));
    control.setBackground(ColorPalette.getInstance().getColor(getText(control)));
  }
}

Fixed version (ground truth):
public void updateQuery(Control control){
  if (textCollection.containsKey(control)) {
    Query query=(Query)textCollection.get(control);
    query.setDefinition(ChartUIUtil.getActualExpression(control));
    adjustScaleData(query);
    ColorPalette.getInstance().putColor(getText(control));
    control.setBackground(ColorPalette.getInstance().getColor(getText(control)));
  }
}
Program: 73539
Project: 73539
Buggy source:
private void setText(Control control,String text){
  if (control instanceof Text) {
    ((Text)control).setText(text);
  }
 else   if (control instanceof Combo) {
    Object[] data=(Object[])control.getData();
    if (data != null && data.length > 0 && data[0] instanceof ColumnBindingInfo) {
      for (int i=0; i < data.length; i++) {
        if (((ColumnBindingInfo)data[i]).getExpression().equals(text)) {
          String expr=ExpressionUtil.createJSRowExpression(((ColumnBindingInfo)data[i]).getName());
          ((Combo)control).setText(expr);
          break;
        }
      }
    }
 else {
      ((Combo)control).setText(text);
    }
  }
}

Fixed version (ground truth):
private void setText(Control control,String expression){
  if (control instanceof Text) {
    ((Text)control).setText(expression);
  }
 else   if (control instanceof Combo) {
    Object[] data=(Object[])control.getData();
    if (data != null && data.length > 0 && data[0] instanceof ColumnBindingInfo) {
      for (int i=0; i < data.length; i++) {
        if (((ColumnBindingInfo)data[i]).getExpression().equals(expression)) {
          String txt=ExpressionUtil.createJSRowExpression(((ColumnBindingInfo)data[i]).getName());
          ((Combo)control).setText(txt);
          return;
        }
      }
    }
    ((Combo)control).setText(expression);
  }
}
Program: 73540
Project: 73540
Buggy source:
/** 
 * Make a multi-pass to a filter that needs multipass, meanly TopN and BottomN.The pass actually contains two steps. 1.FIRST PASS: in this step we just go through all result rows and make preparation work for the second step 2.SECOND PASS: in this step the rows that are not qualified is filtered out
 * @param filterPass
 * @param stopSign
 * @throws DataException
 */
private void makeMultiPassToFilter(FilterPassController filterPass,StopSign stopSign) throws DataException {
  int max=populator.getQuery().getMaxRows();
  populator.getQuery().setMaxRows(0);
  ResultSetCache sCache=populator.getCache();
  makeFirstPassToMultiPassFilter(filterPass,stopSign);
  populator.setCache(sCache);
  sCache.reset();
  sCache.next();
  makeSecondPassToMultiPassFilter(filterPass,stopSign);
  Iterator filterIt=filterByRow.getFilterList().iterator();
  while (filterIt.hasNext()) {
    IFilterDefinition fd=(IFilterDefinition)filterIt.next();
    if (FilterUtil.isFilterNeedMultiPass(fd)) {
      fd.getExpression().setHandle(null);
    }
  }
  filterPass.setSecondPassRowCount(0);
  populator.getQuery().setMaxRows(max);
}

Fixed version (ground truth):
/** 
 * Make a multi-pass to a filter that needs multipass, meanly TopN and BottomN.The pass actually contains two steps. 1.FIRST PASS: in this step we just go through all result rows and make preparation work for the second step 2.SECOND PASS: in this step the rows that are not qualified is filtered out
 * @param filterPass
 * @param stopSign
 * @throws DataException
 */
private void makeMultiPassToFilter(FilterPassController filterPass,StopSign stopSign) throws DataException {
  int max=populator.getQuery().getMaxRows();
  populator.getQuery().setMaxRows(0);
  ResultSetCache sCache=populator.getCache();
  makeFirstPassToMultiPassFilter(filterPass,stopSign);
  populator.setCache(sCache);
  sCache.reset();
  sCache.next();
  populator.getQuery().setMaxRows(max);
  makeSecondPassToMultiPassFilter(filterPass,stopSign);
  Iterator filterIt=filterByRow.getFilterList().iterator();
  while (filterIt.hasNext()) {
    IFilterDefinition fd=(IFilterDefinition)filterIt.next();
    if (FilterUtil.isFilterNeedMultiPass(fd)) {
      fd.getExpression().setHandle(null);
    }
  }
  filterPass.setSecondPassRowCount(0);
}
Program: 73542
Project: 73542
Buggy source:
public void modifyText(ModifyEvent e){
  this.bTextModified=true;
  fireEvent();
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
  this.bTextModified=true;
  fireEvent(true);
}
Program: 73543
Project: 73543
Buggy source:
public void modifyText(ModifyEvent e){
  if (e.widget.equals(txtWrapping)) {
    getBlockForProcessing().setWrappingSize(txtWrapping.getValue());
  }
 else   if (e.widget.equals(txtMaxPercent)) {
    getBlockForProcessing().setMaxPercent(txtMaxPercent.getValue());
  }
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
  if (e.widget.equals(txtWrapping)) {
    getBlockForProcessing().setWrappingSize(txtWrapping.getValue());
  }
 else   if (e.widget.equals(txtMaxPercent)) {
    if (e.data != null && ((Boolean)e.data).booleanValue()) {
      getBlockForProcessing().setMaxPercent(txtMaxPercent.getValue());
    }
  }
}
Program: 73544
Project: 73544
Buggy source:
private String getLabel(Object obj){
  Object ownerModel=getOwner().getModel();
  if (ownerModel == obj) {
    return ((ReportElementEditPart)getOwner()).getGuideLabel();
  }
  Object[] objs=ElementAdapterManager.getAdapters(getOwner().getModel(),IReportItemViewProvider.class);
  if (objs != null) {
    return ((IReportItemViewProvider)objs[0]).getViewName();
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
private String getLabel(Object obj){
  Object ownerModel=getOwner().getModel();
  if (ownerModel == obj) {
    return ProviderFactory.createProvider(obj).getNodeDisplayName(obj);
  }
  Object[] objs=ElementAdapterManager.getAdapters(getOwner().getModel(),IReportItemViewProvider.class);
  if (objs != null) {
    return ((IReportItemViewProvider)objs[0]).getViewName();
  }
  return "String_Node_Str";
}
Program: 73545
Project: 73545
Buggy source:
private Image getIamge(Object obj){
  if (obj instanceof TableHandle) {
    return ReportPlatformUIImages.getImage(IReportGraphicConstants.ICON_ELEMENT_TABLE);
  }
  return null;
}

Fixed version (ground truth):
private Image getIamge(Object obj){
  if (obj instanceof TableHandle) {
    return ReportPlatformUIImages.getImage(IReportGraphicConstants.ICON_ELEMENT_TABLE);
  }
  Object ownerModel=getOwner().getModel();
  if (ownerModel == obj) {
    return ProviderFactory.createProvider(obj).getNodeIcon(obj);
  }
  return null;
}
Program: 73546
Project: 73546
Buggy source:
public Object evaluate(IBaseExpression expr) throws BirtException {
  if (expr instanceof IScriptExpression) {
    return context.evaluate(((IScriptExpression)expr).getText());
  }
  if (expr instanceof IConditionalExpression) {
    return context.evaluateCondExpr((IConditionalExpression)expr);
  }
  return null;
}

Fixed version (ground truth):
public Object evaluate(IBaseExpression expr) throws BirtException {
  IBaseResultSet oldRSet=context.getResultSet();
  if (oldRSet != this) {
    context.setResultSet(this);
  }
  Object result=null;
  if (expr instanceof IScriptExpression) {
    result=context.evaluate(((IScriptExpression)expr).getText());
  }
 else   if (expr instanceof IConditionalExpression) {
    result=context.evaluateCondExpr((IConditionalExpression)expr);
  }
  if (oldRSet != this) {
    context.setResultSet(oldRSet);
  }
  return result;
}
Program: 73547
Project: 73547
Buggy source:
public IBaseResultSet execute(IBaseResultSet parent,IDataQueryDefinition query,boolean useCache) throws BirtException {
  if (query instanceof ISubqueryDefinition) {
    if (parent == null) {
      return null;
    }
 else     if (parent instanceof ICubeResultSet) {
      throw new EngineException("String_Node_Str" + ((ISubqueryDefinition)query).getName());
    }
    return doExecuteSubQuery((IQueryResultSet)parent,(ISubqueryDefinition)query);
  }
 else   if (query instanceof IQueryDefinition) {
    return doExecuteQuery(parent,(IQueryDefinition)query,useCache);
  }
 else   if (query instanceof ICubeQueryDefinition) {
    return doExecuteCube(parent,(ICubeQueryDefinition)query,useCache);
  }
  throw new EngineException("String_Node_Str" + query.getClass().getName());
}

Fixed version (ground truth):
public IBaseResultSet execute(IBaseResultSet parent,IDataQueryDefinition query,boolean useCache) throws BirtException {
  if (query instanceof ISubqueryDefinition) {
    if (parent == null) {
      return null;
    }
 else     if (parent instanceof ICubeResultSet) {
      throw new EngineException("String_Node_Str" + ((ISubqueryDefinition)query).getName());
    }
    return doExecuteSubQuery((IQueryResultSet)parent,(ISubqueryDefinition)query);
  }
 else   if (query instanceof IQueryDefinition) {
    return doExecuteQuery(parent,(IQueryDefinition)query,useCache);
  }
 else   if (query instanceof ICubeQueryDefinition) {
    return doExecuteCube(parent,(ICubeQueryDefinition)query,useCache);
  }
 else   if (query instanceof ISubCubeQueryDefinition) {
    doExecuteSubCubeQuery((ICubeResultSet)parent,(ISubCubeQueryDefinition)query);
  }
  throw new EngineException("String_Node_Str" + query.getClass().getName());
}
Program: 73548
Project: 73548
Buggy source:
public CubeResultSet(IDataEngine dataEngine,ExecutionContext context,IBaseResultSet parent,ICubeQueryDefinition queryDefn,ICubeQueryResults rsets) throws BirtException {
}

Fixed version (ground truth):
public CubeResultSet(IDataEngine dataEngine,ExecutionContext context,IBaseResultSet parent,ISubCubeQueryDefinition queryDefn,ICubeQueryResults rsets) throws BirtException {
}
Program: 73549
Project: 73549
Buggy source:
/** 
 * When cache option is true, user needs to specify how many rows will be retrieved into cache for use.
 * @return cache row count
 */
public abstract int getCacheRowCount();

Fixed version (ground truth):
/** 
 * When cache option is true, user needs to specify how many rows will be retrieved into cache for use.
 * @deprecated
 * @return cache row count
 */
public abstract int getCacheRowCount();
Program: 73550
Project: 73550
Buggy source:
/** 
 * @return cache row count
 */
public int getCacheRowCount(){
  return cacheRowCount;
}

Fixed version (ground truth):
/** 
 * @deprecated
 * @return cache row count
 */
public int getCacheRowCount(){
  return cacheRowCount;
}
Program: 73551
Project: 73551
Buggy source:
/** 
 * @param cacheRowCount
 */
public void setCacheRowCount(int cacheRowCount){
  this.cacheRowCount=cacheRowCount;
}

Fixed version (ground truth):
/** 
 * @deprecated
 * @param cacheRowCount
 */
public void setCacheRowCount(int cacheRowCount){
  this.cacheRowCount=cacheRowCount;
}
Program: 73552
Project: 73552
Buggy source:
/** 
 * construction
 */
CacheMapManager(String tempDir,boolean useJVMLevelCache){
  this.tempDir=tempDir;
  if (useJVMLevelCache) {
    cacheMap=JVMLevelCacheMap;
  }
 else {
    cacheMap=new HashMap();
  }
}

Fixed version (ground truth):
/** 
 * construction
 */
CacheMapManager(boolean useJVMLevelCache){
  if (useJVMLevelCache) {
    cacheMap=JVMLevelCacheMap;
  }
 else {
    cacheMap=new HashMap();
  }
}
Program: 73553
Project: 73553
Buggy source:
/** 
 * @param dsAndDs
 * @return
 */
boolean doesLoadFromCache(DataSourceAndDataSet dsAndDs){
  Object cacheObject=null;
synchronized (cacheMap) {
    cacheObject=cacheMap.get(dsAndDs);
  }
  if (cacheObject != null) {
    return (cacheObject instanceof IncreDataSetCacheObject) ? true : !needSaveToCache(cacheObject);
  }
  return false;
}

Fixed version (ground truth):
/** 
 * @param dsAndDs
 * @return
 */
boolean doesLoadFromCache(DataSourceAndDataSet dsAndDs,int requiredCapability){
synchronized (cacheMap) {
    IDataSetCacheObject cacheObject=(IDataSetCacheObject)cacheMap.get(dsAndDs);
    if (cacheObject != null) {
      return cacheObject.isCachedDataReusable(requiredCapability);
    }
 else {
      return false;
    }
  }
}