nus-yam/ex-repair huggingface dataset:
Program: 66910
Project: 66910
Buggy source:
private void createInfomation(Composite parent){
  Font font=parent.getFont();
  Composite continer=createComposite(parent,font,2,2,GridData.FILL_BOTH,0,0);
  continer.setBackground(fBackgroundColor);
  IReportDocument document=null;
  try {
    document=engine.openReportDocument(getFileName());
    Label nameScript=createScriptgLabel(continer,Messages.getString("String_Node_Str"));
    Label name=createScriptgLabel(continer,document.getName());
    Label versionScript=createScriptgLabel(continer,Messages.getString("String_Node_Str"));
    Label version=createScriptgLabel(continer,document.getVersion());
    Label pageCountScript=createScriptgLabel(continer,Messages.getString("String_Node_Str"));
    Label pageCount=createScriptgLabel(continer,"String_Node_Str" + document.getPageCount());
  }
 catch (  EngineException e) {
    this.e=e;
    createErrorControl(continer);
  }
 finally {
    if (document != null) {
      document.close();
    }
  }
}

Fixed version (ground truth):
private void createInfomation(Composite parent){
  Font font=parent.getFont();
  Composite continer=createComposite(parent,font,2,2,GridData.FILL_BOTH,0,0);
  continer.setBackground(fBackgroundColor);
  IReportDocument document=null;
  try {
    document=engine.openReportDocument(getFileName());
    createScriptgLabel(continer,Messages.getString("String_Node_Str"));
    createScriptgLabel(continer,document.getName());
    createScriptgLabel(continer,Messages.getString("String_Node_Str"));
    createScriptgLabel(continer,document.getVersion());
    createScriptgLabel(continer,Messages.getString("String_Node_Str"));
    createScriptgLabel(continer,"String_Node_Str" + document.getPageCount());
  }
 catch (  EngineException e) {
    this.e=e;
    createErrorControl(continer);
  }
 finally {
    if (document != null) {
      document.close();
    }
  }
}
Program: 66911
Project: 66911
Buggy source:
protected Dimension calculatePreferredSize(IFigure container,int wHint,int hHint){
  Rectangle rect=container.getParent().getClientArea().getCopy();
  List list=container.getChildren();
  if (list.size() == 0) {
    return Dimension.SINGLETON;
  }
  Figure child=(Figure)list.get(0);
  Dimension dim=new Dimension();
  wHint=Math.max(-1,wHint - container.getInsets().getWidth());
  hHint=Math.max(-1,hHint - container.getInsets().getHeight());
  wHint=Math.max(wHint,rect.width - container.getInsets().getWidth());
  hHint=Math.max(hHint,rect.height - container.getInsets().getHeight());
  if (child instanceof TableFigure && needlayout) {
    IFigure tablePane=((LayeredPane)((LayeredPane)((TableFigure)child).getContents()).getLayer(LayerConstants.PRINTABLE_LAYERS)).getLayer(LayerConstants.PRIMARY_LAYER);
    LayoutManager layoutManager=tablePane.getLayoutManager();
    ((TableLayout)layoutManager).markDirty();
    container.getBounds().width=wHint;
    container.getBounds().height=hHint;
    child.validate();
    needlayout=false;
  }
  dim=child.getPreferredSize(wHint,hHint).expand(container.getInsets().getWidth(),container.getInsets().getHeight());
  return dim;
}

Fixed version (ground truth):
protected Dimension calculatePreferredSize(IFigure container,int wHint,int hHint){
  Rectangle rect=container.getParent().getClientArea().getCopy();
  List list=container.getChildren();
  if (list.size() == 0) {
    return Dimension.SINGLETON;
  }
  Figure child=(Figure)list.get(0);
  wHint=Math.max(-1,wHint - container.getInsets().getWidth());
  hHint=Math.max(-1,hHint - container.getInsets().getHeight());
  wHint=Math.max(wHint,rect.width - container.getInsets().getWidth());
  hHint=Math.max(hHint,rect.height - container.getInsets().getHeight());
  if (child instanceof TableFigure && needlayout) {
    IFigure tablePane=((LayeredPane)((LayeredPane)((TableFigure)child).getContents()).getLayer(LayerConstants.PRINTABLE_LAYERS)).getLayer(LayerConstants.PRIMARY_LAYER);
    LayoutManager layoutManager=tablePane.getLayoutManager();
    ((TableLayout)layoutManager).markDirty();
    container.getBounds().width=wHint;
    container.getBounds().height=hHint;
    child.validate();
    needlayout=false;
  }
  Dimension dim=child.getPreferredSize(wHint,hHint).expand(container.getInsets().getWidth(),container.getInsets().getHeight());
  return dim;
}
Program: 66912
Project: 66912
Buggy source:
public void widgetSelected(SelectionEvent e){
  String eText=e.text;
  ValueCombo combo=(ValueCombo)e.widget;
  String comboText=combo.getText();
  if (!selected) {
    return;
  }
  selected=false;
  int index=combo.indexOf(comboText);
  if (index >= 0) {
    if (oldValueList.size() > 0) {
      oldValue=oldValueList.get(0);
      oldValueList.clear();
    }
    ISelection action=actionMap.get(index);
    if (action == null) {
      oldValue=comboText;
      oldValueList.add(oldValue);
      return;
    }
    String text=null;
    if (action instanceof ISelection2) {
      text=((ISelection2)action).doSelection(oldValue,index,comboText);
    }
 else     if (action instanceof ISelection) {
      text=action.doSelection(oldValue);
    }
    if (text != null) {
      oldValue=text;
    }
    oldValueList.add(oldValue);
    combo.select(-1);
    combo.setText(oldValue);
  }
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  String eText=e.text;
  ValueCombo combo=(ValueCombo)e.widget;
  String comboText=combo.getText();
  if (!selected) {
    return;
  }
  selected=false;
  int index=combo.indexOf(comboText);
  if (index >= 0) {
    if (oldValueList.size() > 0) {
      oldValue=oldValueList.get(0);
      oldValueList.clear();
    }
    ISelection action=actionMap.get(index);
    if (action == null) {
      oldValue=comboText;
      oldValueList.add(oldValue);
      return;
    }
    String text=null;
    if (action instanceof ISelection2) {
      text=((ISelection2)action).doSelection(oldValue,index,comboText);
    }
 else {
      text=action.doSelection(oldValue);
    }
    if (text != null) {
      oldValue=text;
    }
    oldValueList.add(oldValue);
    combo.select(-1);
    combo.setText(oldValue);
  }
}
Program: 66913
Project: 66913
Buggy source:
/** 
 * This method is called upon plug-in activation.
 * @param context bundle context
 * @exception Exception
 */
