nus-yam/ex-repair huggingface dataset:
Program: 95916
Project: 95916
Buggy source:
/** 
 * @return the selectionChangedListenerList
 */
public List<ISelectionChangedListener> getSelectionChangedListenerList(){
  return m_selectionChangedListenerList;
}

Fixed version (ground truth):
/** 
 * @return the selectionChangedListenerList
 */
protected List<ISelectionChangedListener> getSelectionChangedListenerList(){
  return m_selectionChangedListenerList;
}
Program: 95917
Project: 95917
Buggy source:
/** 
 * @return the control
 */
public Control getControl(){
  return m_control;
}

Fixed version (ground truth):
/** 
 * @return the control
 */
private Control getControl(){
  return m_control;
}
Program: 95918
Project: 95918
Buggy source:
/** 
 * Sets the current selection for this selection provider.
 * @param selection the new selection
 */
protected void setSelectionImpl(ISelection selection){
  getMainTreeViewer().setSelection(selection);
}

Fixed version (ground truth):
/** 
 * Sets the current selection for this selection provider.
 * @param selection the new selection
 */
protected void setSelectionImpl(ISelection selection){
  UINodeBP.setFocusAndSelection(selection,getMainTreeViewer());
}
Program: 95919
Project: 95919
Buggy source:
/** 
 * @return the cutTreeItemAction
 */
public CutTreeItemActionGDEditor getCutTreeItemAction(){
  return m_cutTreeItemAction;
}

Fixed version (ground truth):
/** 
 * @return the cutTreeItemAction
 */
protected CutTreeItemActionGDEditor getCutTreeItemAction(){
  return m_cutTreeItemAction;
}
Program: 95920
Project: 95920
Buggy source:
/** 
 * @param mainTreeViewer the mainTreeViewer to set
 */
public void setMainTreeViewer(TreeViewer mainTreeViewer){
  m_mainTreeViewer=mainTreeViewer;
}

Fixed version (ground truth):
/** 
 * @param mainTreeViewer the mainTreeViewer to set
 */
protected void setMainTreeViewer(TreeViewer mainTreeViewer){
  m_mainTreeViewer=mainTreeViewer;
}
Program: 95921
Project: 95921
Buggy source:
/** 
 * @param cutTreeItemAction the cutTreeItemAction to set
 */
public void setCutTreeItemAction(CutTreeItemActionGDEditor cutTreeItemAction){
  m_cutTreeItemAction=cutTreeItemAction;
}

Fixed version (ground truth):
/** 
 * @param cutTreeItemAction the cutTreeItemAction to set
 */
protected void setCutTreeItemAction(CutTreeItemActionGDEditor cutTreeItemAction){
  m_cutTreeItemAction=cutTreeItemAction;
}
Program: 95922
Project: 95922
Buggy source:
/** 
 * @return the pasteTreeItemAction
 */
public PasteTreeItemActionTCEditor getPasteTreeItemAction(){
  return m_pasteTreeItemAction;
}

Fixed version (ground truth):
/** 
 * @return the pasteTreeItemAction
 */
protected PasteTreeItemActionTCEditor getPasteTreeItemAction(){
  return m_pasteTreeItemAction;
}
Program: 95923
Project: 95923
Buggy source:
/** 
 * @param editorHelper the editorHelper to set
 */
public void setEditorHelper(JBEditorHelper editorHelper){
  m_editorHelper=editorHelper;
}

Fixed version (ground truth):
/** 
 * @param editorHelper the editorHelper to set
 */
protected void setEditorHelper(JBEditorHelper editorHelper){
  m_editorHelper=editorHelper;
}
Program: 95924
Project: 95924
Buggy source:
/** 
 * @param control the control to set
 */
public void setControl(Control control){
  m_control=control;
}

Fixed version (ground truth):
/** 
 * @param control the control to set
 */
protected void setControl(Control control){
  m_control=control;
}
Program: 95925
Project: 95925
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().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.
 */
private void handleNodeAdded(INodePO addedNode){
  refresh();
  setSelection(new StructuredSelection(addedNode));
}
Program: 95926
Project: 95926
Buggy source:
/** 
 * {@inheritDoc}
 */
