nus-yam/ex-repair huggingface dataset:
Program: 65308
Project: 65308
Buggy source:
public boolean performOk(){
  try {
    if (combo != null && !combo.isDisposed() && combo.getSelectionIndex() > -1) {
      if (lastSelectedDataSourceIndex != combo.getSelectionIndex()) {
        DataSetHandle datasetHandle=(DataSetHandle)getContainer().getModel();
        datasetHandle.setDataSource(combo.getItem(combo.getSelectionIndex()));
        ((DataSetEditor)(getContainer())).updateDataSetDesign(this);
        if (datasetHandle instanceof OdaDataSetHandle && datasetHandle.getProperty(DataSetHandle.RESULT_SET_PROP) != null)         datasetHandle.clearProperty(DataSetHandle.RESULT_SET_PROP);
      }
      ((DataSetHandle)(getContainer().getModel())).removeListener(this);
    }
  }
 catch (  SemanticException e) {
    ExceptionHandler.handle(e);
    return false;
  }
  return super.performOk();
}

Fixed version (ground truth):
public boolean performOk(){
  try {
    if (combo != null && !combo.isDisposed() && combo.getSelectionIndex() > -1) {
      if (lastSelectedDataSourceIndex != combo.getSelectionIndex()) {
        DataSetHandle datasetHandle=(DataSetHandle)getContainer().getModel();
        datasetHandle.setDataSource(combo.getItem(combo.getSelectionIndex()));
        ((DataSetEditor)(getContainer())).updateDataSetDesign(this);
        if (datasetHandle instanceof OdaDataSetHandle && datasetHandle.getProperty(DataSetHandle.RESULT_SET_PROP) != null)         datasetHandle.clearProperty(DataSetHandle.RESULT_SET_PROP);
      }
    }
  }
 catch (  SemanticException e) {
    ExceptionHandler.handle(e);
    return false;
  }
  ((DataSetHandle)(getContainer().getModel())).removeListener(this);
  return super.performOk();
}
Program: 65309
Project: 65309
Buggy source:
public boolean performOk(){
  return canLeave();
}

Fixed version (ground truth):
public boolean performOk(){
  ((DataSetHandle)getContainer().getModel()).removeListener(this);
  return canLeave();
}
Program: 65310
Project: 65310
Buggy source:
public boolean performOk(){
  DataSetHandle dataSetHandle=(DataSetHandle)getContainer().getModel();
  isOdaDataSetHandle=ParameterPageUtil.isOdaDataSetHandle(dataSetHandle);
  isJointOrDerivedDataSetHandle=ParameterPageUtil.isJointOrDerivedDataSetHandle(dataSetHandle);
  if (doSaveEmptyParameter(parameters)) {
    if (this.modelChanged && this.getContainer() != null && this.getContainer() instanceof DataSetEditor) {
      this.modelChanged=false;
      ((DataSetHandle)getContainer().getModel()).removeListener(this);
      ((DataSetEditor)getContainer()).updateDataSetDesign(this);
    }
    return super.performOk();
  }
 else {
    String name=getNoneValuedParameterName();
    boolean confirm=MessageDialog.openConfirm(null,Messages.getString("String_Node_Str"),Messages.getFormattedString("String_Node_Str",new Object[]{name}));
    if (confirm)     ((DataSetEditor)getContainer()).updateDataSetDesign(this);
    return confirm;
  }
}

Fixed version (ground truth):
public boolean performOk(){
  DataSetHandle dataSetHandle=(DataSetHandle)getContainer().getModel();
  isOdaDataSetHandle=ParameterPageUtil.isOdaDataSetHandle(dataSetHandle);
  isJointOrDerivedDataSetHandle=ParameterPageUtil.isJointOrDerivedDataSetHandle(dataSetHandle);
  if (doSaveEmptyParameter(parameters)) {
    if (this.modelChanged && this.getContainer() != null && this.getContainer() instanceof DataSetEditor) {
      this.modelChanged=false;
      ((DataSetEditor)getContainer()).updateDataSetDesign(this);
    }
    ((DataSetHandle)getContainer().getModel()).removeListener(this);
    return super.performOk();
  }
 else {
    String name=getNoneValuedParameterName();
    boolean confirm=MessageDialog.openConfirm(null,Messages.getString("String_Node_Str"),Messages.getFormattedString("String_Node_Str",new Object[]{name}));
    if (confirm)     ((DataSetEditor)getContainer()).updateDataSetDesign(this);
    ((DataSetHandle)getContainer().getModel()).removeListener(this);
    return confirm;
  }
}
Program: 65313
Project: 65313
Buggy source:
public boolean performOk(){
  if (!modelChanged) {
    disposeAll();
    return super.performOk();
  }
  if (isValid()) {
    refreshPositions();
    disposeAll();
    return super.performOk();
  }
 else   return false;
}

Fixed version (ground truth):
public boolean performOk(){
  if (!modelChanged) {
    disposeAll();
    return super.performOk();
  }
  if (isValid()) {
    refreshPositions();
    disposeAll();
    return super.performOk();
  }
 else {
    disposeAll();
    return false;
  }
}
Program: 65314
Project: 65314
Buggy source:
public boolean performOk(){
  if (isValid()) {
    saveOutputColumns();
    ((DataSetHandle)getContainer().getModel()).removeListener(this);
    if (this.modelChanged) {
      ((DataSetEditor)this.getContainer()).updateDataSetDesign(this);
      this.modelChanged=false;
    }
    if (!pageActivated)     this.setAnalysisTypeForColumn();
    return super.performOk();
  }
 else   return false;
}

Fixed version (ground truth):
public boolean performOk(){
  if (isValid()) {
    saveOutputColumns();
    ((DataSetHandle)getContainer().getModel()).removeListener(this);
    if (this.modelChanged) {
      ((DataSetEditor)this.getContainer()).updateDataSetDesign(this);
      this.modelChanged=false;
    }
    if (!pageActivated)     this.setAnalysisTypeForColumn();
    ((DataSetHandle)getContainer().getModel()).removeListener(this);
    return super.performOk();
  }
 else {
    ((DataSetHandle)getContainer().getModel()).removeListener(this);
    return false;
  }
}
Program: 65316
Project: 65316
Buggy source:
public static ExpressionButton createExpressionButton(Composite parent,int style,boolean allowConstant){
  ExpressionButton button=new ExpressionButton(parent,style,allowConstant);
  IExpressionButtonProvider provider=(IExpressionButtonProvider)ElementAdapterManager.getAdapter(button,IExpressionButtonProvider.class);
  if (provider != null)   button.setExpressionButtonProvider(provider);
  GridData gd=new GridData();
  if (!Platform.getOS().equals(Platform.OS_MACOSX)) {
    gd.heightHint=20;
  }
  button.getControl().setLayoutData(gd);
  return button;
}