public void start(BundleContext context) throws Exception {
  super.start(context);
  bundleContext=context;
  plugin.getPluginPreferences().setDefault(WebViewer.MASTER_PAGE_CONTENT,true);
  plugin.getPluginPreferences().setDefault(WebViewer.PREVIEW_MAXROW,DEFAULT_MAX_ROWS);
  plugin.getPluginPreferences().setDefault(WebViewer.PREVIEW_MAXCUBEROWLEVEL,DEFAULT_MAX_CUBEROWLEVELS);
  plugin.getPluginPreferences().setDefault(WebViewer.PREVIEW_MAXCUBECOLUMNLEVEL,DEFAULT_MAX_CUBECOLUMNLEVELS);
  plugin.getPluginPreferences().setDefault(WebViewer.PREVIEW_MAXINMEMORYCUBESIZE,DEFAULT_MAX_IN_MEMORY_CUBE_SIZE);
  plugin.getPluginPreferences().setDefault(WebViewer.USER_LOCALE,ULocale.getDefault().getDisplayName());
  plugin.getPluginPreferences().setDefault(WebViewer.USER_TIME_ZONE,TimeZone.getDefault().getID());
  plugin.getPluginPreferences().setDefault(WebViewer.BIDI_ORIENTATION,WebViewer.BIDI_ORIENTATION_AUTO);
  if (plugin.getStateLocation() != null)   System.setProperty(BIRT_VIEWER_WORKING_PATH,plugin.getStateLocation().toOSString());
  String rootPath=getFilePath("String_Node_Str");
  if (rootPath != null)   System.setProperty(BIRT_VIEWER_ROOT_PATH,rootPath);
  System.setProperty(BIRT_IS_DESIGNER,"String_Node_Str");
  IWebAppInfo dummy=WebViewer.getCurrentWebApp();
}

Fixed version (ground truth):
/** 
 * This method is called upon plug-in activation.
 * @param context bundle context
 * @exception Exception
 */
public void start(BundleContext context) throws Exception {
  super.start(context);
  bundleContext=context;
  plugin.getPluginPreferences().setDefault(WebViewer.MASTER_PAGE_CONTENT,true);
  plugin.getPluginPreferences().setDefault(WebViewer.PREVIEW_MAXROW,DEFAULT_MAX_ROWS);
  plugin.getPluginPreferences().setDefault(WebViewer.PREVIEW_MAXCUBEROWLEVEL,DEFAULT_MAX_CUBEROWLEVELS);
  plugin.getPluginPreferences().setDefault(WebViewer.PREVIEW_MAXCUBECOLUMNLEVEL,DEFAULT_MAX_CUBECOLUMNLEVELS);
  plugin.getPluginPreferences().setDefault(WebViewer.PREVIEW_MAXINMEMORYCUBESIZE,DEFAULT_MAX_IN_MEMORY_CUBE_SIZE);
  plugin.getPluginPreferences().setDefault(WebViewer.USER_LOCALE,ULocale.getDefault().getDisplayName());
  plugin.getPluginPreferences().setDefault(WebViewer.USER_TIME_ZONE,TimeZone.getDefault().getID());
  plugin.getPluginPreferences().setDefault(WebViewer.BIDI_ORIENTATION,WebViewer.BIDI_ORIENTATION_AUTO);
  if (plugin.getStateLocation() != null)   System.setProperty(BIRT_VIEWER_WORKING_PATH,plugin.getStateLocation().toOSString());
  String rootPath=getFilePath("String_Node_Str");
  if (rootPath != null)   System.setProperty(BIRT_VIEWER_ROOT_PATH,rootPath);
  System.setProperty(BIRT_IS_DESIGNER,"String_Node_Str");
  WebViewer.getCurrentWebApp();
}
Program: 66916
Project: 66916
Buggy source:
protected IPageContent createPageContent(IPageContent pageContent,long pageNumber,long totalPageNumber){
  return (IPageContent)cloneContent((IContent)pageContent.getParent(),pageContent,pageNumber,totalPageNumber);
}

Fixed version (ground truth):
protected IPageContent createPageContent(IPageContent htmlPageContent){
  if (context.getPageNumber() == htmlPageContent.getPageNumber()) {
    return htmlPageContent;
  }
 else {
    IPageContent pageContent=htmlPageContent;
    try {
      pageContent=ReportExecutorUtil.executeMasterPage(context.getHtmlLayoutContext().getReportExecutor(),context.getPageNumber(),(MasterPageDesign)pageContent.getGenerateBy());
    }
 catch (    BirtException e) {
      logger.log(Level.WARNING,e.getMessage(),e);
    }
    return pageContent;
  }
}
Program: 66918
Project: 66918
Buggy source:
public void setRowSpan(int rowSpan){
  if (data != null) {
    data.setRowSpan(rowSpan);
  }
}

Fixed version (ground truth):
public void setRowSpan(int rowSpan){
  data.setRowSpan(rowSpan);
}
Program: 66919
Project: 66919
Buggy source:
public float getHeight(){
  if (data != null) {
    return data.getHeight();
  }
  return super.getHeight();
}

Fixed version (ground truth):
public float getHeight(){
  return data.getHeight();
}
Program: 66920
Project: 66920
Buggy source:
public BlankData(){
}

Fixed version (ground truth):
public BlankData(SheetData data){
  super(data);
  this.data=data;
}
Program: 66921
Project: 66921
Buggy source:
public void decreasRowSpanInDesign(){
  if (data != null) {
    data.decreasRowSpanInDesign();
  }
}

Fixed version (ground truth):
public void decreasRowSpanInDesign(){
  data.decreasRowSpanInDesign();
}
Program: 66922
Project: 66922
Buggy source:
public int getRowSpanInDesign(){
  if (data != null) {
    return data.getRowSpanInDesign();
  }
  return 0;
}

Fixed version (ground truth):
public int getRowSpanInDesign(){
  return data.getRowSpanInDesign();
}
Program: 66923
Project: 66923
Buggy source:
public void setHeight(float height){
  if (data != null) {
    data.setHeight(height);
  }
}

Fixed version (ground truth):
public void setHeight(float height){
  data.setHeight(height);
}
Program: 66924
Project: 66924
Buggy source:
public int getRowSpan(){
  if (data != null) {
    return data.getRowSpan();
  }
  return 0;
}