public void handleDataChanged(IPersistentObject po,DataState dataState){
  if (po instanceof INodePO) {
    INodePO changedNode=(INodePO)po;
    INodePO editorNode=(INodePO)getEditorHelper().getEditSupport().getWorkVersion();
    boolean isVisibleInEditor=editorNode.indexOf(changedNode) > -1;
    if (editorNode instanceof ISpecTestCasePO) {
      isVisibleInEditor|=((ISpecTestCasePO)editorNode).getAllEventEventExecTC().contains(po);
    }
switch (dataState) {
case Added:
      if (isVisibleInEditor) {
        handleNodeAdded(changedNode);
      }
    break;
case Deleted:
  if (!(po instanceof IProjectPO)) {
    refresh();
  }
break;
case Renamed:
renameGUINode(po);
break;
case StructureModified:
if (isVisibleInEditor) {
getEditorHelper().setDirty(true);
}
if (!handleStructureModified(po)) {
return;
}
break;
case ReuseChanged:
break;
default :
Assert.notReached();
}
if (isVisibleInEditor) {
runLocalChecks();
}
getEditorHelper().handleDataChanged(po,dataState);
}
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void handleDataChanged(IPersistentObject po,DataState dataState){
  if (po instanceof INodePO) {
    INodePO changedNode=(INodePO)po;
    INodePO editorNode=(INodePO)getEditorHelper().getEditSupport().getWorkVersion();
    boolean isVisibleInEditor=editorNode.indexOf(changedNode) > -1;
    if (editorNode instanceof ISpecTestCasePO) {
      isVisibleInEditor|=((ISpecTestCasePO)editorNode).getAllEventEventExecTC().contains(po);
    }
switch (dataState) {
case Added:
      if (isVisibleInEditor) {
        handleNodeAdded(changedNode);
      }
    break;
case Deleted:
  if (!(po instanceof IProjectPO)) {
    refresh();
  }
break;
case Renamed:
createPartName();
break;
case StructureModified:
if (isVisibleInEditor) {
getEditorHelper().setDirty(true);
}
if (!handleStructureModified(po)) {
return;
}
break;
case ReuseChanged:
break;
default :
Assert.notReached();
}
if (isVisibleInEditor) {
runLocalChecks();
}
getEditorHelper().handleDataChanged(po,dataState);
}
}
Program: 95927
Project: 95927
Buggy source:
/** 
 * Refreshes the tree viewer.
 */
protected void refresh(){
  getTreeViewer().refresh();
}

Fixed version (ground truth):
/** 
 * Refreshes the tree viewer.
 */
protected void refresh(){
  getTreeViewer().refresh(true);
}
Program: 95928
Project: 95928
Buggy source:
/** 
 * @param root the root of the TreeViewer.
 */
protected void initTopTreeViewer(INodePO root){
  try {
    getMainTreeViewer().getTree().setRedraw(false);
    getMainTreeViewer().setInput(null);
    getMainTreeViewer().setInput(new INodePO[]{root});
  }
  finally {
    getMainTreeViewer().getTree().setRedraw(true);
    getMainTreeViewer().expandAll();
    getMainTreeViewer().setSelection(new StructuredSelection(root));
  }
}

Fixed version (ground truth):
/** 
 * @param root the root of the TreeViewer.
 */
protected void initTopTreeViewer(INodePO root){
  try {
    getMainTreeViewer().getTree().setRedraw(false);
    getMainTreeViewer().setInput(null);
    getMainTreeViewer().setInput(new INodePO[]{root});
  }
  finally {
    getMainTreeViewer().getTree().setRedraw(true);
    getMainTreeViewer().expandAll();
    setSelection(new StructuredSelection(root));
  }
}
Program: 95929
Project: 95929
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void createPartControlImpl(Composite parent){
  super.createPartControlImpl(parent);
  m_eventHandlerTreeViewer.setContentProvider(new EventHandlerContentProvider());
  m_eventHandlerTreeViewer.getControl().setMenu(createContextMenu());
  addDoubleClickListener(CommandIDs.OPEN_SPECIFICATION_COMMAND_ID,m_eventHandlerTreeViewer);
  ActionListener actionListener=new ActionListener();
  getTreeViewer().addSelectionChangedListener(actionListener);
  getEventHandlerTreeViewer().addSelectionChangedListener(actionListener);
  if (!Plugin.getDefault().anyDirtyStar()) {
    checkAndRemoveUnusedTestData();
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void createPartControlImpl(Composite parent){
  super.createPartControlImpl(parent);
  m_eventHandlerTreeViewer.setContentProvider(new EventHandlerContentProvider());
  m_eventHandlerTreeViewer.getControl().setMenu(createContextMenu());
  addDoubleClickListener(CommandIDs.OPEN_SPECIFICATION_COMMAND_ID,m_eventHandlerTreeViewer);
  ActionListener actionListener=new ActionListener();
  getTreeViewer().addSelectionChangedListener(actionListener);
  getEventHandlerTreeViewer().addSelectionChangedListener(actionListener);
  if (!Plugin.getDefault().anyDirtyStar()) {
    checkAndRemoveUnusedTestData();
  }
  m_currentTreeViewer=getMainTreeViewer();
}
Program: 95930
Project: 95930
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void focusGained(FocusEvent e){
  Tree tree=(Tree)e.getSource();
  if (getMainTreeViewer().getTree() == tree) {
    m_currentTreeViewer=getMainTreeViewer();
  }
 else   if (m_eventHandlerTreeViewer.getTree() == tree) {
    m_currentTreeViewer=m_eventHandlerTreeViewer;
  }
  m_currentTreeViewer.setSelection(m_currentTreeViewer.getSelection(),true);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void focusGained(FocusEvent e){
  Tree tree=(Tree)e.getSource();
  if (getMainTreeViewer().getTree() == tree) {
    m_currentTreeViewer=getMainTreeViewer();
  }
 else   if (getEventHandlerTreeViewer().getTree() == tree) {
    m_currentTreeViewer=getEventHandlerTreeViewer();
  }
}
Program: 95931
Project: 95931
Buggy source:
@Override protected void refresh(){
  super.refresh();
  getEventHandlerTreeViewer().refresh();
}

Fixed version (ground truth):
@Override protected void refresh(){
  super.refresh();
  getEventHandlerTreeViewer().refresh(true);
}
Program: 95932
Project: 95932
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void setSelectionImpl(ISelection selection){
  if (selection instanceof StructuredSelection) {
    StructuredSelection ss=(StructuredSelection)selection;
    Object firstElement=ss.getFirstElement();
    if (firstElement instanceof IEventExecTestCasePO) {
      getEventHandlerTreeViewer().getTree().setFocus();
      getEventHandlerTreeViewer().setSelection(selection);
    }
 else {
      super.setSelectionImpl(selection);
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void setSelectionImpl(ISelection selection){
  if (selection instanceof StructuredSelection) {
    StructuredSelection ss=(StructuredSelection)selection;
    Object firstElement=ss.getFirstElement();
    if (firstElement instanceof IEventExecTestCasePO) {
      UINodeBP.setFocusAndSelection(ss,getEventHandlerTreeViewer());
    }
 else {
      super.setSelectionImpl(selection);
    }
  }
}
Program: 95934
Project: 95934
Buggy source:
/** 
 * Adds the given eventHandlerInput to the given eventHandlerOwner  as an eventHandler.
 * @param eventHandlerInput the ISpecTestCasePO to be the EventHandler
 * @param evHandlerOwner the ISpecTestCasePO to own the EventHandler
 */
public void addEventHandler(ISpecTestCasePO eventHandlerInput,ISpecTestCasePO evHandlerOwner){
  final EditSupport editSupport=getEditorHelper().getEditSupport();
  ISpecTestCasePO workSpecTcPO=(ISpecTestCasePO)editSupport.getWorkVersion();
  ISpecTestCasePO eventHandlerInputPO=eventHandlerInput;
  IEventExecTestCasePO eventHandlerPO=null;
  try {
    ISpecTestCasePO eventHandlerWorkV=(ISpecTestCasePO)editSupport.createWorkVersion(eventHandlerInputPO);
    eventHandlerPO=NodeMaker.createEventExecTestCasePO(eventHandlerWorkV,workSpecTcPO);
    final int status=openAddEventHandlerDlg(evHandlerOwner,eventHandlerPO);
    if (Window.OK == status) {
      editSupport.lockWorkVersion();
      TestCaseBP.addEventHandler(editSupport,workSpecTcPO,eventHandlerPO);
      getEditorHelper().setDirty(true);
      getEventHandlerTreeViewer().refresh();
      DataEventDispatcher.getInstance().fireDataChangedListener(eventHandlerPO,DataState.Added,UpdateState.onlyInEditor);
    }
  }
 catch (  InvalidDataException e) {
    ErrorHandlingUtil.createMessageDialog(MessageIDs.E_DOUBLE_EVENT,null,new String[]{NLS.bind(Messages.TestCaseEditorDoubleEventTypeErrorDetail,new Object[]{evHandlerOwner.getName(),I18n.getString(eventHandlerPO.getEventType())})});
  }
catch (  PMException e) {
    PMExceptionHandler.handlePMExceptionForMasterSession(e);
  }
}

Fixed version (ground truth):
/** 
 * Adds the given eventHandlerInput to the given eventHandlerOwner  as an eventHandler.
 * @param eventHandlerInput the ISpecTestCasePO to be the EventHandler
 * @param evHandlerOwner the ISpecTestCasePO to own the EventHandler
 */
public void addEventHandler(ISpecTestCasePO eventHandlerInput,ISpecTestCasePO evHandlerOwner){
  final EditSupport editSupport=getEditorHelper().getEditSupport();
  ISpecTestCasePO workSpecTcPO=(ISpecTestCasePO)editSupport.getWorkVersion();
  ISpecTestCasePO eventHandlerInputPO=eventHandlerInput;
  IEventExecTestCasePO eventHandlerPO=null;
  try {
    ISpecTestCasePO eventHandlerWorkV=(ISpecTestCasePO)editSupport.createWorkVersion(eventHandlerInputPO);
    eventHandlerPO=NodeMaker.createEventExecTestCasePO(eventHandlerWorkV,workSpecTcPO);
    final int status=openAddEventHandlerDlg(evHandlerOwner,eventHandlerPO);
    if (Window.OK == status) {
      editSupport.lockWorkVersion();
      TestCaseBP.addEventHandler(editSupport,workSpecTcPO,eventHandlerPO);
      getEditorHelper().setDirty(true);
      DataEventDispatcher.getInstance().fireDataChangedListener(eventHandlerPO,DataState.Added,UpdateState.onlyInEditor);
    }
  }
 catch (  InvalidDataException e) {
    ErrorHandlingUtil.createMessageDialog(MessageIDs.E_DOUBLE_EVENT,null,new String[]{NLS.bind(Messages.TestCaseEditorDoubleEventTypeErrorDetail,new Object[]{evHandlerOwner.getName(),I18n.getString(eventHandlerPO.getEventType())})});
  }
catch (  PMException e) {
    PMExceptionHandler.handlePMExceptionForMasterSession(e);
  }
}
Program: 95935
Project: 95935
Buggy source:
@Override protected void refresh(){
  super.refresh();
  getEventHandlerTreeViewer().refresh(true);
}

Fixed version (ground truth):
@Override public void refresh(){
  super.refresh();
  getEventHandlerTreeViewer().refresh(true);
}
Program: 95936
Project: 95936
Buggy source:
/** 
 * {@inheritDoc}
 */
public void addPages(){
  super.addPages();
  Set<INodePO> specSet=new HashSet<INodePO>();
  for (Iterator iterator=m_setOfExecsToReplace.iterator(); iterator.hasNext(); ) {
    IExecTestCasePO exec=(IExecTestCasePO)iterator.next();
    specSet.add(exec.getParentNode());
  }
  m_choosePage=new ChooseTestCasePage(specSet,CHOOSE_PAGE_ID);
  addPage(m_choosePage);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void addPages(){
  super.addPages();
  Set<INodePO> specSet=new HashSet<INodePO>();
  for (Iterator iterator=m_setOfExecsToReplace.iterator(); iterator.hasNext(); ) {
    IExecTestCasePO exec=(IExecTestCasePO)iterator.next();
    if (ISpecTestCasePO.class.isAssignableFrom(exec.getParentNode().getClass())) {
      specSet.add(exec.getParentNode());
    }
  }
  m_choosePage=new ChooseTestCasePage(specSet,CHOOSE_PAGE_ID);
  addPage(m_choosePage);
}
Program: 95937
Project: 95937
Buggy source:
/** 
 * Gets the index of the specific menu entry with the name
 * @param menu the menu in which all items are stored
 * @param name the name of the item we want the index from
 * @param operator the operator for the matching
 * @return the index for the specific menu entry
 */
protected int getIndexForName(IMenuComponent menu,String name,String operator){
  IMenuItemComponent[] subElements=menu.getItems();
  int downcount=0;
  for (int j=0; j < subElements.length; j++) {
    IMenuItemComponent tempMenu=(IMenuItemComponent)subElements[j];
    if (tempMenu.isSeparator()) {
      downcount++;
    }
    if (tempMenu.isShowing() && MatchUtil.getInstance().match(tempMenu.getText(),name,operator)) {
      return j - downcount;
    }
  }
  return Integer.MAX_VALUE;
}

Fixed version (ground truth):
/** 
 * Gets the index of the specific menu entry with the name
 * @param menu the menu in which all items are stored
 * @param name the name of the item we want the index from
 * @param operator the operator for the matching
 * @return the index for the specific menu entry
 */
protected int getIndexForName(IMenuComponent menu,String name,String operator){
  IMenuItemComponent[] subElements=menu.getItems();
  int ignoreElementCount=0;
  for (int j=0; j < subElements.length; j++) {
    IMenuItemComponent tempMenu=(IMenuItemComponent)subElements[j];
    if (!tempMenu.isShowing() || (tempMenu.isSeparator() && tempMenu.isShowing())) {
      ignoreElementCount++;
    }
    if (tempMenu.isShowing() && MatchUtil.getInstance().match(tempMenu.getText(),name,operator)) {
      return j - ignoreElementCount;
    }
  }
  return Integer.MAX_VALUE;
}
Program: 95938
Project: 95938
Buggy source:
/** 
 * Tries to select a menu item in a menu defined by a Text-Path
 * @param namePath the menu item to select
 * @param operator operator used for matching
 */
public void selectMenuItem(String namePath,final String operator){
  String[] menuItems=MenuUtilBase.splitPath(namePath);
  if (menuItems.length == 0) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError());
  }
  IMenuItemComponent item=navigateToMenuItem(getAndCheckMenu(),menuItems,operator);
  if (item == null) {
    try {
      closeMenu(getAndCheckMenu(),menuItems,operator);
    }
 catch (    StepExecutionException see) {
      getLog().info("String_Node_Str");
    }
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.NOT_FOUND));
  }
  item.selectMenuItem();
}

Fixed version (ground truth):
/** 
 * Tries to select a menu item in a menu defined by a Text-Path
 * @param namePath the menu item to select
 * @param operator operator used for matching
 */
public void selectMenuItem(String namePath,final String operator){
  String[] menuItems=MenuUtilBase.splitPath(namePath);
  if (menuItems.length == 0) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError());
  }
  IMenuItemComponent item=navigateToMenuItem(getAndCheckMenu(),menuItems,operator);
  if (item == null || item.getRealComponent() == null) {
    try {
      closeMenu(getAndCheckMenu(),menuItems,operator);
    }
 catch (    StepExecutionException see) {
      getLog().info("String_Node_Str");
    }
    throwMenuItemNotFound();
  }
  item.selectMenuItem();
}
Program: 95939
Project: 95939
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void partOpened(IWorkbenchPartReference partRef){
  if (Constants.TC_BROWSER_ID.equals(partRef.getId())) {
    m_tcb.add(partRef);
    if (getOpenTCBs().size() > 0) {
      setMainTCB(getOpenTCBs().get(0));
    }
    fireStateChanged();
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void partOpened(IWorkbenchPartReference partRef){
  if (partRef.getId().startsWith(Constants.TC_BROWSER_ID)) {
    m_tcb.add(partRef);
    if (getOpenTCBs().size() > 0) {
      setMainTCB(getOpenTCBs().get(0));
    }
    fireStateChanged();
  }
}
Program: 95940
Project: 95940
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void partClosed(IWorkbenchPartReference partRef){
  if (Constants.TC_BROWSER_ID.equals(partRef.getId())) {
    m_tcb.remove(partRef);
    setMainTCB(getOpenTCBs().size() > 0 ? getOpenTCBs().get(0) : null);
    fireStateChanged();
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void partClosed(IWorkbenchPartReference partRef){
  if (partRef.getId().startsWith(Constants.TC_BROWSER_ID)) {
    m_tcb.remove(partRef);
    setMainTCB(getOpenTCBs().size() > 0 ? getOpenTCBs().get(0) : null);
    fireStateChanged();
  }
}
Program: 95941
Project: 95941
Buggy source:
/** 
 * because of Persistence (JPA / EclipseLink)-Bug HHH-1280 we can't use refresh<br> therefore we use evict to remove the old object from master session and reload the object<br> please attend, that in this case the Java-IDs of the old and the reloaded object are different<br> refreshs the original versions, which were possibly modified in editor
 * @throws ProjectDeletedException if the project was deleted in another instance
 */
private void refreshOriginalVersions() throws ProjectDeletedException {
  try {
    final EntityManager masterSession=GeneralStorage.getInstance().getMasterSession();
    IPersistentObject original=getOriginal();
    if (original != null) {
      masterSession.refresh(getWorkVersion());
      GeneralStorage.getInstance().fireDataModified(original);
    }
  }
 catch (  PersistenceException e) {
    log.error(Messages.RefreshOfOriginalVersionFailed + StringConstants.DOT,e);
    GeneralStorage.getInstance().reloadMasterSession(new NullProgressMonitor());
  }
}

Fixed version (ground truth):
/** 
 * because of Persistence (JPA / EclipseLink)-Bug HHH-1280 we can't use refresh<br> therefore we use evict to remove the old object from master session and reload the object<br> please attend, that in this case the Java-IDs of the old and the reloaded object are different<br> refreshs the original versions, which were possibly modified in editor
 * @throws ProjectDeletedException if the project was deleted in another instance
 */
private void refreshOriginalVersions() throws ProjectDeletedException {
  try {
    final EntityManager masterSession=GeneralStorage.getInstance().getMasterSession();
    IPersistentObject original=getOriginal();
    if (original != null) {
      masterSession.refresh(original);
      GeneralStorage.getInstance().fireDataModified(original);
    }
  }
 catch (  PersistenceException e) {
    log.error(Messages.RefreshOfOriginalVersionFailed + StringConstants.DOT,e);
    GeneralStorage.getInstance().reloadMasterSession(new NullProgressMonitor());
  }
}
Program: 95942
Project: 95942
Buggy source:
/** 
 * {@inheritDoc}
 */
public Message execute(){
  log.info("String_Node_Str" + getClass().getName() + "String_Node_Str");
  List componentIds=new ArrayList();
  AUTServerConfiguration.getInstance().setProfile(m_message.getProfile());
  for (Iterator it=m_message.getComponents().iterator(); it.hasNext(); ) {
    Component component=(Component)it.next();
    if (!component.isConcrete()) {
      continue;
    }
    ConcreteComponent concrete=(ConcreteComponent)component;
    try {
      AUTServerConfiguration.getInstance().registerComponent(concrete);
      if (concrete.hasDefaultMapping()) {
        componentIds=addComponentID(componentIds,concrete);
      }
    }
 catch (    UnsupportedComponentException e) {
      log.error("String_Node_Str",e);
    }
catch (    IllegalArgumentException e) {
      log.error("String_Node_Str",e);
    }
  }
  log.info("String_Node_Str" + getClass().getName() + "String_Node_Str");
  return new AUTStartStateMessage(componentIds);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public Message execute(){
  log.info("String_Node_Str" + getClass().getName() + "String_Node_Str");
  List componentIds=new ArrayList();
  AUTServerConfiguration.getInstance().setProfile(m_message.getProfile());
  for (Iterator it=m_message.getComponents().iterator(); it.hasNext(); ) {
    Component component=(Component)it.next();
    if (!component.isConcrete()) {
      continue;
    }
    ConcreteComponent concrete=(ConcreteComponent)component;
    try {
      String testerClass=concrete.getTesterClass();
      String componentClass=concrete.getComponentClass();
      if (!(StringUtils.isEmpty(testerClass) && StringUtils.isEmpty(componentClass))) {
        AUTServerConfiguration.getInstance().registerComponent(concrete);
      }
      if (concrete.hasDefaultMapping()) {
        componentIds=addComponentID(componentIds,concrete);
      }
    }
 catch (    UnsupportedComponentException e) {
      log.error("String_Node_Str",e);
    }
catch (    IllegalArgumentException e) {
      log.error("String_Node_Str",e);
    }
  }
  log.info("String_Node_Str" + getClass().getName() + "String_Node_Str");
  return new AUTStartStateMessage(componentIds);
}
Program: 95943
Project: 95943
Buggy source:
/** 
 * checks if any of the node has ReferencedDataCubes
 * @param selectionList the list to be checked
 * @return returns <code>true</code> if there is one PO with a refDataCube 
 */
private boolean hasRefDataCube(List<INodePO> selectionList){
  for (  INodePO selNode : selectionList) {
    List<INodePO> specTcs=new ArrayList<INodePO>();
    addCatChildren(selNode,specTcs);
    for (    INodePO spec : specTcs) {
      if (spec instanceof ISpecTestCasePO) {
        ISpecTestCasePO specTestCasePo=(ISpecTestCasePO)spec;
        if (specTestCasePo.getReferencedDataCube() != null) {
          return true;
        }
        Iterator<INodePO> execTcs=specTestCasePo.getNodeListIterator();
        while (execTcs.hasNext()) {
          INodePO exec=execTcs.next();
          IExecTestCasePO execTestCasePo=(IExecTestCasePO)exec;
          if (execTestCasePo.getReferencedDataCube() != null) {
            return true;
          }
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * checks if any of the node has ReferencedDataCubes
 * @param selectionList the list to be checked
 * @return returns <code>true</code> if there is one PO with a refDataCube 
 */
private boolean hasRefDataCube(List<INodePO> selectionList){
  for (  INodePO selNode : selectionList) {
    List<INodePO> specTcs=new ArrayList<INodePO>();
    addCatChildren(selNode,specTcs);
    for (    INodePO spec : specTcs) {
      if (spec instanceof ISpecTestCasePO) {
        ISpecTestCasePO specTestCasePo=(ISpecTestCasePO)spec;
        if (specTestCasePo.getReferencedDataCube() != null) {
          return true;
        }
        Iterator<INodePO> execTcs=specTestCasePo.getNodeListIterator();
        while (execTcs.hasNext()) {
          INodePO exec=execTcs.next();
          if (exec instanceof IExecTestCasePO) {
            IExecTestCasePO execTestCasePo=(IExecTestCasePO)exec;
            if (execTestCasePo.getReferencedDataCube() != null) {
              return true;
            }
          }
        }
      }
    }
  }
  return false;
}
Program: 95944
Project: 95944
Buggy source:
/** 
 * Checks if the specified menu item is enabled.
 * @param menuItem the menu item to verify against
 * @param enabled is the specified menu item enabled?
 */
public void verifyEnabledByIndexpath(int[] menuItem,boolean enabled){
  checkPathLength(menuItem.length);
  final IMenuItemComponent item=navigateToMenuItem(getAndCheckMenu(),menuItem);
  checkIsNull(item);
  try {
    Verifier.equals(enabled,item.isEnabled());
  }
  finally {
    closeMenu(getAndCheckMenu(),menuItem);
  }
}

Fixed version (ground truth):
/** 
 * Checks if the specified menu item is enabled.
 * @param menuItem the menu item to verify against
 * @param enabled is the specified menu item enabled?
 */
public void verifyEnabledByIndexpath(int[] menuItem,boolean enabled){
  checkPathLength(menuItem.length);
  final IMenuItemComponent item=navigateToMenuItem(getAndCheckMenu(),menuItem);
  try {
    checkIsNull(item);
    Verifier.equals(enabled,item.isEnabled());
  }
  finally {
    closeMenu(getAndCheckMenu(),menuItem);
  }
}
Program: 95945
Project: 95945
Buggy source:
/** 
 * Checks if the specified menu item is enabled.
 * @param menuItem the menu item to verify against
 * @param operator operator used for matching
 * @param enabled is the specified menu item enabled?
 */
public void verifyEnabled(String[] menuItem,String operator,boolean enabled){
  checkPathLength(menuItem.length);
  final IMenuItemComponent item=navigateToMenuItem(getAndCheckMenu(),menuItem,operator);
  checkIsNull(item);
  try {
    Verifier.equals(enabled,item.isEnabled());
  }
  finally {
    closeMenu(getAndCheckMenu(),menuItem,operator);
  }
}

Fixed version (ground truth):
/** 
 * Checks if the specified menu item is enabled.
 * @param menuItem the menu item to verify against
 * @param operator operator used for matching
 * @param enabled is the specified menu item enabled?
 */
public void verifyEnabled(String[] menuItem,String operator,boolean enabled){
  checkPathLength(menuItem.length);
  final IMenuItemComponent item=navigateToMenuItem(getAndCheckMenu(),menuItem,operator);
  try {
    checkIsNull(item);
    Verifier.equals(enabled,item.isEnabled());
  }
  finally {
    closeMenu(getAndCheckMenu(),menuItem,operator);
  }
}
Program: 95946
Project: 95946
Buggy source:
/** 
 * Checks if the specified menu item is selected.
 * @param menuItem the menu item to verify against
 * @param operator operator used for matching
 * @param selected is the specified menu item selected?
 */
public void verifySelected(String[] menuItem,String operator,boolean selected){
  checkPathLength(menuItem.length);
  final IMenuItemComponent item=navigateToMenuItem(getAndCheckMenu(),menuItem,operator);
  checkIsNull(item);
  try {
    Verifier.equals(selected,item.isSelected());
  }
  finally {
    closeMenu(getAndCheckMenu(),menuItem,operator);
  }
}

Fixed version (ground truth):
/** 
 * Checks if the specified menu item is selected.
 * @param menuItem the menu item to verify against
 * @param operator operator used for matching
 * @param selected is the specified menu item selected?
 */
public void verifySelected(String[] menuItem,String operator,boolean selected){
  checkPathLength(menuItem.length);
  final IMenuItemComponent item=navigateToMenuItem(getAndCheckMenu(),menuItem,operator);
  try {
    checkIsNull(item);
    Verifier.equals(selected,item.isSelected());
  }
  finally {
    closeMenu(getAndCheckMenu(),menuItem,operator);
  }
}
Program: 95947
Project: 95947
Buggy source:
/** 
 * Checks if the specified menu item is selected.
 * @param menuItem the menu item to verify against
 * @param selected is the specified menu item selected?
 */
public void verifySelectedByIndexpath(int[] menuItem,boolean selected){
  checkPathLength(menuItem.length);
  final IMenuItemComponent item=navigateToMenuItem(getAndCheckMenu(),menuItem);
  checkIsNull(item);
  try {
    Verifier.equals(selected,item.isSelected());
  }
  finally {
    closeMenu(getAndCheckMenu(),menuItem);
  }
}

Fixed version (ground truth):
/** 
 * Checks if the specified menu item is selected.
 * @param menuItem the menu item to verify against
 * @param selected is the specified menu item selected?
 */
public void verifySelectedByIndexpath(int[] menuItem,boolean selected){
  checkPathLength(menuItem.length);
  final IMenuItemComponent item=navigateToMenuItem(getAndCheckMenu(),menuItem);
  try {
    checkIsNull(item);
    Verifier.equals(selected,item.isSelected());
  }
  finally {
    closeMenu(getAndCheckMenu(),menuItem);
  }
}
Program: 95948
Project: 95948
Buggy source:
/** 
 * executes the right update
 * @param event int
 * @param obj Obbject
 */
private void switchEvent(int event,Object obj){
switch (event) {
case IObjectMappingObserver.EVENT_STEP_RECORDED:
    IAUTMainPO aut=(IAUTMainPO)obj;
  if (getAut() == aut) {
    cleanupNames();
  }
break;
case IObjectMappingObserver.EVENT_COMPONENT_MAPPED:
IAUTMainPO connectedAut=TestExecution.getInstance().getConnectedAut();
if (getAut().equals(connectedAut)) {
IComponentIdentifier[] comp=(IComponentIdentifier[])obj;
createNewTechnicalNames(comp);
}
break;
default :
}
}

Fixed version (ground truth):
/** 
 * executes the right update
 * @param event int
 * @param obj Object
 */
private void switchEvent(int event,Object obj){
switch (event) {
case IObjectMappingObserver.EVENT_STEP_RECORDED:
    IAUTMainPO aut=(IAUTMainPO)obj;
  if (getAut() == aut) {
    cleanupNames();
  }
break;
case IObjectMappingObserver.EVENT_COMPONENT_MAPPED:
IAUTMainPO connectedAut=TestExecution.getInstance().getConnectedAut();
if (getAut().equals(connectedAut)) {
IComponentIdentifier[] comp=(IComponentIdentifier[])obj;
createNewTechnicalNames(comp);
}
break;
default :
}
}
Program: 95949
Project: 95949
Buggy source:
/** 
 * {@inheritDoc}
 */
public void dispose(){
  getEditorSite().getActionBars().setGlobalActionHandler(ActionFactory.REFRESH.getId(),null);
  IAUTMainPO connectedAut=TestExecution.getInstance().getConnectedAut();
  if (AUTModeChangedCommand.getAutMode() == ChangeAUTModeMessage.OBJECT_MAPPING && connectedAut != null && connectedAut.equals(getAut())) {
    TestExecutionContributor.getInstance().getClientTest().resetToTesting();
    DataEventDispatcher.getInstance().fireOMStateChanged(OMState.notRunning);
  }
  ObjectMappingEventDispatcher.removeObserver(this);
  getSite().setSelectionProvider(null);
  GuiEventDispatcher.getInstance().removeEditorDirtyStateListener(this);
  m_treeViewerUpdater=null;
  if (m_editorHelper != null) {
    m_editorHelper.dispose();
  }
  super.dispose();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void dispose(){
  ObjectMappingEventDispatcher.removeObserver(this);
  getEditorSite().getActionBars().setGlobalActionHandler(ActionFactory.REFRESH.getId(),null);
  IAUTMainPO connectedAut=TestExecution.getInstance().getConnectedAut();
  if (AUTModeChangedCommand.getAutMode() == ChangeAUTModeMessage.OBJECT_MAPPING && connectedAut != null && connectedAut.equals(getAut())) {
    TestExecutionContributor.getInstance().getClientTest().resetToTesting();
    DataEventDispatcher.getInstance().fireOMStateChanged(OMState.notRunning);
  }
  getSite().setSelectionProvider(null);
  GuiEventDispatcher.getInstance().removeEditorDirtyStateListener(this);
  m_treeViewerUpdater=null;
  if (m_editorHelper != null) {
    m_editorHelper.dispose();
  }
  super.dispose();
}
Program: 95950
Project: 95950
Buggy source:
/** 
 * {@inheritDoc}
 */
protected Object setEditorToReplaceMode(Object editor,boolean replace){
  if (replace) {
    getRobot().clickAtCurrentPosition(editor,3,InputConstants.MOUSE_BUTTON_LEFT);
  }
 else {
    getRobot().clickAtCurrentPosition(editor,2,InputConstants.MOUSE_BUTTON_LEFT);
  }
  return editor;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
protected Object setEditorToReplaceMode(Object editor,boolean replace){
  if (replace) {
    ITextComponentAdapter textEditor=null;
    if (editor instanceof Text) {
      textEditor=new TextComponentAdapter(editor);
    }
    if (editor instanceof StyledText) {
      textEditor=new StyledTextAdapter(editor);
    }
    if (EnvironmentUtils.isMacOS()) {
      getRobot().clickAtCurrentPosition(editor,3,InputConstants.MOUSE_BUTTON_LEFT);
    }
 else {
      getRobot().keyStroke(getRobot().getSystemModifierSpec() + "String_Node_Str");
    }
    if (textEditor != null) {
      if (!textEditor.getSelectionText().equals(textEditor.getText())) {
        textEditor.selectAll();
      }
    }
  }
 else {
    getRobot().clickAtCurrentPosition(editor,2,InputConstants.MOUSE_BUTTON_LEFT);
  }
  return editor;
}
Program: 95951
Project: 95951
Buggy source:
/** 
 * Must be called to initialize the registration of adapters
 * @throws InstantiationException
 * @throws IllegalAccessException
 */
public static void initRegistration(){
  Class[] adapterFactories=findClassesOfType(ADAPTER_PACKAGE_NAME,IAdapterFactory.class);
  for (int i=0; i < adapterFactories.length; i++) {
    try {
      IAdapterFactory factory=(IAdapterFactory)adapterFactories[i].newInstance();
      getInstance().registerFactory(factory);
    }
 catch (    IllegalAccessException e) {
      log.error(e.getLocalizedMessage(),e);
    }
catch (    InstantiationException e) {
      log.error(e.getLocalizedMessage(),e);
    }
  }
}

Fixed version (ground truth):
/** 
 * Use this method outside of eclipse environments. Must be called to initialize the registration of adapters. This method directly calls   {@link AdapterFactoryRegistry#initRegistration(IUrlLocator)} withthe  {@link DefaultUrlLocator}.
 */
public static void initRegistration(){
  initRegistration(new DefaultUrlLocator());
}
Program: 95952
Project: 95952
Buggy source:
/** 
 * Investigate a package of subclasses of a specific superclass
 * @param packageName name of the package
 * @param superclass parent class for found classes
 * @return found classes
 */
private static Class[] findClassesOfType(String packageName,Class superclass){
  try {
    Class[] allClasses=getClasses(packageName);
    List assignableClasses=new ArrayList();
    for (int i=0; i < allClasses.length; i++) {
      if (superclass.isAssignableFrom(allClasses[i]) && superclass != allClasses[i]) {
        assignableClasses.add(allClasses[i]);
      }
    }
    return castListToClassArray(assignableClasses);
  }
 catch (  ClassNotFoundException e) {
    return new Class[0];
  }
catch (  IOException e) {
    return new Class[0];
  }
}

Fixed version (ground truth):
/** 
 * Investigate a package of subclasses of a specific superclass
 * @param urlLocator The URL location converter needed in eclipse environments.
 * @param packageName name of the package
 * @param superclass parent class for found classes
 * @return found classes
 */
private static Class[] findClassesOfType(IUrlLocator urlLocator,String packageName,Class superclass){
  try {
    Class[] allClasses=getClasses(urlLocator,packageName);
    List assignableClasses=new ArrayList();
    for (int i=0; i < allClasses.length; i++) {
      if (superclass.isAssignableFrom(allClasses[i]) && superclass != allClasses[i]) {
        assignableClasses.add(allClasses[i]);
      }
    }
    return castListToClassArray(assignableClasses);
  }
 catch (  ClassNotFoundException e) {
    return new Class[0];
  }
catch (  IOException e) {
    return new Class[0];
  }
}
Program: 95953
Project: 95953
Buggy source:
/** 
 * Scans all classes accessible from the context class loader which belong to the given package and subpackages.
 * @param packageName The base package
 * @return The classes
 * @throws ClassNotFoundException
 * @throws IOException
 */
private static Class[] getClasses(String packageName) throws ClassNotFoundException, IOException {
  ClassLoader classLoader=AdapterFactoryRegistry.class.getClassLoader();
  String path=packageName.replace('.','/');
  Enumeration resources=classLoader.getResources(path);
  List dirs=new ArrayList();
  while (resources.hasMoreElements()) {
    URL resource=(URL)resources.nextElement();
    dirs.add(resource);
  }
  List classes=new ArrayList();
  for (int i=0; i < dirs.size(); i++) {
    if (dirs.get(i).toString().startsWith("String_Node_Str")) {
      classes.addAll(findClassesInJar((URL)dirs.get(i),packageName));
    }
 else {
      classes.addAll(findClasses((URL)dirs.get(i),packageName));
    }
  }
  return castListToClassArray(classes);
}

Fixed version (ground truth):
/** 
 * Scans all classes accessible from the context class loader which belong to the given package and sub packages.
 * @param urlLocator The URL location converter needed in eclipse environments.
 * @param packageName The base package
 * @return The classes
 * @throws ClassNotFoundException
 * @throws IOException
 */
private static Class[] getClasses(IUrlLocator urlLocator,String packageName) throws ClassNotFoundException, IOException {
  ClassLoader classLoader=AdapterFactoryRegistry.class.getClassLoader();
  String path=packageName.replace('.','/');
  Enumeration resources=classLoader.getResources(path);
  List dirs=new ArrayList();
  while (resources.hasMoreElements()) {
    URL resource=(URL)resources.nextElement();
    try {
      resource=urlLocator.convertUrl(resource);
      dirs.add(resource);
    }
 catch (    IOException e) {
      log.error(e.getLocalizedMessage(),e);
    }
  }
  List classes=new ArrayList();
  for (int i=0; i < dirs.size(); i++) {
    if (dirs.get(i).toString().startsWith("String_Node_Str")) {
      classes.addAll(findClassesInJar((URL)dirs.get(i),packageName));
    }
 else {
      classes.addAll(findClasses((URL)dirs.get(i),packageName));
    }
  }
  return castListToClassArray(classes);
}
Program: 95954
Project: 95954
Buggy source:
/** 
 * Sign off adapter factory from all its supported classes
 * @param factory adapter factory that should be signed off
 */
public void signOffFactory(IAdapterFactory factory){
  Class[] supportedClasses=factory.getSupportedClasses();
  for (int i=0; i < supportedClasses.length; i++) {
    Collection registeredFactories=(Collection)m_registrationMap.get(supportedClasses[i]);
    if (registeredFactories == null) {
      return;
    }
    registeredFactories.remove(factory);
    m_registrationMap.put(supportedClasses[i],registeredFactories);
  }
}

Fixed version (ground truth):
/** 
 * Sign off adapter factory from all its supported classes
 * @param factory adapter factory that should be signed off
 */
public void signOffFactory(IAdapterFactory factory){
  Class[] supportedClasses=factory.getSupportedClasses();
  for (int i=0; i < supportedClasses.length; i++) {
    final Class supportedClass=supportedClasses[i];
    Collection registeredFactories=(Collection)m_registrationMap.get(supportedClass);
    if (registeredFactories == null) {
      return;
    }
    registeredFactories.remove(factory);
    m_registrationMap.remove(supportedClass);
  }
}
Program: 95955
Project: 95955
Buggy source:
/** 
 * {@inheritDoc}
 */
public void stateChanged(TestExecutionEvent event){
  if (event.getException() != null && event.getException() instanceof JBException) {
    String errorMsg=I18n.getString(event.getException().getMessage(),true);
    AbstractCmdlineClient.printlnConsoleError(errorMsg);
  }
switch (event.getState()) {
case TestExecutionEvent.TEST_EXEC_RESULT_TREE_READY:
    TestExecution.getInstance().getTrav().addExecStackModificationListener(m_progress);
  break;
case TestExecutionEvent.TEST_EXEC_START:
case TestExecutionEvent.TEST_EXEC_RESTART:
break;
case TestExecutionEvent.TEST_EXEC_FINISHED:
AbstractCmdlineClient.printConsoleLn(Messages.ExecutionControllerTestSuiteEnd,true);
m_job.getNextTestSuite();
m_clcServiceImpl.tsDone(isNoErrorWhileExecution() ? 0 : 1);
break;
case TestExecutionEvent.TEST_EXEC_PAUSED:
TestExecution.getInstance().pauseExecution(PauseMode.UNPAUSE);
break;
case TestExecutionEvent.TEST_EXEC_ERROR:
case TestExecutionEvent.TEST_EXEC_FAILED:
case TestExecutionEvent.TEST_EXEC_STOP:
m_job.getNextTestSuite();
break;
default :
break;
}
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void stateChanged(TestExecutionEvent event){
  if (event.getException() != null && event.getException() instanceof JBException) {
    String errorMsg=I18n.getString(event.getException().getMessage(),true);
    AbstractCmdlineClient.printlnConsoleError(errorMsg);
    stopProcessing();
  }
switch (event.getState()) {
case TestExecutionEvent.TEST_EXEC_RESULT_TREE_READY:
    TestExecution.getInstance().getTrav().addExecStackModificationListener(m_progress);
  break;
case TestExecutionEvent.TEST_EXEC_START:
case TestExecutionEvent.TEST_EXEC_RESTART:
break;
case TestExecutionEvent.TEST_EXEC_FINISHED:
AbstractCmdlineClient.printConsoleLn(Messages.ExecutionControllerTestSuiteEnd,true);
m_job.getNextTestSuite();
m_clcServiceImpl.tsDone(isNoErrorWhileExecution() ? 0 : 1);
break;
case TestExecutionEvent.TEST_EXEC_PAUSED:
TestExecution.getInstance().pauseExecution(PauseMode.UNPAUSE);
break;
case TestExecutionEvent.TEST_EXEC_ERROR:
case TestExecutionEvent.TEST_EXEC_FAILED:
case TestExecutionEvent.TEST_EXEC_STOP:
m_job.getNextTestSuite();
break;
default :
break;
}
}
Program: 95956
Project: 95956
Buggy source:
/** 
 * cleanup of connection
 */
protected void shutdown(){
  try {
    if (!AutAgentConnection.getInstance().isConnected()) {
      printlnConsoleError(Messages.ConnectionToAutUnexpectedly);
    }
  }
 catch (  ConnectionException e) {
    log.info(Messages.ConnectionToAutUnexpectedly,e);
  }
  IAUTConfigPO startedConfig=m_job.getAutConfig();
  if (startedConfig != null) {
    try {
      AutIdentifier startedAutId=new AutIdentifier(startedConfig.getConfigMap().get(AutConfigConstants.AUT_ID));
      if (AutAgentConnection.getInstance().isConnected()) {
        ClientTestFactory.getClientTest().stopAut(startedAutId);
      }
    }
 catch (    ConnectionException e) {
      log.info(Messages.ErrorWhileShuttingDownStopping,e);
    }
  }
  try {
    while (AutAgentConnection.getInstance().isConnected()) {
      ClientTestFactory.getClientTest().disconnectFromAutAgent();
      try {
        Thread.sleep(200);
      }
 catch (      InterruptedException e) {
      }
    }
  }
 catch (  ConnectionException e) {
    log.info(Messages.ErrorWhileShuttingDownDisconnecting,e);
  }
  if (LockManager.isRunning()) {
    LockManager.instance().dispose();
  }
}

Fixed version (ground truth):
/** 
 * cleanup of connection
 */
protected void shutdown(){
  try {
    if (!AutAgentConnection.getInstance().isConnected()) {
      printlnConsoleError(Messages.ConnectionToAutUnexpectedly);
    }
  }
 catch (  ConnectionException e) {
    log.info(Messages.ConnectionToAutUnexpectedly,e);
  }
  IAUTConfigPO startedConfig=m_job.getAutConfig();
  if (startedConfig != null) {
    try {
      AutIdentifier startedAutId=new AutIdentifier(startedConfig.getConfigMap().get(AutConfigConstants.AUT_ID));
      if (AutAgentConnection.getInstance().isConnected()) {
        ClientTestFactory.getClientTest().stopAut(startedAutId);
      }
    }
 catch (    ConnectionException e) {
      log.info(Messages.ErrorWhileShuttingDownStopping,e);
    }
  }
  try {
    while (AutAgentConnection.getInstance().isConnected()) {
      ClientTestFactory.getClientTest().disconnectFromAutAgent();
      TimeUtil.delay(200);
    }
  }
 catch (  ConnectionException e) {
    log.info(Messages.ErrorWhileShuttingDownDisconnecting,e);
  }
  if (LockManager.isRunning()) {
    LockManager.instance().dispose();
  }
}
Program: 95957
Project: 95957
Buggy source:
/** 
 * Set the component name of a tool bar. Calls   {@link #setComponentName(Widget,String)}with appending the suffix tool bar to the finalPartId.
 * @param partToolbar The part of the tool bar.
 * @param finalPartId The ID for the part of the tool bar.
 */
public static void setToolbarComponentName(Widget partToolbar,String finalPartId){
  RcpSwtComponentNamer.setToolbarComponentName(partToolbar,finalPartId + TOOLBAR_ID_SUFFIX);
}

Fixed version (ground truth):
/** 
 * Set the component name of a tool bar. Calls   {@link #setComponentName(Widget,String)}with appending the suffix tool bar to the finalPartId.
 * @param partToolbar The part of the tool bar.
 * @param finalPartId The ID for the part of the tool bar.
 */
public static void setToolbarComponentName(Widget partToolbar,String finalPartId){
  setComponentName(partToolbar,finalPartId + TOOLBAR_ID_SUFFIX);
}
Program: 95959
Project: 95959
Buggy source:
/** 
 * Expands or collapses the passed tree node. If the node is already  expanded or collapsed, respectively, nothing happens.  {@inheritDoc}
 */
public boolean operate(final Object treeNode) throws StepExecutionException {
  if (isCollapse()) {
    getContext().collapseNode(treeNode);
  }
 else {
    getContext().expandNode(treeNode);
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Expands or collapses the passed tree node. If the node is already  expanded or collapsed, respectively, nothing happens.  {@inheritDoc}
 */
public boolean operate(final Object treeNode) throws StepExecutionException {
  final AbstractTreeOperationContext context=getContext();
  if (context.getNumberOfChildren(treeNode) > 0) {
    if (isCollapse()) {
      context.collapseNode(treeNode);
    }
 else {
      context.expandNode(treeNode);
    }
  }
  return true;
}