Fixed version (ground truth):
public static ExpressionButton createExpressionButton(Composite parent,int style,boolean allowConstant){
  ExpressionButton button=new ExpressionButton(parent,style,allowConstant);
  IExpressionButtonProvider provider=(IExpressionButtonProvider)ElementAdapterManager.getAdapter(button,IExpressionButtonProvider.class);
  if (provider != null)   button.setExpressionButtonProvider(provider);
  GridData gd=new GridData();
  if (Platform.getOS().equals(Platform.OS_WIN32)) {
    gd.heightHint=20;
  }
  button.getControl().setLayoutData(gd);
  return button;
}
Program: 65317
Project: 65317
Buggy source:
/** 
 * Convenient method to setup button to invoke expression builder
 */
public static void setExpressionButtonImage(Button button){
  String imageName;
  if (button.isEnabled()) {
    imageName=IReportGraphicConstants.ICON_ENABLE_EXPRESSION_BUILDERS;
  }
 else {
    imageName=IReportGraphicConstants.ICON_DISABLE_EXPRESSION_BUILDERS;
  }
  Image image=ReportPlatformUIImages.getImage(imageName);
  GridData gd=new GridData();
  if (!Platform.getOS().equals(Platform.OS_MACOSX)) {
    gd.widthHint=20;
    gd.heightHint=20;
  }
  button.setLayoutData(gd);
  button.setImage(image);
  if (button.getImage() != null) {
    button.getImage().setBackground(button.getBackground());
  }
  button.setToolTipText(Messages.getString("String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * Convenient method to setup button to invoke expression builder
 */
public static void setExpressionButtonImage(Button button){
  String imageName;
  if (button.isEnabled()) {
    imageName=IReportGraphicConstants.ICON_ENABLE_EXPRESSION_BUILDERS;
  }
 else {
    imageName=IReportGraphicConstants.ICON_DISABLE_EXPRESSION_BUILDERS;
  }
  Image image=ReportPlatformUIImages.getImage(imageName);
  GridData gd=new GridData();
  if (Platform.getOS().equals(Platform.OS_WIN32)) {
    gd.widthHint=20;
    gd.heightHint=20;
  }
 else {
    gd.widthHint=button.computeSize(SWT.DEFAULT,SWT.DEFAULT).y;
  }
  button.setLayoutData(gd);
  button.setImage(image);
  if (button.getImage() != null) {
    button.getImage().setBackground(button.getBackground());
  }
  button.setToolTipText(Messages.getString("String_Node_Str"));
}
Program: 65318
Project: 65318
Buggy source:
protected ActionHandle getDefaultAction(ExtendedItemHandle handle,String expression){
  ExpressionCodec exprCodec=ChartModelHelper.instance().createExpressionCodec();
  String bindingname=exprCodec.getBindingName(expression);
  if (bindingname == null) {
    return null;
  }
  CubeHandle cube=handle.getCube();
  DataSetHandle dataset=handle.getDataSet();
  if (cube != null) {
    for (    LevelHandle lh : ChartCubeUtil.getAllLevels(cube)) {
      if (bindingname.equals(ChartCubeUtil.createLevelBindingName(lh))) {
        return lh.getActionHandle();
      }
    }
    for (    MeasureHandle mh : ChartCubeUtil.getAllMeasures(cube)) {
      if (bindingname.equals(ChartCubeUtil.createMeasureBindingName(mh))) {
        return mh.getActionHandle();
      }
    }
  }
 else   if (dataset != null) {
    for (Iterator<?> iter=dataset.getPropertyHandle(DataSetHandle.COLUMN_HINTS_PROP).iterator(); iter.hasNext(); ) {
      ColumnHintHandle element=(ColumnHintHandle)iter.next();
      if (element.getColumnName().equals(bindingname) || bindingname.equals(element.getAlias())) {
        return element.getActionHandle();
      }
    }
  }
  return null;
}

Fixed version (ground truth):
protected ActionHandle getDefaultAction(ExtendedItemHandle handle,String expression){
  ExpressionCodec exprCodec=ChartModelHelper.instance().createExpressionCodec();
  String bindingname=exprCodec.getBindingName(expression);
  if (bindingname == null) {
    return null;
  }
  if (ChartReportItemHelper.instance().getBindingCubeHandle(handle) != null) {
    CubeHandle cube=handle.getCube();
    for (    LevelHandle lh : ChartCubeUtil.getAllLevels(cube)) {
      if (bindingname.equals(ChartCubeUtil.createLevelBindingName(lh))) {
        return lh.getActionHandle();
      }
    }
    for (    MeasureHandle mh : ChartCubeUtil.getAllMeasures(cube)) {
      if (bindingname.equals(ChartCubeUtil.createMeasureBindingName(mh))) {
        return mh.getActionHandle();
      }
    }
  }
 else   if (ChartReportItemHelper.instance().getBindingDataSetHandle(handle) != null) {
    DataSetHandle dataset=handle.getDataSet();
    for (Iterator<?> iter=dataset.getPropertyHandle(DataSetHandle.COLUMN_HINTS_PROP).iterator(); iter.hasNext(); ) {
      ColumnHintHandle element=(ColumnHintHandle)iter.next();
      if (element.getColumnName().equals(bindingname) || bindingname.equals(element.getAlias())) {
        return element.getActionHandle();
      }
    }
  }
  return null;
}
Program: 65319
Project: 65319
Buggy source:
public void handleSelection(String[] paths,String rootPath,boolean isRelative){
  ClassPathElement[] elements=createClassPathElements(paths,rootPath,isRelative);
  helper.addClassPathElements(elements,true);
  if (folderPage != null) {
    folderPage.updateWizardPageStatus();
    if (folderPage.isDefaultPathInitialized()) {
      TableViewer friendTableViewer=folderPage.getTabFriendClassTabFolderPage().getClassPathsTableViewer();
      IMenuButtonHelper friendHelper=new MenuButtonHelper(friendTableViewer);
      friendHelper.addClassPathElements(elements,false);
      folderPage.getTabFriendClassTabFolderPage().updateWizardPageStatus();
      folderPage.setDefaultPathInitialized();
      folderPage.getTabFriendClassTabFolderPage().setDefaultPathInitialized();
    }
  }
}

Fixed version (ground truth):
public void handleSelection(String[] paths,String rootPath,boolean isRelative){
  ClassPathElement[] elements=createClassPathElements(paths,rootPath,isRelative);
  ((MenuButtonHelper)helper).updateTableElementsList();
  helper.addClassPathElements(elements,true);
  if (folderPage != null) {
    folderPage.updateWizardPageStatus();
    if (folderPage.isDefaultPathInitialized()) {
      TableViewer friendTableViewer=folderPage.getTabFriendClassTabFolderPage().getClassPathsTableViewer();
      IMenuButtonHelper friendHelper=new MenuButtonHelper(friendTableViewer);
      friendHelper.addClassPathElements(elements,false);
      folderPage.getTabFriendClassTabFolderPage().updateWizardPageStatus();
      folderPage.setDefaultPathInitialized();
      folderPage.getTabFriendClassTabFolderPage().setDefaultPathInitialized();
    }
  }
}
Program: 65320
Project: 65320
Buggy source:
public void addClassPathElements(ClassPathElement[] items,boolean current){
  updateTableElementsList(viewer);
  boolean containsDuplicated=false;
  for (int i=0; i < items.length; i++) {
    boolean exists=false;
    for (int j=0; j < elements.size(); j++) {
      if (elements.get(j).isRelativePath() == items[i].isRelativePath() && elements.get(j).getFullPath() != null && elements.get(j).getFullPath().equals(items[i].getFullPath())) {
        exists=true;
        break;
      }
    }
    if (!exists) {
      this.elements.add(items[i]);
    }
 else {
      containsDuplicated=true;
    }
  }
  viewer.setInput(elements);
  viewer.refresh();
  if (containsDuplicated && current) {
    ExceptionHandler.openMessageBox(Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),SWT.ICON_ERROR);
  }
}

Fixed version (ground truth):
public void addClassPathElements(ClassPathElement[] items,boolean current){
  boolean containsDuplicated=false;
  for (int i=0; i < items.length; i++) {
    boolean exists=false;
    for (int j=0; j < elements.size(); j++) {
      if (elements.get(j).isRelativePath() == items[i].isRelativePath() && elements.get(j).getFullPath() != null && elements.get(j).getFullPath().equals(items[i].getFullPath())) {
        exists=true;
        break;
      }
    }
    if (!exists) {
      this.elements.add(items[i]);
    }
 else {
      containsDuplicated=true;
    }
  }
  viewer.setInput(elements);
  viewer.refresh();
  if (containsDuplicated && current) {
    ExceptionHandler.openMessageBox(Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),SWT.ICON_ERROR);
  }
}
Program: 65321
Project: 65321
Buggy source:
public MenuButtonHelper(TableViewer viewer){
  this.viewer=viewer;
  updateTableElementsList(viewer);
}

Fixed version (ground truth):
public MenuButtonHelper(TableViewer viewer){
  this.viewer=viewer;
  updateTableElementsList();
}
Program: 65322
Project: 65322
Buggy source:
private void updateTableElementsList(TableViewer viewer){
  elements=(List<ClassPathElement>)viewer.getInput();
  if (elements == null) {
    elements=new ArrayList<ClassPathElement>();
  }
}

Fixed version (ground truth):
public void updateTableElementsList(){
  elements=(List<ClassPathElement>)viewer.getInput();
  if (elements == null) {
    elements=new ArrayList<ClassPathElement>();
  }
}
Program: 65323
Project: 65323
Buggy source:
public void setClassPath(String dataSetClassPath){
  initClassPathElements(dataSetClassPath);
}

Fixed version (ground truth):
public void setClassPath(String dataSetClassPath){
  this.dataSetClassPath=dataSetClassPath;
}
Program: 65324
Project: 65324
Buggy source:
public void initClassPathElements(String dataSetClassPath){
  if (elements == null)   elements=new ArrayList<ClassPathElement>();
  if (dataSetClassPath != null && dataSetClassPath.trim().length() > 0) {
    String paths[]=dataSetClassPath.split(PATH_SEPARATOR);
    ClassPathElement[] classPathElements=new ClassPathElement[paths.length];
    for (int i=0; i < paths.length; i++) {
      File file=new File(paths[i]);
      ClassPathElement element=new ClassPathElement(file.getName(),paths[i],!file.isAbsolute());
      this.elements.add(element);
      classPathElements[i]=element;
    }
    this.jarButton.getMenuButtonHelper().addClassPathElements(classPathElements,true);
  }
  classPathsTableViewer.setInput(elements);
  classPathsTableViewer.refresh();
  updateWizardPageStatus();
}

Fixed version (ground truth):
public void initClassPathElements(){
  if (elements == null)   elements=new ArrayList<ClassPathElement>();
 else   elements.clear();
  ((MenuButtonHelper)this.jarButton.getMenuButtonHelper()).clearTableElementsList();
  if (dataSetClassPath != null && dataSetClassPath.trim().length() > 0) {
    String paths[]=dataSetClassPath.split(PATH_SEPARATOR);
    ClassPathElement[] classPathElements=new ClassPathElement[paths.length];
    for (int i=0; i < paths.length; i++) {
      File file=new File(paths[i]);
      ClassPathElement element=new ClassPathElement(file.getName(),paths[i],!file.isAbsolute());
      classPathElements[i]=element;
      elements.add(element);
    }
    this.jarButton.getMenuButtonHelper().addClassPathElements(classPathElements,true);
  }
  classPathsTableViewer.setInput(elements);
  classPathsTableViewer.refresh();
  updateWizardPageStatus();
}
Program: 65325
Project: 65325
Buggy source:
private void initControlValues(){
  String dataSetClassPath=props.getProperty(Constants.POJO_DATA_SET_CLASS_PATH);
  String pojoClassPath=props.getProperty(Constants.POJO_CLASS_PATH);
  if (runtimePage != null) {
    runtimePage.setClassPath(dataSetClassPath);
    designtimePage.setClassPath(pojoClassPath);
  }
}

Fixed version (ground truth):
private void initControlValues(){
  if (runtimePage != null) {
    String dataSetClassPath=props.getProperty(Constants.POJO_DATA_SET_CLASS_PATH);
    String pojoClassPath=props.getProperty(Constants.POJO_CLASS_PATH);
    runtimePage.setClassPath(dataSetClassPath);
    designtimePage.setClassPath(pojoClassPath);
    runtimePage.initClassPathElements();
    designtimePage.initClassPathElements();
  }
}
Program: 65326
Project: 65326
Buggy source:
public void setInitialProperties(Properties dataSourceProps){
  if (dataSourceProps != null) {
    props=dataSourceProps;
  }
  initControlValues();
}

Fixed version (ground truth):
public void setInitialProperties(Properties dataSourceProps){
  if (dataSourceProps != null) {
    props=dataSourceProps;
    needsRefresh=true;
  }
}
Program: 65327
Project: 65327
Buggy source:
@Override public Properties collectCustomProperties(){
  return helper.collectCustomProperties();
}

Fixed version (ground truth):
public Properties collectCustomProperties(){
  return helper.collectCustomProperties();
}
Program: 65328
Project: 65328
Buggy source:
@Override public void createPageCustomControl(Composite parent){
  helper.setResourceIdentifiers(this.getHostResourceIdentifiers());
  helper.createPageCustomControl(parent);
}

Fixed version (ground truth):
public void createPageCustomControl(Composite parent){
  helper.setResourceIdentifiers(this.getHostResourceIdentifiers());
  helper.createPageCustomControl(parent);
}
Program: 65329
Project: 65329
Buggy source:
@Override public void setInitialProperties(Properties dataSourceProps){
  helper.setInitialProperties(dataSourceProps);
}

Fixed version (ground truth):
public void setInitialProperties(Properties dataSourceProps){
  helper.setInitialProperties(dataSourceProps);
}
Program: 65330
Project: 65330
Buggy source:
/** 
 * Get the chart instance from the design file and group X series of the chart. return An instance of the simulated runtime chart model (containing filled datasets)
 */
void groupSeries(){
  SessionHandle sessionHandle=new DesignEngine(new DesignConfig()).newSessionHandle((ULocale)null);
  ReportDesignHandle designHandle=null;
  String path="String_Node_Str";
  try {
    designHandle=sessionHandle.openDesign(path + "String_Node_Str");
    ExtendedItemHandle eih=(ExtendedItemHandle)designHandle.getBody().getContents().get(0);
    Chart cm=(Chart)eih.getReportItem().getProperty("String_Node_Str");
    cm.getTitle().getLabel().getCaption().setValue("String_Node_Str");
    SeriesDefinition sdX=(((ChartWithAxes)cm).getAxes().get(0)).getSeriesDefinitions().get(0);
    sdX.setSorting(SortOption.ASCENDING_LITERAL);
    sdX.getGrouping().setEnabled(true);
    sdX.getGrouping().setAggregateExpression("String_Node_Str");
    sdX.getGrouping().setGroupType(DataType.NUMERIC_LITERAL);
    sdX.getGrouping().setGroupingInterval(1);
    designHandle.saveAs(path + "String_Node_Str");
  }
 catch (  DesignFileException e) {
    e.printStackTrace();
  }
catch (  ExtendedElementException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Get the chart instance from the design file and group X series of the chart. return An instance of the simulated runtime chart model (containing filled datasets)
 */
void groupSeries(){
  SessionHandle sessionHandle=getDesignEngine().newSessionHandle((ULocale)null);
  ReportDesignHandle designHandle=null;
  String path="String_Node_Str";
  try {
    designHandle=sessionHandle.openDesign(path + "String_Node_Str");
    ExtendedItemHandle eih=(ExtendedItemHandle)designHandle.getBody().getContents().get(0);
    Chart cm=(Chart)eih.getReportItem().getProperty("String_Node_Str");
    cm.getTitle().getLabel().getCaption().setValue("String_Node_Str");
    SeriesDefinition sdX=(((ChartWithAxes)cm).getAxes().get(0)).getSeriesDefinitions().get(0);
    sdX.setSorting(SortOption.ASCENDING_LITERAL);
    sdX.getGrouping().setEnabled(true);
    sdX.getGrouping().setAggregateExpression("String_Node_Str");
    sdX.getGrouping().setGroupType(DataType.NUMERIC_LITERAL);
    sdX.getGrouping().setGroupingInterval(1);
    designHandle.saveAs(path + "String_Node_Str");
  }
 catch (  DesignFileException e) {
    e.printStackTrace();
  }
catch (  ExtendedElementException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    Platform.shutdown();
  }
}
Program: 65331
Project: 65331
Buggy source:
/** 
 * Get the chart instance from the design file and add series grouping key.
 * @return An instance of the simulated runtime chart model (containingfilled datasets)
 */
void groupKey(){
  SessionHandle sessionHandle=new DesignEngine(new DesignConfig()).newSessionHandle((ULocale)null);
  ReportDesignHandle designHandle=null;
  String path="String_Node_Str";
  try {
    designHandle=sessionHandle.openDesign(path + "String_Node_Str");
    ExtendedItemHandle eih=(ExtendedItemHandle)designHandle.getBody().getContents().get(0);
    Chart cm=(Chart)eih.getReportItem().getProperty("String_Node_Str");
    cm.getTitle().getLabel().getCaption().setValue("String_Node_Str");
    Axis axisBase=((ChartWithAxes)cm).getAxes().get(0);
    Axis axisOrth=axisBase.getAssociatedAxes().get(0);
    SeriesDefinition sdY=axisOrth.getSeriesDefinitions().get(0);
    SeriesDefinition sdGroup=SeriesDefinitionImpl.create();
    Query query=QueryImpl.create("String_Node_Str");
    sdGroup.setQuery(query);
    axisOrth.getSeriesDefinitions().clear();
    axisOrth.getSeriesDefinitions().add(0,sdGroup);
    sdGroup.getSeries().add(sdY.getSeries().get(0));
    designHandle.saveAs(path + "String_Node_Str");
  }
 catch (  DesignFileException e) {
    e.printStackTrace();
  }
catch (  ExtendedElementException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Get the chart instance from the design file and add series grouping key.
 * @return An instance of the simulated runtime chart model (containingfilled datasets)
 */
void groupKey(){
  SessionHandle sessionHandle=getDesignEngine().newSessionHandle((ULocale)null);
  ReportDesignHandle designHandle=null;
  String path="String_Node_Str";
  try {
    designHandle=sessionHandle.openDesign(path + "String_Node_Str");
    ExtendedItemHandle eih=(ExtendedItemHandle)designHandle.getBody().getContents().get(0);
    Chart cm=(Chart)eih.getReportItem().getProperty("String_Node_Str");
    cm.getTitle().getLabel().getCaption().setValue("String_Node_Str");
    Axis axisBase=((ChartWithAxes)cm).getAxes().get(0);
    Axis axisOrth=axisBase.getAssociatedAxes().get(0);
    SeriesDefinition sdY=axisOrth.getSeriesDefinitions().get(0);
    SeriesDefinition sdGroup=SeriesDefinitionImpl.create();
    Query query=QueryImpl.create("String_Node_Str");
    sdGroup.setQuery(query);
    axisOrth.getSeriesDefinitions().clear();
    axisOrth.getSeriesDefinitions().add(0,sdGroup);
    sdGroup.getSeries().add(sdY.getSeries().get(0));
    designHandle.saveAs(path + "String_Node_Str");
  }
 catch (  DesignFileException e) {
    e.printStackTrace();
  }
catch (  ExtendedElementException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    Platform.shutdown();
  }
}
Program: 65332
Project: 65332
Buggy source:
void createReport() throws SemanticException, IOException {
  SessionHandle session=new DesignEngine(new DesignConfig()).newSessionHandle((ULocale)null);
  reportDesignHandle=session.createDesign();
  elementFactory=reportDesignHandle.getElementFactory();
  createMasterPages();
  createDataSources();
  createDataSets();
  createBody();
  String outputPath="String_Node_Str";
  File outputFolder=new File(outputPath);
  if (!outputFolder.exists() && !outputFolder.mkdir()) {
    throw new IOException("String_Node_Str");
  }
  reportDesignHandle.saveAs(outputPath + "String_Node_Str" + "String_Node_Str");
}

Fixed version (ground truth):
void createReport() throws SemanticException, IOException {
  SessionHandle session=getDesignEngine().newSessionHandle((ULocale)null);
  reportDesignHandle=session.createDesign();
  elementFactory=reportDesignHandle.getElementFactory();
  createMasterPages();
  createDataSources();
  createDataSets();
  createBody();
  String outputPath="String_Node_Str";
  File outputFolder=new File(outputPath);
  if (!outputFolder.exists() && !outputFolder.mkdir()) {
    throw new IOException("String_Node_Str");
  }
  reportDesignHandle.saveAs(outputPath + "String_Node_Str" + "String_Node_Str");
  Platform.shutdown();
}
Program: 65333
Project: 65333
Buggy source:
void createReport() throws SemanticException, IOException {
  SessionHandle session=new DesignEngine(new DesignConfig()).newSessionHandle((ULocale)null);
  reportDesignHandle=session.createDesign();
  elementFactory=reportDesignHandle.getElementFactory();
  createMasterPages();
  createDataSources();
  createDataSets();
  createStyles();
  createBody();
  String outputPath="String_Node_Str";
  File outputFolder=new File(outputPath);
  if (!outputFolder.exists() && !outputFolder.mkdir()) {
    throw new IOException("String_Node_Str");
  }
  reportDesignHandle.saveAs(outputPath + "String_Node_Str" + "String_Node_Str");
}

Fixed version (ground truth):
void createReport() throws SemanticException, IOException {
  SessionHandle session=getDesignEngine().newSessionHandle((ULocale)null);
  reportDesignHandle=session.createDesign();
  elementFactory=reportDesignHandle.getElementFactory();
  createMasterPages();
  createDataSources();
  createDataSets();
  createStyles();
  createBody();
  String outputPath="String_Node_Str";
  File outputFolder=new File(outputPath);
  if (!outputFolder.exists() && !outputFolder.mkdir()) {
    throw new IOException("String_Node_Str");
  }
  reportDesignHandle.saveAs(outputPath + "String_Node_Str" + "String_Node_Str");
  Platform.shutdown();
}
Program: 65334
Project: 65334
Buggy source:
void createReport() throws SemanticException, IOException {
  SessionHandle session=new DesignEngine(new DesignConfig()).newSessionHandle((ULocale)null);
  reportDesignHandle=session.createDesign();
  elementFactory=reportDesignHandle.getElementFactory();
  createMasterPages();
  createDataSources();
  createDataSets();
  createBody();
  String outputPath="String_Node_Str";
  File outputFolder=new File(outputPath);
  if (!outputFolder.exists() && !outputFolder.mkdir()) {
    throw new IOException("String_Node_Str");
  }
  reportDesignHandle.saveAs(outputPath + "String_Node_Str" + "String_Node_Str");
}

Fixed version (ground truth):
void createReport() throws SemanticException, IOException {
  SessionHandle session=getDesignEngine().newSessionHandle((ULocale)null);
  reportDesignHandle=session.createDesign();
  elementFactory=reportDesignHandle.getElementFactory();
  createMasterPages();
  createDataSources();
  createDataSets();
  createBody();
  String outputPath="String_Node_Str";
  File outputFolder=new File(outputPath);
  if (!outputFolder.exists() && !outputFolder.mkdir()) {
    throw new IOException("String_Node_Str");
  }
  reportDesignHandle.saveAs(outputPath + "String_Node_Str" + "String_Node_Str");
  Platform.shutdown();
}
Program: 65335
Project: 65335
Buggy source:
protected void processGroup(ListingDesign listing,int groupLevel,boolean breakBefore){
  GroupDesign group=listing.getGroup(groupLevel);
  PolicyNode parent=parentNode;
  visitReportItem(group,Boolean.TRUE);
  parentNode=currentNode;
  if (group.getPageBreakAfter() != null) {
    currentNode.breakAfter=true;
  }
  if (breakBefore || group.getPageBreakBefore() != null) {
    currentNode.breakBefore=true;
  }
  BandDesign header=group.getHeader();
  if (header != null) {
    header.accept(this,null);
  }
  if (++groupLevel < listing.getGroupCount()) {
    processGroup(listing,groupLevel,header != null);
    processGroup(listing,groupLevel,false);
  }
 else {
    processDetail(listing,true);
    processDetail(listing,false);
  }
  BandDesign footer=group.getFooter();
  if (footer != null) {
    footer.accept(this,Boolean.TRUE);
  }
  parentNode=parent;
}

Fixed version (ground truth):
protected void processGroup(ListingDesign listing,int groupLevel,boolean breakBefore){
  GroupDesign group=listing.getGroup(groupLevel);
  PolicyNode parent=parentNode;
  visitReportItem(group,Boolean.TRUE);
  parentNode=currentNode;
  if (group.getPageBreakAfter() != null) {
    currentNode.breakAfter=true;
  }
  if (breakBefore || group.getPageBreakBefore() != null) {
    currentNode.breakBefore=true;
  }
  BandDesign header=group.getHeader();
  if (header != null) {
    header.accept(this,null);
  }
  if (++groupLevel < listing.getGroupCount()) {
    processGroup(listing,groupLevel,header != null);
  }
 else {
    processDetail(listing,true);
    processDetail(listing,false);
  }
  BandDesign footer=group.getFooter();
  if (footer != null) {
    footer.accept(this,Boolean.TRUE);
  }
  parentNode=parent;
}
Program: 65336
Project: 65336
Buggy source:
protected PolicyNode findNextNode(PolicyNode node){
  if (node == null || node.parent == null) {
    return null;
  }
  int index=node.parent.children.indexOf(node);
  int count=node.parent.children.size();
  if (index < count - 1) {
    return (PolicyNode)node.parent.children.get(index + 1);
  }
 else {
    return findPreviousNode(node.parent);
  }
}

Fixed version (ground truth):
protected PolicyNode findNextNode(PolicyNode node){
  if (node.design instanceof GroupDesign)   return node;
  if (node == null || node.parent == null) {
    return null;
  }
  int index=node.parent.children.indexOf(node);
  int count=node.parent.children.size();
  if (index < count - 1) {
    return (PolicyNode)node.parent.children.get(index + 1);
  }
 else {
    return findNextNode(node.parent);
  }
}
Program: 65337
Project: 65337
Buggy source:
protected PolicyNode findPreviousNode(PolicyNode node){
  if (node == null || node.parent == null) {
    return null;
  }
  int index=node.parent.children.indexOf(node);
  if (index < 1) {
    return findPreviousNode(node.parent);
  }
 else {
    return (PolicyNode)node.parent.children.get(index - 1);
  }
}

Fixed version (ground truth):
protected PolicyNode findPreviousNode(PolicyNode node){
  if (node.design instanceof GroupDesign)   return node;
  if (node == null || node.parent == null) {
    return null;
  }
  int index=node.parent.children.indexOf(node);
  if (index < 1) {
    return findPreviousNode(node.parent);
  }
 else {
    return (PolicyNode)node.parent.children.get(index - 1);
  }
}
Program: 65339
Project: 65339
Buggy source:
protected ActionHandle getDefaultAction(ExtendedItemHandle handle,String expression){
  ExpressionCodec exprCodec=ChartModelHelper.instance().createExpressionCodec();
  String bindingname=exprCodec.getBindingName(expression);
  if (bindingname == null) {
    return null;
  }
  if (ChartReportItemHelper.instance().getBindingCubeHandle(handle) != null) {
    CubeHandle cube=handle.getCube();
    for (    LevelHandle lh : ChartCubeUtil.getAllLevels(cube)) {
      if (bindingname.equals(ChartCubeUtil.createLevelBindingName(lh))) {
        return lh.getActionHandle();
      }
    }
    for (    MeasureHandle mh : ChartCubeUtil.getAllMeasures(cube)) {
      if (bindingname.equals(ChartCubeUtil.createMeasureBindingName(mh))) {
        return mh.getActionHandle();
      }
    }
  }
 else   if (ChartReportItemHelper.instance().getBindingDataSetHandle(handle) != null) {
    DataSetHandle dataset=handle.getDataSet();
    for (Iterator<?> iter=dataset.getPropertyHandle(DataSetHandle.COLUMN_HINTS_PROP).iterator(); iter.hasNext(); ) {
      ColumnHintHandle element=(ColumnHintHandle)iter.next();
      if (element.getColumnName().equals(bindingname) || bindingname.equals(element.getAlias())) {
        return element.getActionHandle();
      }
    }
  }
  return null;
}

Fixed version (ground truth):
protected ActionHandle getDefaultAction(ExtendedItemHandle handle,String expression){
  ExpressionCodec exprCodec=ChartModelHelper.instance().createExpressionCodec();
  String bindingname=exprCodec.getBindingName(expression);
  if (bindingname == null) {
    return null;
  }
  CubeHandle cube=handle.getCube();
  DataSetHandle dataset=handle.getDataSet();
  if (cube != null && ChartReportItemHelper.instance().getBindingCubeHandle(handle) != null) {
    for (    LevelHandle lh : ChartCubeUtil.getAllLevels(cube)) {
      if (bindingname.equals(ChartCubeUtil.createLevelBindingName(lh))) {
        return lh.getActionHandle();
      }
    }
    for (    MeasureHandle mh : ChartCubeUtil.getAllMeasures(cube)) {
      if (bindingname.equals(ChartCubeUtil.createMeasureBindingName(mh))) {
        return mh.getActionHandle();
      }
    }
  }
 else   if (dataset != null && ChartReportItemHelper.instance().getBindingDataSetHandle(handle) != null) {
    for (Iterator<?> iter=dataset.getPropertyHandle(DataSetHandle.COLUMN_HINTS_PROP).iterator(); iter.hasNext(); ) {
      ColumnHintHandle element=(ColumnHintHandle)iter.next();
      if (element.getColumnName().equals(bindingname) || bindingname.equals(element.getAlias())) {
        return element.getActionHandle();
      }
    }
  }
  return null;
}
Program: 65340
Project: 65340
Buggy source:
public void handleSelection(String[] paths,String rootPath,boolean isRelative){
  ClassPathElement[] elements=createClassPathElements(paths,rootPath,isRelative);
  helper.addClassPathElements(elements);
  if (folderPage != null) {
    folderPage.updateWizardPageStatus();
    if (folderPage.isDefaultPathInitialized()) {
      TableViewer friendTableViewer=folderPage.getTabFriendClassTabFolderPage().getClassPathsTableViewer();
      IMenuButtonHelper friendHelper=new MenuButtonHelper(friendTableViewer);
      friendHelper.addClassPathElements(elements);
      folderPage.getTabFriendClassTabFolderPage().updateWizardPageStatus();
      folderPage.setDefaultPathInitialized();
      folderPage.getTabFriendClassTabFolderPage().setDefaultPathInitialized();
    }
  }
}

Fixed version (ground truth):
public void handleSelection(String[] paths,String rootPath,boolean isRelative){
  ClassPathElement[] elements=createClassPathElements(paths,rootPath,isRelative);
  helper.addClassPathElements(elements,true);
  if (folderPage != null) {
    folderPage.updateWizardPageStatus();
    if (folderPage.isDefaultPathInitialized()) {
      TableViewer friendTableViewer=folderPage.getTabFriendClassTabFolderPage().getClassPathsTableViewer();
      IMenuButtonHelper friendHelper=new MenuButtonHelper(friendTableViewer);
      friendHelper.addClassPathElements(elements,false);
      folderPage.getTabFriendClassTabFolderPage().updateWizardPageStatus();
      folderPage.setDefaultPathInitialized();
      folderPage.getTabFriendClassTabFolderPage().setDefaultPathInitialized();
    }
  }
}
Program: 65341
Project: 65341
Buggy source:
public void addClassPathElements(ClassPathElement[] elements);

Fixed version (ground truth):
public void addClassPathElements(ClassPathElement[] elements,boolean current);
Program: 65342
Project: 65342
Buggy source:
public void addClassPathElements(ClassPathElement[] items){
  updateTableElementsList(viewer);
  boolean containsDuplicated=false;
  for (int i=0; i < items.length; i++) {
    boolean exists=false;
    for (int j=0; j < elements.size(); j++) {
      if (elements.get(j).isRelativePath() == items[i].isRelativePath() && elements.get(j).getFullPath() != null && elements.get(j).getFullPath().equals(items[i].getFullPath())) {
        exists=true;
        break;
      }
    }
    if (!exists) {
      this.elements.add(items[i]);
    }
 else {
      containsDuplicated=true;
    }
  }
  viewer.setInput(elements);
  viewer.refresh();
  if (containsDuplicated) {
    ExceptionHandler.openMessageBox(Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),SWT.ICON_ERROR);
  }
}

Fixed version (ground truth):
public void addClassPathElements(ClassPathElement[] items,boolean current){
  updateTableElementsList(viewer);
  boolean containsDuplicated=false;
  for (int i=0; i < items.length; i++) {
    boolean exists=false;
    for (int j=0; j < elements.size(); j++) {
      if (elements.get(j).isRelativePath() == items[i].isRelativePath() && elements.get(j).getFullPath() != null && elements.get(j).getFullPath().equals(items[i].getFullPath())) {
        exists=true;
        break;
      }
    }
    if (!exists) {
      this.elements.add(items[i]);
    }
 else {
      containsDuplicated=true;
    }
  }
  viewer.setInput(elements);
  viewer.refresh();
  if (containsDuplicated && current) {
    ExceptionHandler.openMessageBox(Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),SWT.ICON_ERROR);
  }
}
Program: 65343
Project: 65343
Buggy source:
public void initClassPathElements(String dataSetClassPath){
  if (elements == null)   elements=new ArrayList<ClassPathElement>();
  if (dataSetClassPath != null && dataSetClassPath.trim().length() > 0) {
    String paths[]=dataSetClassPath.split(PATH_SEPARATOR);
    ClassPathElement[] classPathElements=new ClassPathElement[paths.length];
    for (int i=0; i < paths.length; i++) {
      File file=new File(paths[i]);
      ClassPathElement element=new ClassPathElement(file.getName(),paths[i],!file.isAbsolute());
      this.elements.add(element);
      classPathElements[i]=element;
    }
    this.jarButton.getMenuButtonHelper().addClassPathElements(classPathElements);
  }
  classPathsTableViewer.setInput(elements);
  classPathsTableViewer.refresh();
  updateWizardPageStatus();
}

Fixed version (ground truth):
public void initClassPathElements(String dataSetClassPath){
  if (elements == null)   elements=new ArrayList<ClassPathElement>();
  if (dataSetClassPath != null && dataSetClassPath.trim().length() > 0) {
    String paths[]=dataSetClassPath.split(PATH_SEPARATOR);
    ClassPathElement[] classPathElements=new ClassPathElement[paths.length];
    for (int i=0; i < paths.length; i++) {
      File file=new File(paths[i]);
      ClassPathElement element=new ClassPathElement(file.getName(),paths[i],!file.isAbsolute());
      this.elements.add(element);
      classPathElements[i]=element;
    }
    this.jarButton.getMenuButtonHelper().addClassPathElements(classPathElements,true);
  }
  classPathsTableViewer.setInput(elements);
  classPathsTableViewer.refresh();
  updateWizardPageStatus();
}
Program: 65344
Project: 65344
Buggy source:
private boolean containsUnselectedItem(TreeItem[] items,boolean includeCurrent){
  for (int i=0; i < items.length; i++) {
    if (items[i].getData() instanceof FieldEntryWrapper) {
      return selectedFields.size() < allAvailableFields.size();
    }
    if (items[i].getData() instanceof FieldMetaData) {
      FieldMetaData field=(FieldMetaData)items[i].getData();
      if (!field.hasChildDocuments()) {
        return false;
      }
 else       if (!allChildrenSelected(field,includeCurrent)) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean containsUnselectedItem(TreeItem[] items,boolean includeCurrent){
  for (int i=0; i < items.length; i++) {
    if (items[i].getData() instanceof FieldMetaData) {
      FieldMetaData field=(FieldMetaData)items[i].getData();
      if (includeCurrent) {
        if (field.hasChildDocuments()) {
          if (!allChildrenSelected(field,false)) {
            return true;
          }
        }
 else         if (!isSelectedField(field.getFullDisplayName())) {
          return true;
        }
      }
 else       if (field.hasChildDocuments() && !allChildrenSelected(field,includeCurrent)) {
        return true;
      }
    }
  }
  return false;
}
Program: 65345
Project: 65345
Buggy source:
private void updateOperationButtons(){
  if (availableFieldsViewer.getTree().isFocusControl()) {
    if (availableFieldsViewer.getTree().getSelectionCount() > 0 && (availableFieldsViewer.getTree().getSelection()[0].getData() instanceof FieldEntryWrapper)) {
      addBtn.setEnabled(false);
    }
 else {
      addBtn.setEnabled(availableFieldsViewer.getTree().getSelectionCount() > 0 && !containsSelectedField(availableFieldsViewer.getTree().getSelection()));
    }
    addAllBtn.setEnabled(selectedFields.size() < allAvailableFields.size() && containsUnselectedItem(availableFieldsViewer.getTree().getSelection(),false));
    removeBtn.setEnabled(false);
    upBtn.setEnabled(false);
    downBtn.setEnabled(false);
  }
 else   if (selectedFieldsTable.getTable().isFocusControl()) {
    addBtn.setEnabled(false);
    addAllBtn.setEnabled(false);
    removeBtn.setEnabled(selectedFieldsTable.getTable().getSelectionCount() > 0);
    if (selectedFieldsTable.getTable().getSelectionCount() == 1) {
      int index=selectedFieldsTable.getTable().getSelectionIndex();
      int count=selectedFieldsTable.getTable().getItemCount();
      upBtn.setEnabled(index > 0 && index < count);
      downBtn.setEnabled(index >= 0 && index < (count - 1));
    }
 else {
      upBtn.setEnabled(false);
      downBtn.setEnabled(false);
    }
  }
 else {
    addBtn.setEnabled(false);
    addAllBtn.setEnabled(false);
    removeBtn.setEnabled(false);
    upBtn.setEnabled(false);
    downBtn.setEnabled(false);
  }
  removeAllBtn.setEnabled(selectedFields.size() > 0);
}

Fixed version (ground truth):
private void updateOperationButtons(){
  if (availableFieldsViewer.getTree().isFocusControl()) {
    if (availableFieldsViewer.getTree().getSelectionCount() > 0 && (availableFieldsViewer.getTree().getSelection()[0].getData() instanceof FieldEntryWrapper)) {
      addBtn.setEnabled(false);
    }
 else {
      addBtn.setEnabled(availableFieldsViewer.getTree().getSelectionCount() > 0 && !containsSelectedField(availableFieldsViewer.getTree().getSelection()));
    }
    addAllBtn.setEnabled(selectedFields.size() < allAvailableFields.size() && containsUnselectedItem(availableFieldsViewer.getTree().getSelection()));
    removeBtn.setEnabled(false);
    upBtn.setEnabled(false);
    downBtn.setEnabled(false);
  }
 else   if (selectedFieldsTable.getTable().isFocusControl()) {
    addBtn.setEnabled(false);
    addAllBtn.setEnabled(false);
    removeBtn.setEnabled(selectedFieldsTable.getTable().getSelectionCount() > 0);
    if (selectedFieldsTable.getTable().getSelectionCount() == 1) {
      int index=selectedFieldsTable.getTable().getSelectionIndex();
      int count=selectedFieldsTable.getTable().getItemCount();
      upBtn.setEnabled(index > 0 && index < count);
      downBtn.setEnabled(index >= 0 && index < (count - 1));
    }
 else {
      upBtn.setEnabled(false);
      downBtn.setEnabled(false);
    }
  }
 else {
    addBtn.setEnabled(false);
    addAllBtn.setEnabled(false);
    removeBtn.setEnabled(false);
    upBtn.setEnabled(false);
    downBtn.setEnabled(false);
  }
  removeAllBtn.setEnabled(selectedFields.size() > 0);
}
Program: 65346
Project: 65346
Buggy source:
private void createTabFolderArea(Composite composite){
  Composite tabArea=new Composite(composite,SWT.NONE);
  GridLayout layout=new GridLayout(1,false);
  layout.marginWidth=10;
  tabArea.setLayout(layout);
  tabArea.setLayoutData(new GridData(GridData.FILL_BOTH));
  tabFolder=new TabFolder(tabArea,SWT.TOP);
  tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
  runtimePage=new POJOClassTabFolderPage(this,getApplResourceDir());
  runtimePage.setPrompMessage(Messages.getString("String_Node_Str"));
  TabItem runtimeTab=runtimePage.createContents(tabFolder);
  runtimeTab.setText(Messages.getString("String_Node_Str"));
  runtimeTab.setImage(Utils.getRunTimeIcon());
  designtimePage=new POJOClassTabFolderPage(this,getApplResourceDir());
  designtimePage.setPrompMessage(Messages.getString("String_Node_Str"));
  TabItem designTimeTab=designtimePage.createContents(tabFolder);
  designTimeTab.setText(Messages.getString("String_Node_Str"));
  designTimeTab.setImage(Utils.getDesignTimeIcon());
  runtimePage.setFriendPage(designtimePage);
  designtimePage.setFriendPage(runtimePage);
  initControlValues();
}

Fixed version (ground truth):
private void createTabFolderArea(Composite composite){
  Composite tabArea=new Composite(composite,SWT.NONE);
  GridLayout layout=new GridLayout(1,false);
  layout.marginWidth=10;
  tabArea.setLayout(layout);
  tabArea.setLayoutData(new GridData(GridData.FILL_BOTH));
  tabFolder=new TabFolder(tabArea,SWT.TOP);
  tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
  runtimePage=new POJOClassTabFolderPage(this,getApplResourceDir());
  runtimePage.setPrompMessage(Messages.getString("String_Node_Str"));
  TabItem runtimeTab=runtimePage.createContents(tabFolder);
  runtimeTab.setText(Messages.getString("String_Node_Str"));
  designtimePage=new POJOClassTabFolderPage(this,getApplResourceDir());
  designtimePage.setPrompMessage(Messages.getString("String_Node_Str"));
  TabItem designTimeTab=designtimePage.createContents(tabFolder);
  designTimeTab.setText(Messages.getString("String_Node_Str"));
  runtimePage.setFriendPage(designtimePage);
  designtimePage.setFriendPage(runtimePage);
  initControlValues();
}
Program: 65347
Project: 65347
Buggy source:
private void createExpressionButton(Composite composite,final Text property,String propName,boolean isEncryptable){
  ExpressionButton exprButton=ExpressionButtonUtil.createExpressionButton(composite,property,new ExpressionProvider(handle),handle,true,SWT.PUSH);
  if (isEncryptable) {
    exprButton.setExpressionButtonProvider(new ExprButtonProvider(true,property));
  }
  Expression expr=handle.getPropertyBindingExpression(propName);
  property.setData(ExpressionButtonUtil.EXPR_TYPE,expr == null || expr.getType() == null ? UIUtil.getDefaultScriptType() : (String)expr.getType());
  property.setText((expr == null || expr.getStringExpression() == null) ? "String_Node_Str" : expr.getStringExpression());
  exprButton.refresh();
}

Fixed version (ground truth):
private void createExpressionButton(Composite composite,final Text property,String propName,boolean isEncryptable){
  ExpressionButton exprButton=ExpressionButtonUtil.createExpressionButton(composite,property,new ExpressionProvider(handle),handle,SWT.PUSH);
  if (isEncryptable) {
    exprButton.setExpressionButtonProvider(new ExprButtonProvider(true,property));
  }
  Expression expr=handle.getPropertyBindingExpression(propName);
  property.setData(ExpressionButtonUtil.EXPR_TYPE,expr == null || expr.getType() == null ? UIUtil.getDefaultScriptType() : (String)expr.getType());
  property.setText((expr == null || expr.getStringExpression() == null) ? "String_Node_Str" : expr.getStringExpression());
  exprButton.refresh();
}