Fixed version (ground truth):
public int getRowSpan(){
  return data.getRowSpan();
}
Program: 66926
Project: 66926
Buggy source:
public void read(DataInputStream in) throws IOException {
  int validCount=IOUtil.readInt(in);
  for (int i=0; i < validCount; i++) {
    String propertyName=IOUtil.readString(in);
    int index=getPropertyIndex(propertyName);
    if (index == -1) {
      String propertyCssText=IOUtil.readString(in);
      if (IStyle.BIRT_DATE_TIME_FORMAT_PROPERTY.equalsIgnoreCase(propertyName)) {
        this.setStringFormat(propertyCssText);
      }
 else       if (IStyle.BIRT_NUMBER_FORMAT_PROPERTY.equalsIgnoreCase(propertyName)) {
        this.setNumberFormat(propertyCssText);
      }
 else       if (IStyle.BIRT_DATE_FORMAT_PROPERTY.equalsIgnoreCase(propertyName)) {
        this.setDateFormat(propertyCssText);
      }
 else       if (IStyle.BIRT_TIME_FORMAT_PROPERTY.equalsIgnoreCase(propertyName)) {
        this.setTimeFormat(propertyCssText);
      }
 else       if (IStyle.BIRT_DATE_TIME_FORMAT_PROPERTY.equalsIgnoreCase(propertyName)) {
        this.setDateTimeFormat(propertyCssText);
      }
 else {
        throw new IOException(propertyName + "String_Node_Str");
      }
    }
 else {
      if (index == StyleConstants.STYLE_DATA_FORMAT) {
        CSSValue value=DataFormatValue.read(in);
        setProperty(index,value);
      }
 else {
        String propertyCssText=IOUtil.readString(in);
        setCssText(index,propertyCssText);
      }
    }
  }
}

Fixed version (ground truth):
public void read(DataInputStream in) throws IOException {
  int validCount=IOUtil.readInt(in);
  for (int i=0; i < validCount; i++) {
    String propertyName=IOUtil.readString(in);
    int index=getPropertyIndex(propertyName);
    if (index == -1) {
      String propertyCssText=IOUtil.readString(in);
      if (IStyle.BIRT_STRING_FORMAT_PROPERTY.equalsIgnoreCase(propertyName)) {
        this.setStringFormat(propertyCssText);
      }
 else       if (IStyle.BIRT_NUMBER_FORMAT_PROPERTY.equalsIgnoreCase(propertyName)) {
        this.setNumberFormat(propertyCssText);
      }
 else       if (IStyle.BIRT_DATE_FORMAT_PROPERTY.equalsIgnoreCase(propertyName)) {
        this.setDateFormat(propertyCssText);
      }
 else       if (IStyle.BIRT_TIME_FORMAT_PROPERTY.equalsIgnoreCase(propertyName)) {
        this.setTimeFormat(propertyCssText);
      }
 else       if (IStyle.BIRT_DATE_TIME_FORMAT_PROPERTY.equalsIgnoreCase(propertyName)) {
        this.setDateTimeFormat(propertyCssText);
      }
 else {
        throw new IOException(propertyName + "String_Node_Str");
      }
    }
 else {
      if (index == StyleConstants.STYLE_DATA_FORMAT) {
        CSSValue value=DataFormatValue.read(in);
        setProperty(index,value);
      }
 else {
        String propertyCssText=IOUtil.readString(in);
        setCssText(index,propertyCssText);
      }
    }
  }
}
Program: 66927
Project: 66927
Buggy source:
/** 
 * This method initializes cmpTypeButtons
 */
private void createGroups(Vector<IChartSubType> vSubTypes){
  vSubTypeNames=new Vector<String>();
  if (cmpTypeButtons != null && !cmpTypeButtons.isDisposed()) {
    cmpTypeButtons.dispose();
  }
  cmpTypeButtons=new Composite(cmpSubTypes,SWT.NONE);
  RowLayout rowLayout=new RowLayout();
  rowLayout.marginTop=0;
  rowLayout.marginLeft=0;
  rowLayout.marginBottom=12;
  rowLayout.marginRight=12;
  rowLayout.spacing=4;
  cmpTypeButtons.setLayout(rowLayout);
  for (int iC=0; iC < vSubTypes.size(); iC++) {
    IChartSubType subType=vSubTypes.get(iC);
    vSubTypeNames.add(subType.getName());
    Button btnType=new Button(cmpTypeButtons,SWT.TOGGLE);
    btnType.setData(subType.getName());
    btnType.setImage(subType.getImage());
    btnType.setLayoutData(rowData);
    btnType.addSelectionListener(this);
    btnType.setToolTipText(subType.getDescription());
    btnType.getImage().setBackground(btnType.getBackground());
    btnType.setVisible(true);
    cmpTypeButtons.layout(true);
    if (getDataServiceProvider().checkState(IDataServiceProvider.PART_CHART)) {
      break;
    }
  }
  cmpTypeButtons.setLayoutData(new GridData(GridData.FILL_BOTH));
  cmpSubTypes.layout(true);
}

Fixed version (ground truth):
/** 
 * This method initializes cmpTypeButtons
 */
private void createGroups(Vector<IChartSubType> vSubTypes){
  vSubTypeNames=new Vector<String>();
  if (cmpTypeButtons != null && !cmpTypeButtons.isDisposed()) {
    cmpTypeButtons.dispose();
  }
  cmpTypeButtons=new Composite(cmpSubTypes,SWT.NONE);
  cmpTypeButtons.setLayoutData(new GridData(GridData.FILL_BOTH));
  GridLayout rowLayout=new GridLayout(vSubTypes.size(),false);
  rowLayout.marginTop=0;
  rowLayout.marginLeft=0;
  rowLayout.marginBottom=12;
  rowLayout.marginRight=12;
  rowLayout.horizontalSpacing=4;
  cmpTypeButtons.setLayout(rowLayout);
  for (int iC=0; iC < vSubTypes.size(); iC++) {
    IChartSubType subType=vSubTypes.get(iC);
    vSubTypeNames.add(subType.getName());
    Button btnType=new Button(cmpTypeButtons,SWT.TOGGLE | SWT.FLAT);
    btnType.setData(subType.getName());
    btnType.setImage(subType.getImage());
    GridData gd=new GridData();
    gd.widthHint=80;
    gd.heightHint=80;
    btnType.setLayoutData(gd);
    btnType.addSelectionListener(this);
    btnType.setToolTipText(subType.getDescription());
    btnType.getImage().setBackground(btnType.getBackground());
    btnType.setVisible(true);
    if (getDataServiceProvider().checkState(IDataServiceProvider.PART_CHART)) {
      break;
    }
  }
}
Program: 66928
Project: 66928
Buggy source:
/** 
 * This method initializes cmpSubTypes
 */
