nus-yam/ex-repair huggingface dataset:
Program: 96320
Project: 96320
Buggy source:
/** 
 * {@inheritDoc}
 */
public void postWindowOpen(){
  super.postWindowOpen();
  for (  IWorkbenchWindow window : PlatformUI.getWorkbench().getWorkbenchWindows()) {
    IWorkbenchPage page=window.getActivePage();
    if (page != null) {
      for (      String actionSetToHide : ACTION_SETS_TO_HIDE) {
        page.hideActionSet(actionSetToHide);
      }
    }
  }
  AbstractUIPlugin plugin=Activator.getDefault();
  ImageRegistry imageRegistry=plugin.getImageRegistry();
  getWindowConfigurer().getWindow().getShell().setImages(new Image[]{imageRegistry.get(Activator.IMAGE_GIF_JB_16_16_ID),imageRegistry.get(Activator.IMAGE_GIF_JB_32_32_ID),imageRegistry.get(Activator.IMAGE_GIF_JB_48_48_ID),imageRegistry.get(Activator.IMAGE_GIF_JB_64_64_ID),imageRegistry.get(Activator.IMAGE_GIF_JB_128_128_ID),imageRegistry.get(Activator.IMAGE_PNG_JB_16_16_ID),imageRegistry.get(Activator.IMAGE_PNG_JB_32_32_ID),imageRegistry.get(Activator.IMAGE_PNG_JB_48_48_ID),imageRegistry.get(Activator.IMAGE_PNG_JB_64_64_ID),imageRegistry.get(Activator.IMAGE_PNG_JB_128_128_ID)});
  Plugin.createStatusLineItems();
  Plugin.showStatusLine((IWorkbenchPart)null);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void postWindowOpen(){
  super.postWindowOpen();
  for (  IWorkbenchWindow window : PlatformUI.getWorkbench().getWorkbenchWindows()) {
    IWorkbenchPage page=window.getActivePage();
    if (page != null) {
      for (      String actionSetToHide : ACTION_SETS_TO_HIDE) {
        page.hideActionSet(actionSetToHide);
      }
    }
  }
  AbstractUIPlugin plugin=Activator.getDefault();
  ImageRegistry imageRegistry=plugin.getImageRegistry();
  getWindowConfigurer().getWindow().getShell().setImages(new Image[]{imageRegistry.get(Activator.IMAGE_GIF_JB_16_16_ID),imageRegistry.get(Activator.IMAGE_GIF_JB_32_32_ID),imageRegistry.get(Activator.IMAGE_GIF_JB_48_48_ID),imageRegistry.get(Activator.IMAGE_GIF_JB_64_64_ID),imageRegistry.get(Activator.IMAGE_GIF_JB_128_128_ID),imageRegistry.get(Activator.IMAGE_PNG_JB_16_16_ID),imageRegistry.get(Activator.IMAGE_PNG_JB_32_32_ID),imageRegistry.get(Activator.IMAGE_PNG_JB_48_48_ID),imageRegistry.get(Activator.IMAGE_PNG_JB_64_64_ID),imageRegistry.get(Activator.IMAGE_PNG_JB_128_128_ID)});
  Plugin.createStatusLineItems();
  Plugin.showStatusLine((IWorkbenchPart)null);
  ApplicationWindowTitleUpdater updater=new ApplicationWindowTitleUpdater();
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  ded.addProjectLoadedListener(updater,true);
  ded.addDataChangedListener(updater,true);
  DatabaseStateDispatcher.addDatabaseStateListener(updater);
}
Program: 96321
Project: 96321
Buggy source:
/** 
 */
public void dispose(){
  if (m_sf != null) {
    try {
      for (      EntityManager sess : m_sessions) {
        if (sess.isOpen()) {
          sess.close();
        }
      }
      m_sessions.clear();
      m_sf.close();
    }
 catch (    Throwable e) {
      log.error(Messages.DisposeOfHibernatorFailed,e);
    }
  }
  instance=null;
}

Fixed version (ground truth):
/** 
 */
public void dispose(){
  if (m_sf != null) {
    try {
      for (      EntityManager sess : m_sessions) {
        if (sess.isOpen()) {
          sess.close();
        }
      }
      m_sessions.clear();
      m_sf.close();
      DatabaseStateDispatcher.notifyListener(new DatabaseStateEvent(DatabaseState.DB_LOGOUT_SUCCEEDED));
    }
 catch (    Throwable e) {
      log.error(Messages.DisposeOfHibernatorFailed,e);
    }
  }
  instance=null;
}
Program: 96322
Project: 96322
Buggy source:
/** 
 * Notifies all progressListeners of the progress listener list and calls <code>progressListener.reactOnProgressEvent(ProgressEvent e)</code>
 * @param e the progressEvent
 */
public static void notifyListener(DatabaseStateEvent e){
  Iterator iter=getListeners().iterator();
  while (iter.hasNext()) {
    IDatabaseStateListener progressListener=(IDatabaseStateListener)iter.next();
    if (progressListener != null) {
      progressListener.reactOnProgressEvent(e);
    }
 else {
      if (listener != null) {
        listener.remove(progressListener);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Notifies all progressListeners of the progress listener list and calls <code>progressListener.reactOnProgressEvent(ProgressEvent e)</code>
 * @param e the progressEvent
 */
public static void notifyListener(DatabaseStateEvent e){
  Iterator iter=getListeners().iterator();
  while (iter.hasNext()) {
    IDatabaseStateListener progressListener=(IDatabaseStateListener)iter.next();
    if (progressListener != null) {
      progressListener.reactOnDatabaseEvent(e);
    }
 else {
      if (listener != null) {
        listener.remove(progressListener);
      }
    }
  }
}
Program: 96324
Project: 96324
Buggy source:
/** 
 * call this if the "save as" has ended to update the GUI.
 */
private void fireReady(){
  DataEventDispatcher dispatcher=DataEventDispatcher.getInstance();
  dispatcher.fireProjectLoadedListener(new NullProgressMonitor());
  IProjectPO project=GeneralStorage.getInstance().getProject();
  if (project != null) {
    Plugin.setProjectNameInTitlebar(project.getName(),project.getMajorProjectVersion(),project.getMinorProjectVersion());
  }
  dispatcher.fireProjectOpenedListener();
}

Fixed version (ground truth):
/** 
 * call this if the "save as" has ended to update the GUI.
 */
private void fireReady(){
  DataEventDispatcher dispatcher=DataEventDispatcher.getInstance();
  dispatcher.fireProjectLoadedListener(new NullProgressMonitor());
  dispatcher.fireProjectOpenedListener();
}
Program: 96326
Project: 96326
Buggy source:
public void run(){
  Plugin.setProjectNameInTitlebar(project.getName(),project.getMajorProjectVersion(),project.getMinorProjectVersion());
}

Fixed version (ground truth):
public void run(){
  final ProjectWizard projectWizard=new ProjectWizard();
  projectWizard.init(null,null);
  WizardDialog dialog=new WizardDialog(Plugin.getShell(),projectWizard){
    /** 
 * {@inheritDoc}
 */
    protected void finishPressed(){
      String selectedToolkit=projectWizard.getAutSettingWizardPage().getToolkitComboBox().getSelectedObject();
      if (selectedToolkit == null) {
        selectedToolkit=projectWizard.getProjectSettingWizardPage().getToolkitComboBox().getSelectedObject();
      }
      createWizardNagDialog(selectedToolkit);
      super.finishPressed();
    }
    /** 
 * {@inheritDoc}
 */
    protected void nextPressed(){
      if (projectWizard.getPage(projectWizard.getAutConfigSettingWpID()).equals(super.getCurrentPage())) {
        String selectedToolkit=projectWizard.getAutSettingWizardPage().getToolkitComboBox().getSelectedObject();
        if (selectedToolkit == null) {
          selectedToolkit=projectWizard.getProjectSettingWizardPage().getToolkitComboBox().getSelectedObject();
        }
        createWizardNagDialog(selectedToolkit);
      }
      super.nextPressed();
    }
  }
;
  dialog.open();
  if (dialog.getReturnCode() == Window.OK) {
    final IProjectPO project=GeneralStorage.getInstance().getProject();
    IRunnableWithProgress op=new OpenProjectHandler.OpenProjectOperation(project);
    try {
      PlatformUI.getWorkbench().getProgressService().busyCursorWhile(op);
    }
 catch (    InvocationTargetException e) {
    }
catch (    InterruptedException e) {
    }
  }
}
Program: 96328
Project: 96328
Buggy source:
/** 
 * call this if the "save as" has ended to update the GUI.
 */
private void fireReady(){
  DataEventDispatcher dispatcher=DataEventDispatcher.getInstance();
  dispatcher.fireProjectLoadedListener(new NullProgressMonitor());
  IProjectPO project=GeneralStorage.getInstance().getProject();
  Plugin.setProjectNameInTitlebar(project.getName(),project.getMajorProjectVersion(),project.getMinorProjectVersion());
  dispatcher.fireProjectOpenedListener();
}

Fixed version (ground truth):
/** 
 * call this if the "save as" has ended to update the GUI.
 */
private void fireReady(){
  DataEventDispatcher dispatcher=DataEventDispatcher.getInstance();
  dispatcher.fireProjectLoadedListener(new NullProgressMonitor());
  dispatcher.fireProjectOpenedListener();
}
Program: 96330
Project: 96330
Buggy source:
/** 
 * clears the content of client
 */
public static void clearClient(){
  final DataEventDispatcher ded=DataEventDispatcher.getInstance();
  TestExecution.getInstance().stopExecution();
  GeneralStorage gs=GeneralStorage.getInstance();
  if (gs != null && Hibernator.instance() != null) {
    IProjectPO currProj=gs.getProject();
    if (currProj != null) {
      gs.setProject(null);
      ded.fireDataChangedListener(currProj,DataState.Deleted,UpdateState.all);
    }
    gs.reset();
  }
  Plugin.getDisplay().syncExec(new Runnable(){
    public void run(){
      TestExecutionContributor.getInstance().getClientTest().resetToTesting();
      ded.fireRecordModeStateChanged(RecordModeState.notRunning);
      ded.fireOMStateChanged(OMState.notRunning);
      Plugin.setProjectNameInTitlebar(null,null,null);
      Plugin.closeAllOpenedJubulaEditors();
      ded.fireTestresultChanged(TestresultState.Refresh);
      setTreeViewerInputNull(Constants.TESTRE_ID);
      setTreeViewerInputNull(Constants.TC_BROWSER_ID);
      setTreeViewerInputNull(Constants.TS_BROWSER_ID);
      setTreeViewerInputNull(Constants.COMPNAMEBROWSER_ID);
    }
  }
);
  ded.fireProjectLoadedListener(new NullProgressMonitor());
}

Fixed version (ground truth):
/** 
 * clears the content of client
 */
public static void clearClient(){
  final DataEventDispatcher ded=DataEventDispatcher.getInstance();
  TestExecution.getInstance().stopExecution();
  GeneralStorage gs=GeneralStorage.getInstance();
  if (gs != null && Hibernator.instance() != null) {
    IProjectPO currProj=gs.getProject();
    if (currProj != null) {
      gs.setProject(null);
      ded.fireDataChangedListener(currProj,DataState.Deleted,UpdateState.all);
    }
    gs.reset();
  }
  Plugin.getDisplay().syncExec(new Runnable(){
    public void run(){
      TestExecutionContributor.getInstance().getClientTest().resetToTesting();
      ded.fireRecordModeStateChanged(RecordModeState.notRunning);
      ded.fireOMStateChanged(OMState.notRunning);
      Plugin.closeAllOpenedJubulaEditors();
      ded.fireTestresultChanged(TestresultState.Refresh);
      setTreeViewerInputNull(Constants.TESTRE_ID);
      setTreeViewerInputNull(Constants.TC_BROWSER_ID);
      setTreeViewerInputNull(Constants.TS_BROWSER_ID);
      setTreeViewerInputNull(Constants.COMPNAMEBROWSER_ID);
    }
  }
);
  ded.fireProjectLoadedListener(new NullProgressMonitor());
}
Program: 96332
Project: 96332
Buggy source:
public void run(){
  Plugin.setProjectNameInTitlebar(newProjectName,m_newProject.getMajorProjectVersion(),m_newProject.getMinorProjectVersion());
}

Fixed version (ground truth):
public void run(IProgressMonitor monitor) throws InterruptedException {
  monitor.beginTask(NLS.bind(Messages.ProjectWizardCreatingProject,new Object[]{name}),IProgressMonitor.UNKNOWN);
  try {
    createNewProject(name,monitor);
    m_newProject=null;
  }
  finally {
    monitor.done();
  }
}
Program: 96333
Project: 96333
Buggy source:
/** 
 * Add an existing SpecTC to another SpecTC by reference. Lock the TC if this is the first usage to prevent accidental deletion before the editor is saved.
 * @param editSupport holds the DB session for locking purposes
 * @param targetTC TC where the reference shall be added.
 * @param referencedTC TC to be used as a reference.
 * @param position Index position for the ExecTC, null means append.
 * @throws PMAlreadyLockedException if the referenced TC was neverreferenced before and is edited by another user.
 * @throws PMDirtyVersionException if the referenced TC was modified
 * @throws PMObjectDeletedException if the po as deleted by another concurrently working user
 * @return The ExecTC used to reference the SpecTC
 */
public static IExecTestCasePO addReferencedTestCase(EditSupport editSupport,INodePO targetTC,ISpecTestCasePO referencedTC,Integer position) throws PMAlreadyLockedException, PMDirtyVersionException, PMObjectDeletedException {
  handleFirstReference(editSupport,referencedTC,false);
  IExecTestCasePO newExecTC=NodeMaker.createExecTestCasePO(referencedTC);
  if (position != null) {
    targetTC.addNode(position.intValue(),newExecTC);
  }
 else {
    targetTC.addNode(newExecTC);
  }
  return newExecTC;
}

Fixed version (ground truth):
/** 
 * Add an existing SpecTC to another SpecTC by reference. Lock the TC if this is the first usage to prevent accidental deletion before the editor is saved.
 * @param editSupport holds the DB session for locking purposes
 * @param targetTC TC where the reference shall be added.
 * @param referencedTC TC to be used as a reference.
 * @param position Index position for the ExecTC, null means append.
 * @throws PMAlreadyLockedException if the referenced TC was neverreferenced before and is edited by another user.
 * @throws PMDirtyVersionException if the referenced TC was modified
 * @throws PMObjectDeletedException if the po as deleted by another concurrently working user
 * @return The ExecTC used to reference the SpecTC
 */
public static IExecTestCasePO addReferencedTestCase(EditSupport editSupport,INodePO targetTC,ISpecTestCasePO referencedTC,Integer position) throws PMAlreadyLockedException, PMDirtyVersionException, PMObjectDeletedException {
  handleFirstReference(editSupport,referencedTC,false);
  IExecTestCasePO newExecTC=NodeMaker.createExecTestCasePO(referencedTC);
  if (position != null) {
    targetTC.addNode(position.intValue(),newExecTC);
  }
 else {
    targetTC.addNode(newExecTC);
  }
  DataEventDispatcher.getInstance().fireDataChangedListener(newExecTC,DataState.Added,UpdateState.onlyInEditor);
  return newExecTC;
}
Program: 96334
Project: 96334
Buggy source:
/** 
 * sets the selection in the given TreeViewer to the given node and also gives the given tree viewer focus
 * @param node the node to select
 * @param tv the TreeViewer
 */
public static void setSelectionAndFocusToNode(INodePO node,TreeViewer tv){
  TreeIterator it=new TreeIterator((INodePO)tv.getInput());
  List<INodePO> guiNodeList=it.getGuiNodeOfNodePO(node);
  tv.getTree().setFocus();
  tv.setSelection(new StructuredSelection(guiNodeList),true);
}

Fixed version (ground truth):
/** 
 * sets the selection in the given TreeViewer to the given node and also gives the given tree viewer focus
 * @param node the node to select
 * @param tv the TreeViewer
 */
public static void setSelectionAndFocusToNode(INodePO node,TreeViewer tv){
  tv.getTree().setFocus();
  tv.setSelection(new StructuredSelection(node),true);
}
Program: 96335
Project: 96335
Buggy source:
/** 
 * Drops the given TestCase on the given TestSuite. The TestCase will be inserted at the end.
 * @param testSuite the TestSuite to drop on
 * @param testcaseGUI the TestCAse to drop
 * @throws PMReadException in case of persistence error
 * @throws PMAlreadyLockedException in case of persistence error
 * @throws PMDirtyVersionException in case of persistence error
 * @throws PMException in case of persistence error
 */
private static void dropOnTestsuite(ITestSuitePO testSuite,ISpecTestCasePO testcaseGUI) throws PMReadException, PMAlreadyLockedException, PMDirtyVersionException, PMException {
  if (getTCBrowser() != null) {
    getTCBrowser().addReferencedTestCase(testcaseGUI,testSuite,0);
  }
}

Fixed version (ground truth):
/** 
 * Drops the given TestCase on the given TestSuite. The TestCase will be inserted at the end.
 * @param editSupport The EditSupport in which to perform the action.
 * @param testSuite the TestSuite to drop on
 * @param testcase the TestCAse to drop
 * @throws PMReadException in case of persistence error
 * @throws PMAlreadyLockedException in case of persistence error
 * @throws PMDirtyVersionException in case of persistence error
 * @throws PMException in case of persistence error
 */
private static void dropOnTestsuite(EditSupport editSupport,ITestSuitePO testSuite,ISpecTestCasePO testcase) throws PMReadException, PMAlreadyLockedException, PMDirtyVersionException, PMException {
  TestCaseBP.addReferencedTestCase(editSupport,testSuite,testcase,0);
}
Program: 96336
Project: 96336
Buggy source:
/** 
 * @param node the node to be dropped.
 * @param target the target node.
 * @throws PMReadException in case of db read error
 * @throws PMDirtyVersionException in case of version conflict (dirty read)
 * @throws PMAlreadyLockedException if the origSpecTc is already locked by another user
 * @throws PMException in case of unspecified db error
 */
private static void dropOnSpecTc(INodePO node,INodePO target) throws PMReadException, PMAlreadyLockedException, PMDirtyVersionException, PMException {
  getTCBrowser().addReferencedTestCase((ISpecTestCasePO)node,target,0);
}

Fixed version (ground truth):
/** 
 * @param editSupport The EditSupport in which to perform the action.
 * @param node the node to be dropped.
 * @param target the target node.
 * @throws PMReadException in case of db read error
 * @throws PMDirtyVersionException in case of version conflict (dirty read)
 * @throws PMAlreadyLockedException if the origSpecTc is already locked by another user
 * @throws PMException in case of unspecified db error
 */
private static void dropOnSpecTc(EditSupport editSupport,INodePO node,INodePO target) throws PMReadException, PMAlreadyLockedException, PMDirtyVersionException, PMException {
  TestCaseBP.addReferencedTestCase(editSupport,target,(ISpecTestCasePO)node,0);
}
Program: 96337
Project: 96337
Buggy source:
/** 
 * @param node the node to be dropped
 * @param target the target node.
 * @param location One of the values defined in ViewerDropAdapter to indicate the drop position relative to the drop target.
 * @throws PMReadException in case of db read error
 * @throws PMDirtyVersionException in case of version conflict (dirty read)
 * @throws PMAlreadyLockedException if the origSpecTc is already locked by another user
 * @throws PMException in case of unspecified db error
 */
private static void dropOnCAPorExecTc(INodePO node,INodePO target,int location) throws PMReadException, PMAlreadyLockedException, PMDirtyVersionException, PMException {
  ISpecTestCasePO specTcGUItoDrop=(ISpecTestCasePO)node;
  INodePO parentGUI=target.getParentNode();
  int position=parentGUI.indexOf(target);
  if (location != ViewerDropAdapter.LOCATION_BEFORE) {
    position++;
  }
  getTCBrowser().addReferencedTestCase(specTcGUItoDrop,parentGUI,position);
}

Fixed version (ground truth):
/** 
 * @param editSupport The EditSupport in which to perform the action.
 * @param node the node to be dropped
 * @param target the target node.
 * @param location One of the values defined in ViewerDropAdapter to indicate the drop position relative to the drop target.
 * @throws PMReadException in case of db read error
 * @throws PMDirtyVersionException in case of version conflict (dirty read)
 * @throws PMAlreadyLockedException if the origSpecTc is already locked by another user
 * @throws PMException in case of unspecified db error
 */
private static void dropOnCAPorExecTc(EditSupport editSupport,INodePO node,INodePO target,int location) throws PMReadException, PMAlreadyLockedException, PMDirtyVersionException, PMException {
  ISpecTestCasePO specTcGUItoDrop=(ISpecTestCasePO)node;
  INodePO parentGUI=target.getParentNode();
  int position=parentGUI.indexOf(target);
  if (location != ViewerDropAdapter.LOCATION_BEFORE) {
    position++;
  }
  TestCaseBP.addReferencedTestCase(editSupport,parentGUI,specTcGUItoDrop,position);
}
Program: 96339
Project: 96339
Buggy source:
public void selectionChanged(IWorkbenchPart part,ISelection selection){
  if (!(selection instanceof IStructuredSelection)) {
    return;
  }
  List<Object> selectedElements=((IStructuredSelection)selection).toList();
  Collections.reverse(selectedElements);
  Iterator iter=selectedElements.iterator();
  try {
    while (iter.hasNext()) {
      ISpecTestCasePO specTcToInsert=(ISpecTestCasePO)iter.next();
      try {
        tce.getTCBrowser().addReferencedTestCase(specTcToInsert,editorNode,index);
      }
 catch (      PMException e) {
        NodeEditorInput inp=(NodeEditorInput)tce.getAdapter(NodeEditorInput.class);
        INodePO inpNode=inp.getNode();
        PMExceptionHandler.handlePMExceptionForMasterSession(e);
        tce.reOpenEditor(inpNode);
      }
    }
    tce.getEditorHelper().getEditSupport().lockWorkVersion();
    tce.getEditorHelper().setDirty(true);
  }
 catch (  PMException e1) {
    PMExceptionHandler.handlePMExceptionForEditor(e1,tce);
  }
}

Fixed version (ground truth):
public void selectionChanged(IWorkbenchPart part,ISelection selection){
  if (!(selection instanceof IStructuredSelection)) {
    return;
  }
  List<Object> selectedElements=((IStructuredSelection)selection).toList();
  Collections.reverse(selectedElements);
  Iterator iter=selectedElements.iterator();
  List<IExecTestCasePO> addedElements=new ArrayList<IExecTestCasePO>();
  try {
    while (iter.hasNext()) {
      ISpecTestCasePO specTcToInsert=(ISpecTestCasePO)iter.next();
      try {
        addedElements.add(TestCaseBP.addReferencedTestCase(tce.getEditorHelper().getEditSupport(),editorNode,specTcToInsert,index));
      }
 catch (      PMException e) {
        NodeEditorInput inp=(NodeEditorInput)tce.getAdapter(NodeEditorInput.class);
        INodePO inpNode=inp.getNode();
        PMExceptionHandler.handlePMExceptionForMasterSession(e);
        tce.reOpenEditor(inpNode);
      }
    }
    tce.getEditorHelper().getEditSupport().lockWorkVersion();
    tce.getEditorHelper().setDirty(true);
    tce.setSelection(new StructuredSelection(addedElements));
  }
 catch (  PMException e1) {
    PMExceptionHandler.handlePMExceptionForEditor(e1,tce);
  }
}
Program: 96341
Project: 96341
Buggy source:
/** 
 * Refreshes the viewer and updates the expansion state and selection based on the added node.
 * @param addedNode The node that has been added.
 */
protected void handleNodeAdded(INodePO addedNode){
  getTreeViewer().refresh();
  getTreeViewer().expandAll();
  getTreeViewer().setSelection(new StructuredSelection(addedNode));
}

Fixed version (ground truth):
/** 
 * Refreshes the viewer and updates the expansion state and selection based on the added node.
 * @param addedNode The node that has been added.
 */
protected void handleNodeAdded(INodePO addedNode){
  getTreeViewer().refresh();
  getTreeViewer().setSelection(new StructuredSelection(addedNode));
}
Program: 96342
Project: 96342
Buggy source:
/** 
 * {@inheritDoc}
 */
public void handleDataChanged(IPersistentObject po,DataState dataState,UpdateState updateState){
  if (po instanceof INodePO) {
switch (dataState) {
case Added:
      INodePO addedNode=(INodePO)po;
    INodePO editorNode=(INodePO)getEditorHelper().getEditSupport().getWorkVersion();
  if (editorNode.indexOf(addedNode) > -1 || (editorNode instanceof ISpecTestCasePO && ((ISpecTestCasePO)editorNode).getEventExecTcMap().containsValue(po))) {
    handleNodeAdded(addedNode);
  }
break;
case Deleted:
if (!(po instanceof IProjectPO)) {
INodePO guiNode=((INodePO[])getTreeViewer().getInput())[0];
GuiNodeBP.setSelectionAndFocusToNode(guiNode,getTreeViewer());
}
break;
case Renamed:
renameGUINode(po);
break;
case StructureModified:
if (!handleStructureModified(po)) {
return;
}
break;
case ReuseChanged:
break;
default :
Assert.notReached();
}
getEditorHelper().handleDataChanged(po,dataState,updateState);
}
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void handleDataChanged(IPersistentObject po,DataState dataState,UpdateState updateState){
  if (po instanceof INodePO) {
switch (dataState) {
case Added:
      INodePO addedNode=(INodePO)po;
    INodePO editorNode=(INodePO)getEditorHelper().getEditSupport().getWorkVersion();
  if (editorNode.indexOf(addedNode) > -1 || (editorNode instanceof ISpecTestCasePO && ((ISpecTestCasePO)editorNode).getEventExecTcMap().containsValue(po))) {
    handleNodeAdded(addedNode);
  }
break;
case Deleted:
if (!(po instanceof IProjectPO)) {
refresh();
}
break;
case Renamed:
renameGUINode(po);
break;
case StructureModified:
if (!handleStructureModified(po)) {
return;
}
break;
case ReuseChanged:
break;
default :
Assert.notReached();
}
getEditorHelper().handleDataChanged(po,dataState,updateState);
}
}
Program: 96343
Project: 96343
Buggy source:
/** 
 * checks if the exception is caused by a known RCP problem
 * @param t the Throwable which was caught in the error handler
 * @return true if the exception was cause by an RCP bug
 */
public static boolean isRCPException(Throwable t){
  Throwable work=t;
  do {
    StackTraceElement[] stack=work.getStackTrace();
    for (    StackTraceElement el : stack) {
      if (el.getClassName().indexOf("String_Node_Str") != -1) {
        return true;
      }
      if (el.getClassName().indexOf("String_Node_Str") != -1) {
        return true;
      }
      if (el.getClassName().indexOf("String_Node_Str") != -1) {
        return true;
      }
    }
    work=work.getCause();
  }
 while (work != null);
  return false;
}

Fixed version (ground truth):
/** 
 * checks if the exception is caused by a known RCP problem
 * @param t the Throwable which was caught in the error handler
 * @return true if the exception was cause by an RCP bug
 */
public static boolean isRCPException(Throwable t){
  Throwable work=t;
  do {
    StackTraceElement[] stack=work.getStackTrace();
    for (    StackTraceElement el : stack) {
      if (el.getClassName().indexOf("String_Node_Str") != -1) {
        return true;
      }
      if (el.getClassName().indexOf("String_Node_Str") != -1) {
        return true;
      }
      if (el.getClassName().indexOf("String_Node_Str") != -1) {
        return true;
      }
    }
    String detailMessage=work.getMessage();
    if (detailMessage != null && detailMessage.indexOf("String_Node_Str") != -1) {
      return true;
    }
    work=work.getCause();
  }
 while (work != null);
  return false;
}
Program: 96344
Project: 96344
Buggy source:
/** 
 * Prompts the user if they really want to delete the given items.  If the user consents, the items are deleted. Otherwise, no action is taken.
 * @param toDelete The items to delete.
 * @param editor The editor in which the delete is taking place.
 * @return the parent of one of the given elements before its deletion, or <code>null</code> if no elements are deleted.
 */
private Object deleteMultipleElements(Object[] toDelete,ObjectMappingMultiPageEditor editor){
  boolean delete=false;
  IObjectMappingCategoryPO lastParent=null;
  delete=MessageDialog.openConfirm(Plugin.getShell(),Messages.DeleteTreeItemActionOMEditorOMTitle,Messages.DeleteTreeItemActionOMEditorOMText3);
  if (delete) {
    for (    Object node : toDelete) {
      if (node instanceof IComponentNamePO) {
        lastParent=editor.getOmEditorBP().deleteCompName((IComponentNamePO)node);
      }
 else       if (node instanceof IObjectMappingAssoziationPO) {
        lastParent=editor.getOmEditorBP().deleteAssociation((IObjectMappingAssoziationPO)node);
      }
 else       if (node instanceof IObjectMappingCategoryPO) {
        lastParent=editor.getOmEditorBP().deleteCategory((IObjectMappingCategoryPO)node);
      }
      editor.getEditorHelper().setDirty(true);
    }
  }
  return lastParent;
}

Fixed version (ground truth):
/** 
 * Prompts the user if they really want to delete the given items.  If the user consents, the items are deleted. Otherwise, no action is taken.
 * @param toDelete The items to delete.
 * @param editor The editor in which the delete is taking place.
 * @return the parent of one of the given elements before its deletion, or <code>null</code> if no elements are deleted.
 */
private Object deleteMultipleElements(Object[] toDelete,ObjectMappingMultiPageEditor editor){
  boolean delete=false;
  IObjectMappingCategoryPO lastParent=null;
  delete=MessageDialog.openConfirm(Plugin.getShell(),Messages.DeleteTreeItemActionOMEditorOMTitle,Messages.DeleteTreeItemActionOMEditorOMText3);
  if (delete) {
    for (    Object node : toDelete) {
      if (node instanceof IComponentNamePO) {
        lastParent=editor.getOmEditorBP().deleteCompName((IComponentNamePO)node);
      }
 else       if (node instanceof IObjectMappingAssoziationPO) {
        lastParent=editor.getOmEditorBP().deleteAssociation((IObjectMappingAssoziationPO)node);
      }
 else       if (node instanceof IObjectMappingCategoryPO) {
        if (!willAncestorBeDeleted((IObjectMappingCategoryPO)node,toDelete)) {
          lastParent=editor.getOmEditorBP().deleteCategory((IObjectMappingCategoryPO)node);
        }
      }
      editor.getEditorHelper().setDirty(true);
    }
  }
  return lastParent;
}
Program: 96345
Project: 96345
Buggy source:
/** 
 * Sets -javaagent and JRE arguments as SUN environment variable.
 * @param parameters The parameters for starting the AUT
 * @return the _JAVA_OPTIONS environment variable including -javaagentand jre arguments
 */
protected String setJavaOptions(Map parameters){
  StringBuffer sb=new StringBuffer();
  if (isRunningFromExecutable(parameters)) {
    Locale locale=(Locale)parameters.get(IStartAut.LOCALE);
    sb.append(JAVA_OPTIONS_INTRO).append(StringConstants.QUOTE).append("String_Node_Str").append(getAbsoluteAgentJarPath()).append(StringConstants.QUOTE);
    if (isRunningWithMonitoring(parameters)) {
      sb.append(StringConstants.SPACE).append(getMonitoringAgent(parameters));
    }
    if (locale != null) {
      sb.append(StringConstants.SPACE).append(JAVA_COUNTRY_PROPERTY).append(locale.getCountry());
      sb.append(StringConstants.SPACE).append(JAVA_LANGUAGE_PROPERTY).append(locale.getLanguage());
    }
    sb.append(StringConstants.SPACE).append(JAVA_UTIL_LOGGING_CONFIG_FILE_PROPERTY).append(StringConstants.QUOTE).append(getAbsoluteLoggingConfPath()).append(StringConstants.QUOTE);
  }
 else {
    if (isRunningWithMonitoring(parameters)) {
      sb.append(JAVA_OPTIONS_INTRO).append(getMonitoringAgent(parameters)).append(StringConstants.SPACE).append(JAVA_UTIL_LOGGING_CONFIG_FILE_PROPERTY).append(StringConstants.QUOTE).append(getAbsoluteLoggingConfPath()).append(StringConstants.QUOTE);
    }
  }
  return sb.toString();
}

Fixed version (ground truth):
/** 
 * Sets -javaagent and JRE arguments as SUN environment variable.
 * @param parameters The parameters for starting the AUT
 * @return the _JAVA_OPTIONS environment variable including -javaagentand jre arguments
 */
protected String setJavaOptions(Map parameters){
  StringBuffer sb=new StringBuffer();
  if (isRunningFromExecutable(parameters)) {
    Locale locale=(Locale)parameters.get(IStartAut.LOCALE);
    sb.append(JAVA_OPTIONS_INTRO);
    if (isRunningWithMonitoring(parameters)) {
      sb.append(getMonitoringAgent(parameters)).append(StringConstants.SPACE);
    }
    sb.append(StringConstants.QUOTE).append("String_Node_Str").append(getAbsoluteAgentJarPath()).append(StringConstants.QUOTE);
    if (locale != null) {
      sb.append(StringConstants.SPACE).append(JAVA_COUNTRY_PROPERTY).append(locale.getCountry());
      sb.append(StringConstants.SPACE).append(JAVA_LANGUAGE_PROPERTY).append(locale.getLanguage());
    }
    sb.append(StringConstants.SPACE).append(JAVA_UTIL_LOGGING_CONFIG_FILE_PROPERTY).append(StringConstants.QUOTE).append(getAbsoluteLoggingConfPath()).append(StringConstants.QUOTE);
  }
 else {
    if (isRunningWithMonitoring(parameters)) {
      sb.append(JAVA_OPTIONS_INTRO).append(getMonitoringAgent(parameters)).append(StringConstants.SPACE).append(JAVA_UTIL_LOGGING_CONFIG_FILE_PROPERTY).append(StringConstants.QUOTE).append(getAbsoluteLoggingConfPath()).append(StringConstants.QUOTE);
    }
  }
  return sb.toString();
}
Program: 96346
Project: 96346
Buggy source:
/** 
 * Creates the initial Context of this Editor.<br> Subclasses may override this method. 
 * @param parent Composite
 */
public void createPartControlImpl(Composite parent){
  createSashForm(parent);
  setParentComposite(parent);
  getMainTreeViewer().setContentProvider(new TestCaseEditorContentProvider());
  m_eventHandlerTreeViewer.setContentProvider(new TestCaseEditorContentProvider());
  m_eventHandlerTreeViewer.getControl().setMenu(createContextMenu());
  setInitialInput();
  final DataEventDispatcher dispatcher=DataEventDispatcher.getInstance();
  dispatcher.addPropertyChangedListener(this,true);
  addDragAndDropSupport();
  getEditorHelper().addListeners();
  setActionHandlers();
  addTreeDoubleClickListener(CommandIDs.REFERENCE_TC_COMMAND_ID);
  getTreeViewer().setSelection(new StructuredSelection(getTopGuiNode()));
  GuiEventDispatcher.getInstance().addEditorDirtyStateListener(this,true);
}

Fixed version (ground truth):
/** 
 * Creates the initial Context of this Editor.<br> Subclasses may override this method. 
 * @param parent Composite
 */
public void createPartControlImpl(Composite parent){
  createSashForm(parent);
  setParentComposite(parent);
  getMainTreeViewer().setContentProvider(new TestCaseEditorContentProvider());
  m_eventHandlerTreeViewer.setContentProvider(new TestCaseEditorContentProvider());
  m_eventHandlerTreeViewer.getControl().setMenu(createContextMenu());
  setInitialInput();
  final DataEventDispatcher dispatcher=DataEventDispatcher.getInstance();
  dispatcher.addPropertyChangedListener(this,true);
  addDragAndDropSupport();
  getEditorHelper().addListeners();
  setActionHandlers();
  addTreeDoubleClickListener(CommandIDs.REFERENCE_TC_COMMAND_ID);
  getTreeViewer().setSelection(new StructuredSelection(getTopGuiNode()));
  GuiEventDispatcher.getInstance().addEditorDirtyStateListener(this,true);
  DataEventDispatcher.getInstance().addDataChangedListener(new CentralTestDataUpdateListener(),false);
}
Program: 96347
Project: 96347
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void handleDataChanged(IPersistentObject po,DataState dataState,UpdateState updateState){
  if (dataState == DataState.Deleted && po.equals(getParamInterfaceObj())) {
    setParamInterfaceObj(null);
    updateView();
  }
  Plugin.getDisplay().syncExec(new Runnable(){
    public void run(){
      getControlEnabler().selectionChanged(m_currentPart,m_currentSelection);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void handleDataChanged(IPersistentObject po,DataState dataState,UpdateState updateState){
  if (dataState == DataState.Deleted && po.equals(getParamInterfaceObj())) {
    setParamInterfaceObj(null);
    updateView();
  }
  if (dataState == DataState.StructureModified && po instanceof ITestDataCubeContPO) {
    updateView();
  }
  Plugin.getDisplay().syncExec(new Runnable(){
    public void run(){
      getControlEnabler().selectionChanged(m_currentPart,m_currentSelection);
    }
  }
);
}
Program: 96348
Project: 96348
Buggy source:
/** 
 * {@inheritDoc}
 */
public void init(IViewSite site) throws PartInitException {
  site.getPage().addSelectionListener(this);
  DataEventDispatcher dispatcher=DataEventDispatcher.getInstance();
  dispatcher.addParamChangedListener(this,true);
  dispatcher.addLanguageChangedListener(this,true);
  dispatcher.addDataChangedListener(this,true);
  dispatcher.addProjectLoadedListener(this,true);
  super.init(site);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void init(IViewSite site) throws PartInitException {
  site.getPage().addSelectionListener(this);
  DataEventDispatcher dispatcher=DataEventDispatcher.getInstance();
  dispatcher.addParamChangedListener(this,true);
  dispatcher.addLanguageChangedListener(this,true);
  dispatcher.addProjectLoadedListener(this,true);
  super.init(site);
}
Program: 96349
Project: 96349
Buggy source:
/** 
 * {@inheritDoc}
 */
protected PageRec doCreatePage(IWorkbenchPart part){
  if (part instanceof AbstractJBTreeView || part.getAdapter(IJBEditor.class) != null) {
    AbstractDataSetPage page;
    if (part instanceof CentralTestDataEditor) {
      page=new TestDataCubeDataSetPage();
    }
 else {
      page=new ParamNodeDataSetPage();
    }
    initPage(page);
    page.createControl(getPageBook());
    return new PageRec(part,page);
  }
 else   if (part instanceof IJBPart) {
    return new PageRec(part,createDefaultPage(getPageBook()));
  }
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
protected PageRec doCreatePage(IWorkbenchPart part){
  if (part instanceof AbstractJBTreeView || part.getAdapter(IJBEditor.class) != null) {
    AbstractDataSetPage page;
    if (part instanceof CentralTestDataEditor) {
      page=new TestDataCubeDataSetPage();
    }
 else {
      page=new ParamNodeDataSetPage();
    }
    initPage(page);
    page.createControl(getPageBook());
    DataEventDispatcher.getInstance().addDataChangedListener(page,true);
    return new PageRec(part,page);
  }
 else   if (part instanceof IJBPart) {
    return new PageRec(part,createDefaultPage(getPageBook()));
  }
  return null;
}
Program: 96350
Project: 96350
Buggy source:
/** 
 * {@inheritDoc}
 */
protected void doDestroyPage(IWorkbenchPart part,PageRec pageRecord){
  pageRecord.page.dispose();
  pageRecord.dispose();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
protected void doDestroyPage(IWorkbenchPart part,PageRec pageRecord){
  if (pageRecord.page instanceof IDataChangedListener) {
    DataEventDispatcher.getInstance().removeDataChangedListener((IDataChangedListener)pageRecord.page);
  }
  pageRecord.page.dispose();
  pageRecord.dispose();
}
Program: 96351
Project: 96351
Buggy source:
/** 
 * {@inheritDoc}
 */
public void dispose(){
  final DataEventDispatcher dispatcher=DataEventDispatcher.getInstance();
  dispatcher.removeParamChangedListener(this);
  dispatcher.removeLanguageChangedListener(this);
  dispatcher.removeDataChangedListener(this);
  dispatcher.removeProjectLoadedListener(this);
  dispatcher.removeParamChangedListener(this);
  super.dispose();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void dispose(){
  final DataEventDispatcher dispatcher=DataEventDispatcher.getInstance();
  dispatcher.removeParamChangedListener(this);
  dispatcher.removeLanguageChangedListener(this);
  dispatcher.removeProjectLoadedListener(this);
  dispatcher.removeParamChangedListener(this);
  super.dispose();
}
Program: 96352
Project: 96352
Buggy source:
/** 
 * check if the exception is caused by a failed lock attempt
 * @param e hibernate exception
 * @return true if e is caused by a failed lock attempt
 */
private static boolean isLockException(PersistenceException e){
  Throwable rootCause=ExceptionUtils.getRootCause(e);
  if (e instanceof PessimisticLockException) {
    return true;
  }
 else   if (e instanceof LockTimeoutException) {
    return true;
  }
 else   if (rootCause instanceof SQLException) {
    if (((SQLException)rootCause).getSQLState() != null && ((SQLException)rootCause).getSQLState().startsWith("String_Node_Str")) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * check if the exception is caused by a failed lock attempt
 * @param e hibernate exception
 * @return true if e is caused by a failed lock attempt
 */
private static boolean isLockException(PersistenceException e){
  for (  Throwable cause : ExceptionUtils.getThrowables(e)) {
    if (cause instanceof PessimisticLockException || cause instanceof OptimisticLockException || cause instanceof LockTimeoutException) {
      return true;
    }
 else     if (cause instanceof SQLException) {
      if (((SQLException)cause).getSQLState() != null && ((SQLException)cause).getSQLState().startsWith("String_Node_Str")) {
        return true;
      }
    }
  }
  return false;
}
Program: 96353
Project: 96353
Buggy source:
/** 
 * Creates three buttons.
 * @param parent The parent composite.
 */
private void createAutConfigButtons(Composite parent){
  JBText invisibleText=new JBText(parent,SWT.BORDER);
  invisibleText.setVisible(false);
  GridData invisibleGrid=new GridData();
  invisibleGrid.widthHint=10;
  invisibleText.setLayoutData(invisibleGrid);
  JBText invisibleText2=new JBText(parent,SWT.BORDER);
  invisibleText2.setVisible(false);
  invisibleText2.setLayoutData(invisibleGrid);
  m_addButton=new Button(parent,SWT.PUSH);
  m_addButton.setText(Messages.AUTPropertyPageAdd);
  m_addButton.setLayoutData(buttonGrid());
  String selectedObject=m_autToolKitComboBox.getSelectedObject();
  m_addButton.setEnabled(selectedObject != null && selectedObject.trim().length() > 0);
  m_duplicateButton=new Button(parent,SWT.PUSH);
  m_duplicateButton.setText(Messages.AUTPropertyPageDuplicate);
  m_duplicateButton.setData("String_Node_Str","String_Node_Str");
  m_duplicateButton.setLayoutData(buttonGrid());
  m_duplicateButton.setEnabled(false);
  m_editButton=new Button(parent,SWT.PUSH);
  m_editButton.setText(Messages.AUTPropertyPageEdit);
  m_editButton.setLayoutData(buttonGrid());
  m_editButton.setEnabled(false);
  m_removeButton=new Button(parent,SWT.PUSH);
  m_removeButton.setText(Messages.AUTPropertyPageRemove);
  m_removeButton.setLayoutData(buttonGrid());
  m_removeButton.setEnabled(false);
}

Fixed version (ground truth):
/** 
 * Creates three buttons.
 * @param parent The parent composite.
 */
private void createAutConfigButtons(Composite parent){
  JBText invisibleText=new JBText(parent,SWT.BORDER);
  invisibleText.setVisible(false);
  GridData invisibleGrid=new GridData();
  invisibleGrid.widthHint=10;
  invisibleText.setLayoutData(invisibleGrid);
  JBText invisibleText2=new JBText(parent,SWT.BORDER);
  invisibleText2.setVisible(false);
  invisibleText2.setLayoutData(invisibleGrid);
  m_addButton=new Button(parent,SWT.PUSH);
  m_addButton.setText(Messages.AUTPropertyPageAdd);
  m_addButton.setLayoutData(buttonGrid());
  String selectedObject=m_autToolKitComboBox.getSelectedObject();
  m_addButton.setEnabled(selectedObject != null && selectedObject.trim().length() > 0);
  m_duplicateButton=new Button(parent,SWT.PUSH);
  m_duplicateButton.setText(Messages.AUTPropertyPageDuplicate);
  m_duplicateButton.setData(SwtAUTHierarchyConstants.WIDGET_NAME,"String_Node_Str");
  m_duplicateButton.setLayoutData(buttonGrid());
  m_duplicateButton.setEnabled(false);
  m_editButton=new Button(parent,SWT.PUSH);
  m_editButton.setText(Messages.AUTPropertyPageEdit);
  m_editButton.setLayoutData(buttonGrid());
  m_editButton.setEnabled(false);
  m_removeButton=new Button(parent,SWT.PUSH);
  m_removeButton.setText(Messages.AUTPropertyPageRemove);
  m_removeButton.setLayoutData(buttonGrid());
  m_removeButton.setEnabled(false);
}
Program: 96355
Project: 96355
Buggy source:
/** 
 * Create the labels of the Combos
 * @param parent the parent of the labels
 */
private void createComboLabels(Composite parent){
  Label paramLabel=new Label(parent,SWT.NONE);
  paramLabel.setText(Messages.GDDataSetViewParameter);
  paramLabel.setData(WIDGET_NAME_KEY,"String_Node_Str");
  Label dataSetLabel=new Label(parent,SWT.NONE);
  dataSetLabel.setText(Messages.GDDataSetViewDataSet);
  dataSetLabel.setData(WIDGET_NAME_KEY,"String_Node_Str");
  Label languageLabel=new Label(parent,SWT.NONE);
  languageLabel.setText(Messages.GDDataSetViewLanguage);
  languageLabel.setData(WIDGET_NAME_KEY,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Create the labels of the Combos
 * @param parent the parent of the labels
 */
private void createComboLabels(Composite parent){
  Label paramLabel=new Label(parent,SWT.NONE);
  paramLabel.setText(Messages.GDDataSetViewParameter);
  paramLabel.setData(SwtAUTHierarchyConstants.WIDGET_NAME,"String_Node_Str");
  Label dataSetLabel=new Label(parent,SWT.NONE);
  dataSetLabel.setText(Messages.GDDataSetViewDataSet);
  dataSetLabel.setData(SwtAUTHierarchyConstants.WIDGET_NAME,"String_Node_Str");
  Label languageLabel=new Label(parent,SWT.NONE);
  languageLabel.setText(Messages.GDDataSetViewLanguage);
  languageLabel.setData(SwtAUTHierarchyConstants.WIDGET_NAME,"String_Node_Str");
}
Program: 96356
Project: 96356
Buggy source:
/** 
 * {@inheritDoc}
 */
public void createControl(Composite parent){
  Composite topLevelComposite=new Composite(parent,SWT.NONE);
  topLevelComposite.setData(WIDGET_NAME_KEY,"String_Node_Str");
  GridLayout layout=new GridLayout();
  layout.numColumns=1;
  layout.verticalSpacing=2;
  layout.marginWidth=Layout.MARGIN_WIDTH;
  layout.marginHeight=Layout.MARGIN_HEIGHT;
  topLevelComposite.setLayout(layout);
  GridData layoutData=new GridData(GridData.FILL_BOTH);
  layoutData.grabExcessHorizontalSpace=true;
  topLevelComposite.setLayoutData(layoutData);
  m_control=topLevelComposite;
  Composite buttonComp=new Composite(topLevelComposite,SWT.BORDER);
  layout=new GridLayout(3,false);
  layout.marginWidth=3;
  layout.marginHeight=3;
  buttonComp.setLayout(layout);
  GridData gridData=new GridData(SWT.FILL,SWT.FILL,true,true);
  buttonComp.setLayoutData(gridData);
  createComboLabels(buttonComp);
  createCombos(buttonComp);
  initTableViewer(buttonComp);
  createButtons(buttonComp);
  Plugin.getHelpSystem().setHelp(getTable(),ContextHelpIds.JB_DATASET_VIEW);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void createControl(Composite parent){
  Composite topLevelComposite=new Composite(parent,SWT.NONE);
  topLevelComposite.setData(SwtAUTHierarchyConstants.WIDGET_NAME,"String_Node_Str");
  GridLayout layout=new GridLayout();
  layout.numColumns=1;
  layout.verticalSpacing=2;
  layout.marginWidth=Layout.MARGIN_WIDTH;
  layout.marginHeight=Layout.MARGIN_HEIGHT;
  topLevelComposite.setLayout(layout);
  GridData layoutData=new GridData(GridData.FILL_BOTH);
  layoutData.grabExcessHorizontalSpace=true;
  topLevelComposite.setLayoutData(layoutData);
  m_control=topLevelComposite;
  Composite buttonComp=new Composite(topLevelComposite,SWT.BORDER);
  layout=new GridLayout(3,false);
  layout.marginWidth=3;
  layout.marginHeight=3;
  buttonComp.setLayout(layout);
  GridData gridData=new GridData(SWT.FILL,SWT.FILL,true,true);
  buttonComp.setLayoutData(gridData);
  createComboLabels(buttonComp);
  createCombos(buttonComp);
  initTableViewer(buttonComp);
  createButtons(buttonComp);
  Plugin.getHelpSystem().setHelp(getTable(),ContextHelpIds.JB_DATASET_VIEW);
}
Program: 96357
Project: 96357
Buggy source:
/** 
 * inits the m_tableViewer
 * @param parent the parent of the m_tableViewer
 */
private void initTableViewer(Composite parent){
  setTableViewer(new TableViewer(parent,SWT.SINGLE | SWT.FULL_SELECTION));
  Table table=getTable();
  table.setData(WIDGET_NAME_KEY,"String_Node_Str");
  table.setLinesVisible(true);
  table.setHeaderVisible(true);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  gridData.grabExcessVerticalSpace=true;
  gridData.horizontalSpan=3;
  table.setLayoutData(gridData);
  getTableViewer().setUseHashlookup(true);
  getTableViewer().setContentProvider(new LanguageContentProvider());
  getTableViewer().setLabelProvider(new LanguageLabelProvider());
  setTableCursor(new DSVTableCursor(getTable(),SWT.NONE));
}

Fixed version (ground truth):
/** 
 * inits the m_tableViewer
 * @param parent the parent of the m_tableViewer
 */
private void initTableViewer(Composite parent){
  setTableViewer(new TableViewer(parent,SWT.SINGLE | SWT.FULL_SELECTION));
  Table table=getTable();
  table.setData(SwtAUTHierarchyConstants.WIDGET_NAME,"String_Node_Str");
  table.setLinesVisible(true);
  table.setHeaderVisible(true);
  GridData gridData=new GridData(GridData.FILL_BOTH);
  gridData.grabExcessVerticalSpace=true;
  gridData.horizontalSpan=3;
  table.setLayoutData(gridData);
  getTableViewer().setUseHashlookup(true);
  getTableViewer().setContentProvider(new LanguageContentProvider());
  getTableViewer().setLabelProvider(new LanguageLabelProvider());
  setTableCursor(new DSVTableCursor(getTable(),SWT.NONE));
}