private void createComposite(Vector<IChartSubType> vSubTypes){
  Label lblSubtypes=new Label(cmpRight,SWT.NO_FOCUS);
{
    lblSubtypes.setText(Messages.getString("String_Node_Str"));
    GridData gd=new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalIndent=5;
    lblSubtypes.setLayoutData(gd);
  }
  GridData gdTypes=new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
  cmpSubTypes=new Composite(cmpRight,SWT.NONE);
  createGroups(vSubTypes);
  cmpSubTypes.setLayoutData(gdTypes);
  cmpSubTypes.setToolTipText(Messages.getString("String_Node_Str"));
  cmpSubTypes.setLayout(new GridLayout());
  cmpSubTypes.setVisible(true);
}

Fixed version (ground truth):
/** 
 * This method initializes cmpSubTypes
 */
private void createComposite(Vector<IChartSubType> vSubTypes){
  Label lblSubtypes=new Label(cmpRight,SWT.NO_FOCUS);
{
    lblSubtypes.setText(Messages.getString("String_Node_Str"));
    GridData gd=new GridData(GridData.FILL_HORIZONTAL);
    gd.horizontalIndent=5;
    lblSubtypes.setLayoutData(gd);
  }
  GridData gdTypes=new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL);
  cmpSubTypes=new Composite(cmpRight,SWT.NONE);
  createGroups(vSubTypes);
  cmpSubTypes.setLayoutData(gdTypes);
  cmpSubTypes.setToolTipText(Messages.getString("String_Node_Str"));
  cmpSubTypes.setLayout(new GridLayout());
  cmpSubTypes.setVisible(true);
  cmpSubTypes.layout(true);
}
Program: 66931
Project: 66931
Buggy source:
/** 
 * Obtains singleton
 */
private static BrowserLog getInstance(){
  if (instance == null) {
    instance=new BrowserLog();
  }
  return instance;
}

Fixed version (ground truth):
/** 
 * Obtains singleton
 */
private static synchronized BrowserLog getInstance(){
  if (instance == null) {
    instance=new BrowserLog();
  }
  return instance;
}
Program: 66932
Project: 66932
Buggy source:
private IChoice[] getLevelTypesByDateType(){
  if (hierarchy == null || dataField == null)   return null;
  DataSetHandle dataset=hierarchy.getDataSet();
  if (dataset == null) {
    dataset=((TabularCubeHandle)hierarchy.getContainer().getContainer()).getDataSet();
  }
  String dataType=dataField.getDataType();
  if (dataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME))   return OlapUtil.getDateTimeLevelTypeChoices();
 else   if (dataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_DATE))   return OlapUtil.getDateLevelTypeChoices();
 else   return OlapUtil.getTimeLevelTypeChoices();
}

Fixed version (ground truth):
private IChoice[] getLevelTypesByDateType(){
  if (hierarchy == null || dataField == null)   return null;
  String dataType=dataField.getDataType();
  if (dataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME))   return OlapUtil.getDateTimeLevelTypeChoices();
 else   if (dataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_DATE))   return OlapUtil.getDateLevelTypeChoices();
 else   return OlapUtil.getTimeLevelTypeChoices();
}
Program: 66933
Project: 66933
Buggy source:
protected void handleExpressionButtonSelectEvent(){
  ExpressionBuilder expression=new ExpressionBuilder(expressionText.getText());
  expression.setExpressionProvider(new CubeExpressionProvider(input));
  if (expression.open() == OK) {
    if (expression.getResult() != null && expressionText != null)     expressionText.setText(expression.getResult());
  }
}

Fixed version (ground truth):
protected void handleExpressionButtonSelectEvent(){
  ExpressionBuilder expression=new ExpressionBuilder(expressionText.getText());
  expression.setExpressionProvider(new CubeExpressionProvider(input));
  if (expression.open() == OK) {
    if (expression.getResult() != null)     expressionText.setText(expression.getResult());
  }
}
Program: 66934
Project: 66934
Buggy source:
protected void showSelection(){
  JoinConditionEditPart part=(JoinConditionEditPart)this.getHost();
  ((ColumnConnection)this.getHostFigure()).setLineWidth(2);
  if (part.getTarget() instanceof ColumnEditPart) {
    if (part.getSource() instanceof EditPart)     part.getSource().setSelected(EditPart.SELECTED);
    part.getTarget().setSelected(EditPart.SELECTED);
  }
}

Fixed version (ground truth):
protected void showSelection(){
  JoinConditionEditPart part=(JoinConditionEditPart)this.getHost();
  ((ColumnConnection)this.getHostFigure()).setLineWidth(2);
  if (part.getTarget() instanceof ColumnEditPart) {
    part.getSource().setSelected(EditPart.SELECTED);
    part.getTarget().setSelected(EditPart.SELECTED);
  }
}
Program: 66935
Project: 66935
Buggy source:
protected void hideSelection(){
  JoinConditionEditPart part=(JoinConditionEditPart)this.getHost();
  ((ColumnConnection)this.getHostFigure()).setLineWidth(1);
  if (part.getTarget() instanceof ColumnEditPart) {
    if (part.getSource() instanceof EditPart)     part.getSource().setSelected(EditPart.SELECTED_NONE);
    part.getTarget().setSelected(EditPart.SELECTED_NONE);
  }
}

Fixed version (ground truth):
protected void hideSelection(){
  JoinConditionEditPart part=(JoinConditionEditPart)this.getHost();
  ((ColumnConnection)this.getHostFigure()).setLineWidth(1);
  if (part.getTarget() instanceof ColumnEditPart) {
    part.getSource().setSelected(EditPart.SELECTED_NONE);
    part.getTarget().setSelected(EditPart.SELECTED_NONE);
  }
}
Program: 66936
Project: 66936
Buggy source:
public void handleEvent(Event e){
  TreeItem item=(TreeItem)e.item;
  Color gray=Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY);
  if (item != null && item.getData() != null) {
    if (checkSharedDimension(item.getData()) && item.getData() instanceof LevelHandle)     item.setForeground(gray);
 else     item.setForeground(item.getParent().getForeground());
  }
 else   item.setForeground(item.getParent().getForeground());
}

Fixed version (ground truth):
public void handleEvent(Event e){
  TreeItem item=(TreeItem)e.item;
  Color gray=Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY);
  if (item != null) {
    if (item.getData() != null) {
      if (checkSharedDimension(item.getData()) && item.getData() instanceof LevelHandle)       item.setForeground(gray);
 else       item.setForeground(item.getParent().getForeground());
    }
 else     item.setForeground(item.getParent().getForeground());
  }
}
Program: 66938
Project: 66938
Buggy source:
public CubeExpressionProvider(DesignElementHandle handle){
  super(handle);
  if (handle instanceof TabularCubeHandle)   dataSetHandle=((TabularCubeHandle)handle).getDataSet();
  if (handle instanceof DimensionHandle) {
    if (((DimensionHandle)handle).getDefaultHierarchy() instanceof TabularHierarchyHandle)     dataSetHandle=OlapUtil.getHierarchyDataset((TabularHierarchyHandle)((DimensionHandle)handle).getDefaultHierarchy());
  }
 else   if (handle instanceof TabularHierarchyHandle) {
    dataSetHandle=OlapUtil.getHierarchyDataset((TabularHierarchyHandle)handle);
  }
 else   if (handle instanceof TabularMeasureHandle) {
    Object parent=((MeasureHandle)handle).getContainer().getContainer();
    if (parent instanceof TabularCubeHandle) {
      dataSetHandle=((TabularCubeHandle)parent).getDataSet();
    }
  }
 else   if (handle instanceof MeasureGroupHandle) {
    Object parent=(TabularCubeHandle)((MeasureGroupHandle)handle).getContainer().getContainer();
    if (parent instanceof TabularCubeHandle) {
      dataSetHandle=((TabularCubeHandle)parent).getDataSet();
    }
  }
 else   if (handle instanceof TabularLevelHandle) {
    dataSetHandle=OlapUtil.getHierarchyDataset((TabularHierarchyHandle)handle.getContainer());
  }
  addFilterToProvider();
}

Fixed version (ground truth):
public CubeExpressionProvider(DesignElementHandle handle){
  super(handle);
  if (handle instanceof TabularCubeHandle)   dataSetHandle=((TabularCubeHandle)handle).getDataSet();
  if (handle instanceof DimensionHandle) {
    if (((DimensionHandle)handle).getDefaultHierarchy() instanceof TabularHierarchyHandle)     dataSetHandle=OlapUtil.getHierarchyDataset((TabularHierarchyHandle)((DimensionHandle)handle).getDefaultHierarchy());
  }
 else   if (handle instanceof TabularHierarchyHandle) {
    dataSetHandle=OlapUtil.getHierarchyDataset((TabularHierarchyHandle)handle);
  }
 else   if (handle instanceof TabularMeasureHandle) {
    Object parent=((MeasureHandle)handle).getContainer().getContainer();
    if (parent instanceof TabularCubeHandle) {
      dataSetHandle=((TabularCubeHandle)parent).getDataSet();
    }
  }
 else   if (handle instanceof MeasureGroupHandle) {
    Object parent=((MeasureGroupHandle)handle).getContainer().getContainer();
    if (parent instanceof TabularCubeHandle) {
      dataSetHandle=((TabularCubeHandle)parent).getDataSet();
    }
  }
 else   if (handle instanceof TabularLevelHandle) {
    dataSetHandle=OlapUtil.getHierarchyDataset((TabularHierarchyHandle)handle.getContainer());
  }
  addFilterToProvider();
}
Program: 66939
Project: 66939
Buggy source:
private boolean updateHideRule(DesignElementHandle element,String format,boolean checked,Expression expression) throws Exception {
  if (checked) {
    HideRuleHandle hideHandle=getHideRuleHandle(element,format);
    if (hideHandle == null) {
      try {
        createHideRuleHandle(element,format,expression);
      }
 catch (      SemanticException e) {
        ExceptionUtil.handle(e);
      }
    }
 else {
      if (!expression.equals(hideHandle.getExpression()) && (!expression.equals("String_Node_Str") || hideHandle.getExpression() != null)) {
        hideHandle.setExpressionProperty(HideRule.VALUE_EXPR_MEMBER,expression);
      }
    }
  }
 else {
    Iterator visibilities=visibilityRulesIterator(element);
    if (visibilities == null) {
      return true;
    }
    while (visibilities.hasNext()) {
      HideRuleHandle handle=(HideRuleHandle)visibilities.next();
      if (format.equalsIgnoreCase(handle.getFormat())) {
        try {
          getVisibilityPropertyHandle(element).removeItem(handle.getStructure());
        }
 catch (        PropertyValueException e) {
          ExceptionUtil.handle(e);
        }
        return true;
      }
    }
  }
  return true;
}

Fixed version (ground truth):
private boolean updateHideRule(DesignElementHandle element,String format,boolean checked,Expression expression) throws Exception {
  if (checked) {
    HideRuleHandle hideHandle=getHideRuleHandle(element,format);
    if (hideHandle == null) {
      try {
        createHideRuleHandle(element,format,expression);
      }
 catch (      SemanticException e) {
        ExceptionUtil.handle(e);
      }
    }
 else {
      hideHandle.setExpressionProperty(HideRule.VALUE_EXPR_MEMBER,expression);
    }
  }
 else {
    Iterator visibilities=visibilityRulesIterator(element);
    if (visibilities == null) {
      return true;
    }
    while (visibilities.hasNext()) {
      HideRuleHandle handle=(HideRuleHandle)visibilities.next();
      if (format.equalsIgnoreCase(handle.getFormat())) {
        try {
          getVisibilityPropertyHandle(element).removeItem(handle.getStructure());
        }
 catch (        PropertyValueException e) {
          ExceptionUtil.handle(e);
        }
        return true;
      }
    }
  }
  return true;
}
Program: 66940
Project: 66940
Buggy source:
public void handleEvent(Event event){
  TreeItem item=(TreeItem)event.item;
  INodeProvider provider=null;
  if (item != null && item.getData() != null) {
    provider=ProviderFactory.createProvider(item.getData());
  }
  if (provider != null && item != null && provider.isReadOnly(item.getData())) {
    Color gray=Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY);
    if (!item.getForeground().equals(gray)) {
      item.setForeground(gray);
    }
  }
 else {
    Color black=ReportColorConstants.ReportForeground;
    if (item != null && !black.equals(item.getForeground())) {
      item.setForeground(black);
    }
  }
}

Fixed version (ground truth):
public void handleEvent(Event event){
  TreeItem item=(TreeItem)event.item;
  if (item == null)   return;
  INodeProvider provider=null;
  if (item != null && item.getData() != null) {
    provider=ProviderFactory.createProvider(item.getData());
  }
  if (provider != null && item != null && provider.isReadOnly(item.getData())) {
    Color gray=Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY);
    if (!item.getForeground().equals(gray)) {
      item.setForeground(gray);
    }
  }
 else {
    Color black=ReportColorConstants.ReportForeground;
    if (item != null && !black.equals(item.getForeground())) {
      item.setForeground(black);
    }
  }
}
Program: 66941
Project: 66941
Buggy source:
/** 
 * Creates the SWT control for this page under the given parent control.
 * @param parent the parent control
 */
public void createControl(Composite parent){
  treeViewer=createTreeViewer(parent);
  getTreeViewer().addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      treeSelect(event);
    }
  }
);
  treeViewer.getTree().addListener(SWT.PaintItem,new Listener(){
    public void handleEvent(    Event event){
      TreeItem item=(TreeItem)event.item;
      INodeProvider provider=null;
      if (item != null && item.getData() != null) {
        provider=ProviderFactory.createProvider(item.getData());
      }
      if (provider != null && item != null && provider.isReadOnly(item.getData())) {
        Color gray=Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY);
        if (!item.getForeground().equals(gray)) {
          item.setForeground(gray);
        }
      }
 else {
        Color black=ReportColorConstants.ReportForeground;
        if (item != null && !black.equals(item.getForeground())) {
          item.setForeground(black);
        }
      }
    }
  }
);
  configTreeViewer();
  hookTreeViewer();
  initPage();
  if (reportHandle != null)   SessionHandleAdapter.getInstance().getMediator(reportHandle).addColleague(this);
}

Fixed version (ground truth):
/** 
 * Creates the SWT control for this page under the given parent control.
 * @param parent the parent control
 */
public void createControl(Composite parent){
  treeViewer=createTreeViewer(parent);
  getTreeViewer().addSelectionChangedListener(new ISelectionChangedListener(){
    public void selectionChanged(    SelectionChangedEvent event){
      treeSelect(event);
    }
  }
);
  treeViewer.getTree().addListener(SWT.PaintItem,new Listener(){
    public void handleEvent(    Event event){
      TreeItem item=(TreeItem)event.item;
      if (item == null)       return;
      INodeProvider provider=null;
      if (item != null && item.getData() != null) {
        provider=ProviderFactory.createProvider(item.getData());
      }
      if (provider != null && item != null && provider.isReadOnly(item.getData())) {
        Color gray=Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY);
        if (!item.getForeground().equals(gray)) {
          item.setForeground(gray);
        }
      }
 else {
        Color black=ReportColorConstants.ReportForeground;
        if (item != null && !black.equals(item.getForeground())) {
          item.setForeground(black);
        }
      }
    }
  }
);
  configTreeViewer();
  hookTreeViewer();
  initPage();
  if (reportHandle != null)   SessionHandleAdapter.getInstance().getMediator(reportHandle).addColleague(this);
}
Program: 66943
Project: 66943
Buggy source:
private boolean canSpan(SheetData data,XlsContainer rowContainer){
  SheetData realData=getRealData(data);
  if (realData == null)   return false;
  if (isInContainer(realData,rowContainer)) {
    return true;
  }
  return realData.getRowSpanInDesign() > 0;
}

Fixed version (ground truth):
private boolean canSpan(SheetData data,XlsContainer rowContainer,int currentColumn,int lastColumn){
  SheetData realData=getRealData(data);
  if (realData == null)   return false;
  if (!isInContainer(realData,rowContainer)) {
    return false;
  }
  for (int i=currentColumn + 1; i < lastColumn; i++) {
    SheetData lastData=getColumnLastData(i);
    SheetData lastRealData=getRealData(lastData);
    if (lastRealData == null || lastRealData.getRowIndex() <= realData.getRowIndex()) {
      continue;
    }
    if (realData.getStartX() > lastRealData.getStartX()) {
      return false;
    }
  }
  return realData.getRowSpanInDesign() > 0;
}
Program: 66944
Project: 66944
Buggy source:
/** 
 * @param cx
 * @param expr1
 * @throws DataException 
 */
private static void prepareScriptExpression(ScriptContext cx,IBaseExpression expr1) throws DataException {
  try {
    if (expr1 == null)     return;
    if (expr1 instanceof IScriptExpression) {
      String exprText=((IScriptExpression)expr1).getText();
      if (expr1.getHandle() == null)       expr1.setHandle(new OLAPExpressionHandler(cx.compile(expr1.getScriptId(),null,0,exprText)));
    }
 else     if (expr1 instanceof IExpressionCollection) {
      Object[] exprs=((IExpressionCollection)expr1).getExpressions().toArray();
      for (int i=0; i < exprs.length; i++) {
        prepareScriptExpression(cx,(IBaseExpression)exprs[i]);
      }
    }
  }
 catch (  BirtException e) {
    throw DataException.wrap(e);
  }
}

Fixed version (ground truth):
/** 
 * @param cx
 * @param expr1
 * @throws DataException 
 */
private static void prepareScriptExpression(ScriptContext cx,IBaseExpression expr1) throws DataException {
  try {
    if (expr1 == null)     return;
    if (expr1 instanceof IScriptExpression) {
      String exprText=((IScriptExpression)expr1).getText();
      if (expr1.getHandle() == null && !((IScriptExpression)expr1).isConstant())       expr1.setHandle(new OLAPExpressionHandler(cx.compile(expr1.getScriptId(),null,0,exprText)));
    }
 else     if (expr1 instanceof IExpressionCollection) {
      Object[] exprs=((IExpressionCollection)expr1).getExpressions().toArray();
      for (int i=0; i < exprs.length; i++) {
        prepareScriptExpression(cx,(IBaseExpression)exprs[i]);
      }
    }
  }
 catch (  BirtException e) {
    throw DataException.wrap(e);
  }
}
Program: 66945
Project: 66945
Buggy source:
/** 
 * @param ise
 * @return
 */
private static IScriptExpression constructValidScriptExpression(IScriptExpression ise){
  return ise != null && ise.getText().trim().length() > 0 ? ise : new ScriptExpression("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @param ise
 * @return
 */
private static IScriptExpression constructValidScriptExpression(IScriptExpression ise){
  return ise != null && ise.getText() != null && ise.getText().trim().length() > 0 ? ise : new ScriptExpression("String_Node_Str");
}
Program: 66946
Project: 66946
Buggy source:
/** 
 * @return
 * @throws DataException save error
 */
void getColumnsValue(Map valueMap) throws DataException {
  Iterator itr=this.allAutoBindingExprs.iterator();
  while (itr.hasNext()) {
    BindingColumn bindingColumn=(BindingColumn)itr.next();
    if (valueMap.containsKey(bindingColumn.columnName))     continue;
    Object exprValue=evaluateValue(bindingColumn,AUTO_BINDING);
    if (valueMap.get(bindingColumn.columnName) == null)     valueMap.put(bindingColumn.columnName,exprValue);
  }
  for (int i=0; i < allManualBindingExprs.size(); i++) {
    List list=(List)allManualBindingExprs.get(i);
    Iterator it=list.iterator();
    while (it.hasNext()) {
      BindingColumn bindingColumn=(BindingColumn)it.next();
      if (valueMap.containsKey(bindingColumn.columnName))       continue;
      Object exprValue=evaluateValue(bindingColumn,MANUAL_BINDING);
      valueMap.put(bindingColumn.columnName,exprValue);
    }
  }
  if (ExprMetaUtil.isBasedOnRD(this.odiResult.getResultClass()) && !saveHelper.isSummaryQuery()) {
    if (this.odiResult.getCurrentResult() != null) {
      valueMap.put(ExprMetaUtil.POS_NAME,this.odiResult.getCurrentResult().getFieldValue(ExprMetaUtil.POS_NAME));
    }
 else {
      valueMap.put(ExprMetaUtil.POS_NAME,-1);
    }
  }
  saveHelper.doSaveExpr(valueMap);
}

Fixed version (ground truth):
/** 
 * @return
 * @throws DataException save error
 */
void getColumnsValue(Map valueMap) throws DataException {
  Iterator itr=this.allAutoBindingExprs.iterator();
  while (itr.hasNext()) {
    BindingColumn bindingColumn=(BindingColumn)itr.next();
    if (valueMap.containsKey(bindingColumn.columnName))     continue;
    Object exprValue=evaluateValue(bindingColumn,AUTO_BINDING);
    if (valueMap.get(bindingColumn.columnName) == null)     valueMap.put(bindingColumn.columnName,exprValue);
  }
  for (int i=0; i < allManualBindingExprs.size(); i++) {
    List list=(List)allManualBindingExprs.get(i);
    Iterator it=list.iterator();
    while (it.hasNext()) {
      BindingColumn bindingColumn=(BindingColumn)it.next();
      if (valueMap.containsKey(bindingColumn.columnName))       continue;
      Object exprValue=evaluateValue(bindingColumn,MANUAL_BINDING);
      valueMap.put(bindingColumn.columnName,exprValue);
    }
  }
  if (ExprMetaUtil.isBasedOnRD(this.odiResult.getResultClass()) && !saveHelper.isSummaryQuery()) {
    if (this.odiResult.getCurrentResult() != null) {
      valueMap.put(ExprMetaUtil.POS_NAME,this.odiResult.getCurrentResult().getFieldValue(ExprMetaUtil.POS_NAME));
    }
 else {
      valueMap.put(ExprMetaUtil.POS_NAME,0);
    }
  }
  saveHelper.doSaveExpr(valueMap);
}
Program: 66947
Project: 66947
Buggy source:
public void setErrors(List<EngineException> errors){
  if (errors != null) {
    this.errors=errors;
  }
 else {
    this.errors=new ArrayList<EngineException>();
  }
}

Fixed version (ground truth):
public void setErrors(List<ElementExceptionInfo> errors){
  if (errors != null) {
    this.errors=errors;
  }
 else {
    this.errors=new ArrayList<ElementExceptionInfo>();
  }
}
Program: 66948
Project: 66948
Buggy source:
public List<EngineException> getErrors(){
  return errors;
}

Fixed version (ground truth):
public List<ElementExceptionInfo> getErrors(){
  return errors;
}
Program: 66949
Project: 66949
Buggy source:
public void setReportContent(ReportContent content){
  this.reportContent=content;
  content.setReportContext(reportContext);
  content.setErrors(errors);
}

Fixed version (ground truth):
public void setReportContent(ReportContent content){
  this.reportContent=content;
  content.setReportContext(reportContext);
}
Program: 66951
Project: 66951
Buggy source:
/** 
 * Check whether filter in query contains aggregation. If aggregation is TOPN,BOTTOMN,TOPPERCENT,BOTTMEPERCENT return true. else return false;
 * @return
 * @throws DataException 
 */
public static boolean isValidExpressionInQueryFilter(IBaseExpression expression,ScriptContext context) throws DataException {
  if (expression instanceof IScriptExpression) {
    String text=((IScriptExpression)expression).getText();
    if (text.trim().length() == 0)     return true;
    AggregateRegistry aggrReg=new AggregateRegistry(){
      public int register(      AggregateExpression aggregationExpr){
        return -1;
      }
    }
;
    ExpressionCompiler expressionCompiler=new ExpressionCompiler();
    CompiledExpression expr=expressionCompiler.compile(text,aggrReg,context);
    return flattenFilterExpression(expr);
  }
 else   if (expression instanceof IConditionalExpression) {
    IScriptExpression expr=((IConditionalExpression)expression).getExpression();
    IBaseExpression oprand1=((IConditionalExpression)expression).getOperand1();
    IBaseExpression oprand2=((IConditionalExpression)expression).getOperand2();
    return isValidExpressionInQueryFilter(expr,context) && isValidExpressionInQueryFilter(oprand1,context) && isValidExpressionInQueryFilter(oprand2,context);
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Check whether filter in query contains aggregation. If aggregation is TOPN,BOTTOMN,TOPPERCENT,BOTTMEPERCENT return true. else return false;
 * @return
 * @throws DataException 
 */
public static boolean isValidExpressionInQueryFilter(IBaseExpression expression,ScriptContext context) throws DataException {
  if (expression instanceof IScriptExpression) {
    String text=((IScriptExpression)expression).getText();
    if (text == null || text.trim().length() == 0)     return true;
    AggregateRegistry aggrReg=new AggregateRegistry(){
      public int register(      AggregateExpression aggregationExpr){
        return -1;
      }
    }
;
    ExpressionCompiler expressionCompiler=new ExpressionCompiler();
    CompiledExpression expr=expressionCompiler.compile(text,aggrReg,context);
    return flattenFilterExpression(expr);
  }
 else   if (expression instanceof IConditionalExpression) {
    IScriptExpression expr=((IConditionalExpression)expression).getExpression();
    IBaseExpression oprand1=((IConditionalExpression)expression).getOperand1();
    IBaseExpression oprand2=((IConditionalExpression)expression).getOperand2();
    return isValidExpressionInQueryFilter(expr,context) && isValidExpressionInQueryFilter(oprand1,context) && isValidExpressionInQueryFilter(oprand2,context);
  }
  return true;
}
Program: 66952
Project: 66952
Buggy source:
public Control createPageControl(Composite parent){
  Composite content=new Composite(parent,SWT.NONE);
  FillLayout layout=new FillLayout();
  content.setLayout(layout);
  Label txt=new Label(content,SWT.LEFT);
  txt.setText(Messages.formatMessage("String_Node_Str",new Object[]{dataSourceDesign.getName()}));
  return content;
}

Fixed version (ground truth):
public Control createPageControl(Composite parent){
  Composite content=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  content.setLayout(layout);
  content.setLayoutData(new GridData(GridData.FILL_BOTH));
  Label txt=new Label(content,SWT.LEFT);
  txt.setText(Messages.formatMessage("String_Node_Str",new Object[]{dataSourceDesign.getName()}));
  Label nextLineLabel=new Label(content,SWT.LEFT);
  nextLineLabel.setText(Messages.formatMessage("String_Node_Str",new Object[]{dataSourceDesign.getName()}));
  Label thirdLineLabel=new Label(content,SWT.LEFT);
  thirdLineLabel.setText(Messages.getMessage("String_Node_Str"));
  return content;
}
Program: 66953
Project: 66953
Buggy source:
private ColumnHintHandle findColumnHint(DataSetHandle handle,String columnName){
  if (columnName == null || columnName.trim().length() == 0)   return null;
  ColumnHintHandle hint=null;
  Iterator iter=handle.getPropertyHandle(DataSetHandle.COLUMN_HINTS_PROP).iterator();
  while (iter.hasNext()) {
    hint=(ColumnHintHandle)iter.next();
    if (columnName.equals(hint.getColumnName())) {
      return hint;
    }
  }
  if (hint == null && (handle instanceof DerivedDataSetHandle)) {
    List<DataSetHandle> inputDataSets=((DerivedDataSetHandle)handle).getInputDataSets();
    for (int i=0; i < inputDataSets.size(); i++) {
      hint=findColumnHint(inputDataSets.get(i),columnName);
      if (hint != null) {
        return hint;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
private ColumnHintHandle findColumnHint(DataSetHandle handle,String columnName){
  if (columnName == null || columnName.trim().length() == 0)   return null;
  ColumnHintHandle hint=null;
  Iterator iter=handle.getPropertyHandle(DataSetHandle.COLUMN_HINTS_PROP).iterator();
  while (iter.hasNext()) {
    hint=(ColumnHintHandle)iter.next();
    if (columnName.equals(hint.getColumnName())) {
      return hint;
    }
  }
  if (handle instanceof DerivedDataSetHandle) {
    List<DataSetHandle> inputDataSets=((DerivedDataSetHandle)handle).getInputDataSets();
    for (int i=0; i < inputDataSets.size(); i++) {
      hint=findColumnHint(inputDataSets.get(i),columnName);
      if (hint != null) {
        return hint;
      }
    }
  }
  return null;
}
Program: 66954
Project: 66954
Buggy source:
private boolean valueEqual(Object o) throws DataException {
  if (o == DUMMYOBJ)   return true;
  return ScriptEvalUtil.compare(this.value,o) == 0;
}

Fixed version (ground truth):
private boolean valueEqual(Object o) throws DataException {
  if (o == DUMMYOBJ)   return true;
  if (this.value == null)   return true;
  return ScriptEvalUtil.compare(this.value,o) == 0;
}
Program: 66955
Project: 66955
Buggy source:
/** 
 * Clean up the execution context before finishing using it
 */
public void close(){
  if (extendedItemManager != null) {
    extendedItemManager.close();
    extendedItemManager=null;
  }
  if (engineExtensionManager != null) {
    engineExtensionManager.close();
    engineExtensionManager=null;
  }
  if (scriptContext != null) {
    scriptContext.close();
    scriptContext=null;
  }
  if (dataSource != null) {
    try {
      dataSource.close();
    }
 catch (    IOException e) {
      log.log(Level.SEVERE,"String_Node_Str",e);
    }
    dataSource=null;
  }
  if (dataEngine != null) {
    dataEngine.shutdown();
    dataEngine=null;
  }
  if (closeClassLoader && applicationClassLoader instanceof ApplicationClassLoader) {
    ((ApplicationClassLoader)applicationClassLoader).close();
  }
  IStatusHandler handler=task.getStatusHandler();
  if (handler != null) {
    handler.finish();
  }
  applicationClassLoader=null;
  engine=null;
  executor=null;
  tocBuilder=null;
  configs=null;
  params=null;
  persistentBeans=null;
  transientBeans=null;
  pageVariables=null;
  docWriter=null;
  reportIR=null;
  appContext=null;
  reportContext=null;
  renderOption=null;
  reportDoc=null;
  reportContent=null;
  design=null;
  content=null;
  rsets=null;
  reportHandles=null;
  errors=null;
  stringFormatters=null;
  numberFormatters=null;
  dateFormatters=null;
  pageBreakListeners=null;
  eventHandlerManager=null;
  progressMonitor=null;
  element=null;
}

Fixed version (ground truth):
/** 
 * Clean up the execution context before finishing using it
 */
public void close(){
  if (extendedItemManager != null) {
    extendedItemManager.close();
    extendedItemManager=null;
  }
  if (engineExtensionManager != null) {
    engineExtensionManager.close();
    engineExtensionManager=null;
  }
  if (scriptContext != null) {
    scriptContext.close();
    scriptContext=null;
  }
  if (dataSource != null) {
    try {
      dataSource.close();
    }
 catch (    IOException e) {
      log.log(Level.SEVERE,"String_Node_Str",e);
    }
    dataSource=null;
  }
  if (dataEngine != null) {
    dataEngine.shutdown();
    dataEngine=null;
  }
  if (closeClassLoader && applicationClassLoader instanceof ApplicationClassLoader) {
    ((ApplicationClassLoader)applicationClassLoader).close();
  }
  IStatusHandler handler=task.getStatusHandler();
  if (handler != null) {
    handler.finish();
  }
  applicationClassLoader=null;
  engine=null;
  executor=null;
  tocBuilder=null;
  configs=null;
  params=null;
  persistentBeans=null;
  transientBeans=null;
  pageVariables=null;
  docWriter=null;
  reportIR=null;
  appContext=null;
  reportContext=null;
  renderOption=null;
  reportDoc=null;
  reportContent=null;
  design=null;
  content=null;
  rsets=null;
  reportHandles=null;
  errors.clear();
  stringFormatters=null;
  numberFormatters=null;
  dateFormatters=null;
  pageBreakListeners=null;
  eventHandlerManager=null;
  progressMonitor=null;
  element=null;
}
Program: 66957
Project: 66957
Buggy source:
private void doSaveResultClass(OutputStream outputStream,List<IBinding> requestColumnMap,IResultMetaData rClass) throws BirtException {
}

Fixed version (ground truth):
private void doSaveResultClass(OutputStream outputStream,List<IBinding> requestColumnMap) throws BirtException {
}
Program: 66960
Project: 66960
Buggy source:
/** 
 */
private void refreshDataPreviewPane(){
  if (getContext().isShowingDataPreview()) {
    refreshTablePreview();
  }
 else {
    refreshDataPreview();
  }
}

Fixed version (ground truth):
/** 
 */
private void refreshDataPreviewPane(){
  if (isDriectCubeReference()) {
    return;
  }
  if (getContext().isShowingDataPreview()) {
    refreshTablePreview();
  }
 else {
    refreshDataPreview();
  }
}