nus-yam/ex-repair huggingface dataset:
Program: 96076
Project: 96076
Buggy source:
/** 
 * @param dbURL the dbURL string to get a database connection information for
 * @return The corresponding database connection information or<code>null</code> if no connection information available for the given dbURL.
 */
private DatabaseConnectionInfo getConnectionInfo(final String dbURL){
  DatabaseConnectionInfo connectionInfo=null;
  if (dbURL.startsWith(OracleConnectionInfo.JDBC_PRE)) {
    connectionInfo=new OracleConnectionInfo(){
      @Override public String getConnectionUrl(){
        return dbURL;
      }
    }
;
  }
 else   if (dbURL.startsWith(PostGreSQLConnectionInfo.JDBC_PRE)) {
    connectionInfo=new PostGreSQLConnectionInfo(){
      @Override public String getConnectionUrl(){
        return dbURL;
      }
    }
;
  }
 else   if (dbURL.startsWith(MySQLConnectionInfo.JDBC_PRE)) {
    connectionInfo=new MySQLConnectionInfo(){
      @Override public String getConnectionUrl(){
        return dbURL;
      }
    }
;
  }
 else   if (dbURL.startsWith(H2ConnectionInfo.JDBC_PRE)) {
    connectionInfo=new H2ConnectionInfo(){
      @Override public String getConnectionUrl(){
        return dbURL;
      }
    }
;
  }
  return connectionInfo;
}

Fixed version (ground truth):
/** 
 * @param dbURL the dbURL string to get a database connection information for
 * @return The corresponding database connection information or<code>null</code> if no connection information available for the given dbURL.
 */
private static DatabaseConnectionInfo getConnectionInfo(final String dbURL){
  DatabaseConnectionInfo connectionInfo=null;
  if (dbURL.startsWith(OracleConnectionInfo.JDBC_PRE)) {
    connectionInfo=new OracleConnectionInfo(){
      @Override public String getConnectionUrl(){
        return dbURL;
      }
    }
;
  }
 else   if (dbURL.startsWith(PostGreSQLConnectionInfo.JDBC_PRE)) {
    connectionInfo=new PostGreSQLConnectionInfo(){
      @Override public String getConnectionUrl(){
        return dbURL;
      }
    }
;
  }
 else   if (dbURL.startsWith(MySQLConnectionInfo.JDBC_PRE)) {
    connectionInfo=new MySQLConnectionInfo(){
      @Override public String getConnectionUrl(){
        return dbURL;
      }
    }
;
  }
 else   if (dbURL.startsWith(H2ConnectionInfo.JDBC_PRE)) {
    connectionInfo=new H2ConnectionInfo(){
      @Override public String getConnectionUrl(){
        return dbURL;
      }
    }
;
  }
  return connectionInfo;
}
Program: 96078
Project: 96078
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void partOpened(IWorkbenchPartReference partRef){
  if (Constants.TC_BROWSER_ID.equals(partRef.getId())) {
    m_tcb.add(partRef);
    if (m_tcb.size() > 1) {
      setMainTCB(getOpenTCBs().get(0));
    }
    fireStateChanged();
  }
}

Fixed version (ground truth):
/** 
 * {@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();
  }
}
Program: 96079
Project: 96079
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void partClosed(IWorkbenchPartReference partRef){
  if (Constants.TC_BROWSER_ID.equals(partRef.getId())) {
    m_tcb.remove(partRef);
    int count=m_tcb.size();
    if (partRef.getPartName().startsWith(Messages.TestCaseBrowserMainPrefix)) {
      if (count > 0) {
        setMainTCB(getOpenTCBs().get(0));
      }
 else {
        m_mainTCB=null;
      }
    }
    if (count == 1) {
      getMainTCB().setViewTitle(Messages.TestCaseBrowser);
    }
    fireStateChanged();
  }
}

Fixed version (ground truth):
/** 
 * {@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();
  }
}
Program: 96080
Project: 96080
Buggy source:
/** 
 * @param mainTCB the mainTCB to set
 */
public void setMainTCB(TestCaseBrowser mainTCB){
  if (m_mainTCB != null) {
    m_mainTCB.setViewTitle(Messages.TestCaseBrowser);
  }
  mainTCB.setViewTitle(Messages.TestCaseBrowserMainPrefix + Messages.TestCaseBrowser);
  m_mainTCB=mainTCB;
}

Fixed version (ground truth):
/** 
 * @param mainTCB the mainTCB to set; may be <code>null</code>.
 */
public void setMainTCB(TestCaseBrowser mainTCB){
  TestCaseBrowser oldMainTCB=m_mainTCB;
  TestCaseBrowser newMainTCB=mainTCB;
  m_mainTCB=mainTCB;
  if (newMainTCB == null) {
    return;
  }
  final String tcbTitle=Messages.TestCaseBrowser;
  final String mainTcbTitle=Messages.TestCaseBrowserMainPrefix + tcbTitle;
  if (oldMainTCB != null) {
    oldMainTCB.setViewTitle(tcbTitle);
  }
  final int tcbCount=getOpenTCBs().size();
  if (tcbCount == 1) {
    newMainTCB.setViewTitle(tcbTitle);
  }
 else   if (tcbCount > 1) {
    newMainTCB.setViewTitle(mainTcbTitle);
  }
}
Program: 96081
Project: 96081
Buggy source:
/** 
 * {@inheritDoc}
 */
public void createPartControl(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(GridLayoutFactory.fillDefaults().create());
  composite.setLayoutData(GridDataFactory.fillDefaults().create());
  final FilteredTree ft=new JBFilteredTree(composite,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER,new JBPatternFilter(),true);
  ComponentNameBrowserContentProvider cp=new ComponentNameBrowserContentProvider();
  setTreeViewer(ft.getViewer());
  ColumnViewerToolTipSupport.enableFor(getTreeViewer());
  getTreeViewer().setContentProvider(cp);
  getTreeViewer().setComparer(new UIIdentitiyElementComparer());
  DecoratingLabelProvider lp=new DecoratingLabelProvider(cp,Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  getTreeViewer().setLabelProvider(lp);
  getTreeViewer().setUseHashlookup(true);
  getTreeViewer().setAutoExpandLevel(DEFAULT_EXPANSION);
  getTreeViewer().setSorter(new ComponentNameNameViewerSorter());
  getTreeViewer().setComparer(new PersistentObjectComparer());
  getViewSite().setSelectionProvider(getTreeViewer());
  createTreeContextMenu(getViewSite());
  Plugin.getHelpSystem().setHelp(getTreeViewer().getControl(),ContextHelpIds.COMPONENT_NAMES_BROWSER);
  m_treeViewerUpdater=new ComponentNameTreeViewerUpdater(getTreeViewer());
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  ded.addProjectLoadedListener(this,true);
  ded.addDataChangedListener(this,true);
  ded.addDataChangedListener(m_treeViewerUpdater,true);
  if (GeneralStorage.getInstance().getProject() != null) {
    handleProjectLoaded();
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void createPartControl(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(GridLayoutFactory.fillDefaults().create());
  composite.setLayoutData(GridDataFactory.fillDefaults().create());
  final FilteredTree ft=new JBFilteredTree(composite,SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL| SWT.BORDER,new JBPatternFilter(),true);
  ComponentNameBrowserContentProvider cp=new ComponentNameBrowserContentProvider();
  setTreeViewer(ft.getViewer());
  getTreeViewer().setContentProvider(cp);
  getTreeViewer().setComparer(new UIIdentitiyElementComparer());
  getTreeViewer().setLabelProvider(cp);
  getTreeViewer().setUseHashlookup(true);
  getTreeViewer().setAutoExpandLevel(DEFAULT_EXPANSION);
  getTreeViewer().setSorter(new ComponentNameNameViewerSorter());
  getTreeViewer().setComparer(new PersistentObjectComparer());
  getViewSite().setSelectionProvider(getTreeViewer());
  createTreeContextMenu(getViewSite());
  Plugin.getHelpSystem().setHelp(getTreeViewer().getControl(),ContextHelpIds.COMPONENT_NAMES_BROWSER);
  m_treeViewerUpdater=new ComponentNameTreeViewerUpdater(getTreeViewer());
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  ded.addProjectLoadedListener(this,true);
  ded.addDataChangedListener(this,true);
  ded.addDataChangedListener(m_treeViewerUpdater,true);
  if (GeneralStorage.getInstance().getProject() != null) {
    handleProjectLoaded();
  }
}
Program: 96082
Project: 96082
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void postExecuteSuccess(String commandId,Object returnValue){
  completeProjectCheck();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void postExecuteSuccess(String commandId,Object returnValue){
  if (isInteresting(commandId)) {
    completeProjectCheck();
  }
}
Program: 96083
Project: 96083
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void postExecuteFailure(String commandId,ExecutionException exception){
  completeProjectCheck();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void postExecuteFailure(String commandId,ExecutionException exception){
  if (isInteresting(commandId)) {
    completeProjectCheck();
  }
}
Program: 96084
Project: 96084
Buggy source:
/** 
 * private constructor
 */
private CompletenessBP(){
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  ded.addLanguageChangedListener(this,false);
  ded.addProjectOpenedListener(this);
  ICommandService commandService=(ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
  IExecutionListener saveListener=new IExecutionListener(){
    /** 
 * {@inheritDoc} 
 */
    public void preExecute(    String commandId,    ExecutionEvent event){
    }
    /** 
 * {@inheritDoc} 
 */
    public void postExecuteSuccess(    String commandId,    Object returnValue){
      completeProjectCheck();
    }
    /** 
 * {@inheritDoc} 
 */
    public void postExecuteFailure(    String commandId,    ExecutionException exception){
      completeProjectCheck();
    }
    /** 
 * {@inheritDoc} 
 */
    public void notHandled(    String commandId,    NotHandledException exception){
    }
  }
;
  commandService.getCommand(IWorkbenchCommandConstants.FILE_SAVE).addExecutionListener(saveListener);
  commandService.getCommand(IWorkbenchCommandConstants.FILE_SAVE_ALL).addExecutionListener(saveListener);
}

Fixed version (ground truth):
/** 
 * private constructor
 */
private CompletenessBP(){
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  ded.addLanguageChangedListener(this,false);
  ded.addProjectOpenedListener(this);
  ICommandService commandService=(ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
  IExecutionListener saveListener=new IExecutionListener(){
    /** 
 * {@inheritDoc} 
 */
    public void preExecute(    String commandId,    ExecutionEvent event){
    }
    /** 
 * {@inheritDoc} 
 */
    public void postExecuteSuccess(    String commandId,    Object returnValue){
      if (isInteresting(commandId)) {
        completeProjectCheck();
      }
    }
    /** 
 * {@inheritDoc} 
 */
    public void postExecuteFailure(    String commandId,    ExecutionException exception){
      if (isInteresting(commandId)) {
        completeProjectCheck();
      }
    }
    /** 
 * {@inheritDoc} 
 */
    public void notHandled(    String commandId,    NotHandledException exception){
    }
    /** 
 * whether the corresponding command is "interesting" 
 */
    private boolean isInteresting(    String commandId){
      boolean isInteresting=false;
      if (IWorkbenchCommandConstants.FILE_SAVE.equals(commandId) || IWorkbenchCommandConstants.FILE_SAVE_ALL.equals(commandId)) {
        isInteresting=true;
      }
      return isInteresting;
    }
  }
;
  commandService.addExecutionListener(saveListener);
  commandService.addExecutionListener(saveListener);
}
Program: 96085
Project: 96085
Buggy source:
/** 
 * Updates this view. Causes the view to get and display its data.
 */
private void updateView(){
  clearTableViewer();
  fillParamCombo();
  fillDataSetCombo();
  fillLanguageCombo();
  setPriorComboSelection();
  if (getParamInterfaceObj() != null && isNodeValid(getParamInterfaceObj())) {
    getTableViewer().setInput(getInputForTable(getParamInterfaceObj()));
    createTable();
  }
 else {
    getTableViewer().setInput(null);
  }
}

Fixed version (ground truth):
/** 
 * Updates this view. Causes the view to get and display its data.
 */
private void updateView(){
  clearTableViewer();
  fillParamCombo();
  fillDataSetCombo();
  fillLanguageCombo();
  setPriorComboSelection();
  IParameterInterfacePO paramObj=getParamInterfaceObj();
  if (paramObj != null && isNodeValid(paramObj)) {
    getTableViewer().setInput(getInputForTable(paramObj));
    createTable();
  }
 else {
    getTableViewer().setInput(null);
  }
}
Program: 96086
Project: 96086
Buggy source:
/** 
 * {@inheritDoc}
 */
public void dispose(){
  final DataEventDispatcher dispatcher=DataEventDispatcher.getInstance();
  dispatcher.removeParamChangedListener(this);
  dispatcher.removeLanguageChangedListener(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);
  super.dispose();
}
Program: 96087
Project: 96087
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected boolean isEditorOpen(IParameterInterfacePO paramObj){
  if (paramObj != null) {
    IParamNodePO paramNode=getParamNodePO(paramObj);
    INodePO node=paramNode;
    if (paramNode instanceof ICapPO || paramNode instanceof IExecTestCasePO) {
      node=paramNode.getParentNode();
    }
    List<IEditorReference> editors=Plugin.getAllEditors();
    for (    IEditorReference reference : editors) {
      try {
        if (reference.getEditorInput() instanceof NodeEditorInput) {
          INodePO editorInputNode=((NodeEditorInput)reference.getEditorInput()).getNode();
          if (editorInputNode != null && editorInputNode.equals(node)) {
            return true;
          }
        }
      }
 catch (      PartInitException e) {
      }
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
protected boolean isEditorOpen(IParameterInterfacePO paramObj){
  if (paramObj != null) {
    Object inputNode=paramObj;
    if (paramObj instanceof ICapPO || paramObj instanceof IExecTestCasePO) {
      inputNode=getParamNodePO(paramObj).getParentNode();
    }
    List<IEditorReference> editors=Plugin.getAllEditors();
    for (    IEditorReference reference : editors) {
      try {
        if (reference.getEditorInput() instanceof NodeEditorInput) {
          INodePO editorInputNode=((NodeEditorInput)reference.getEditorInput()).getNode();
          if (editorInputNode != null && editorInputNode.equals(inputNode)) {
            return true;
          }
        }
      }
 catch (      PartInitException e) {
      }
    }
  }
  return false;
}
Program: 96088
Project: 96088
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected boolean isNodeValid(IParameterInterfacePO paramObj){
  return getParamNodePO(paramObj).isValid();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
protected boolean isNodeValid(IParameterInterfacePO paramObj){
  return paramObj instanceof IParamNodePO && getParamNodePO(paramObj).isValid();
}
Program: 96089
Project: 96089
Buggy source:
/** 
 * private constructor
 */
private CompletenessBP(){
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  ded.addLanguageChangedListener(this,false);
  ded.addProjectOpenedListener(this);
  ICommandService commandService=(ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
  IExecutionListener saveListener=new IExecutionListener(){
    /** 
 * {@inheritDoc} 
 */
    public void preExecute(    String commandId,    ExecutionEvent event){
    }
    /** 
 * {@inheritDoc} 
 */
    public void postExecuteSuccess(    String commandId,    Object returnValue){
      if (isInteresting(commandId)) {
        completeProjectCheck();
      }
    }
    /** 
 * {@inheritDoc} 
 */
    public void postExecuteFailure(    String commandId,    ExecutionException exception){
      if (isInteresting(commandId)) {
        completeProjectCheck();
      }
    }
    /** 
 * {@inheritDoc} 
 */
    public void notHandled(    String commandId,    NotHandledException exception){
    }
    /** 
 * whether the corresponding command is "interesting" 
 */
    private boolean isInteresting(    String commandId){
      boolean isInteresting=false;
      if (IWorkbenchCommandConstants.FILE_SAVE.equals(commandId) || IWorkbenchCommandConstants.FILE_SAVE_ALL.equals(commandId)) {
        isInteresting=true;
      }
      return isInteresting;
    }
  }
;
  commandService.addExecutionListener(saveListener);
  commandService.addExecutionListener(saveListener);
}

Fixed version (ground truth):
/** 
 * private constructor
 */
private CompletenessBP(){
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  ded.addLanguageChangedListener(this,false);
  ded.addProjectOpenedListener(this);
  ICommandService commandService=(ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
  IExecutionListener saveListener=new IExecutionListener(){
    /** 
 * {@inheritDoc} 
 */
    public void preExecute(    String commandId,    ExecutionEvent event){
    }
    /** 
 * {@inheritDoc} 
 */
    public void postExecuteSuccess(    String commandId,    Object returnValue){
      if (isInteresting(commandId)) {
        completeProjectCheck();
      }
    }
    /** 
 * {@inheritDoc} 
 */
    public void postExecuteFailure(    String commandId,    ExecutionException exception){
      if (isInteresting(commandId)) {
        completeProjectCheck();
      }
    }
    /** 
 * {@inheritDoc} 
 */
    public void notHandled(    String commandId,    NotHandledException exception){
    }
    /** 
 * whether the corresponding command is "interesting" 
 */
    private boolean isInteresting(    String commandId){
      boolean isInteresting=false;
      if (IWorkbenchCommandConstants.FILE_SAVE.equals(commandId) || IWorkbenchCommandConstants.FILE_SAVE_ALL.equals(commandId)) {
        isInteresting=true;
      }
      return isInteresting;
    }
  }
;
  commandService.addExecutionListener(saveListener);
}
Program: 96090
Project: 96090
Buggy source:
/** 
 * Tries to find a menu in the menubar.
 * @param mb the menu bar
 * @param idx the index of the menu to find
 * @return the menu
 */
public static JMenu findMenu(JMenuBar mb,int idx){
  List visibleSubMenus=new ArrayList();
  MenuElement[] subElements=mb.getSubElements();
  for (int i=0; i < subElements.length; ++i) {
    if (subElements[i] instanceof JMenu) {
      JMenu menu=(JMenu)subElements[i];
      if (menu != null && menu.isShowing()) {
        visibleSubMenus.add(menu);
      }
    }
  }
  if (idx >= visibleSubMenus.size()) {
    return null;
  }
  return (JMenu)visibleSubMenus.get(idx);
}

Fixed version (ground truth):
/** 
 * Tries to find a menu in the menubar.
 * @param mb the menu bar
 * @param idx the index of the menu to find
 * @return the menu, or <code>null</code> if not found
 */
public static JMenu findMenu(JMenuBar mb,int idx){
  List visibleSubMenus=new ArrayList();
  MenuElement[] subElements=mb.getSubElements();
  for (int i=0; i < subElements.length; ++i) {
    if (subElements[i] instanceof JMenu) {
      JMenu menu=(JMenu)subElements[i];
      if (menu != null && menu.isShowing()) {
        visibleSubMenus.add(menu);
      }
    }
  }
  if (idx >= visibleSubMenus.size() || idx < 0) {
    return null;
  }
  return (JMenu)visibleSubMenus.get(idx);
}
Program: 96091
Project: 96091
Buggy source:
/** 
 * Closes the given item in the given menuBar (if open)
 * @param robot the robot
 * @param menuBar the menu bar
 * @param item the item to close
 */
public static void closeMenu(IRobot robot,JMenuBar menuBar,String item){
  final int index=getItemNumber(menuBar,item);
  if (menuBar.getSelectionModel().getSelectedIndex() == index) {
    JMenu menu=findMenu(menuBar,index);
    clickMenuItem(robot,menu);
  }
}

Fixed version (ground truth):
/** 
 * Closes the given item in the given menuBar (if open)
 * @param robot the robot
 * @param menuBar the menu bar
 * @param item the item to close
 */
public static void closeMenu(IRobot robot,JMenuBar menuBar,String item){
  final int index=getItemNumber(menuBar,item);
  if (menuBar.getSelectionModel().getSelectedIndex() == index) {
    JMenu menu=findMenu(menuBar,index);
    if (menu != null) {
      clickMenuItem(robot,menu);
    }
  }
}
Program: 96092
Project: 96092
Buggy source:
/** 
 * get the eventExecTC for a given eventType
 * @param eventType eventType for wanted eventExecTC
 * @return the eventExecTC for given eventType or null
 */
public IEventExecTestCasePO getEventExecTC(String eventType){
  return getEventExecTcMap().get(eventType);
}

Fixed version (ground truth):
/** 
 * get the eventExecTC for a given eventType
 * @param eventType eventType for wanted eventExecTC
 * @return the eventExecTC for given eventType or null
 */
public IEventExecTestCasePO getEventExecTC(String eventType){
  setParents(getEventExecTcMap().values());
  return getEventExecTcMap().get(eventType);
}
Program: 96093
Project: 96093
Buggy source:
/** 
 * @return all EventExecTestCases of this SpecTestCasePO.
 */
@Transient public Collection<IEventExecTestCasePO> getAllEventEventExecTC(){
  Collection<IEventExecTestCasePO> evHandlers=getEventExecTcMap().values();
  for (  IEventExecTestCasePO evTc : evHandlers) {
    evTc.setParentNode(this);
  }
  return Collections.unmodifiableCollection(evHandlers);
}

Fixed version (ground truth):
/** 
 * @return all EventExecTestCases of this SpecTestCasePO.
 */
@Transient public Collection<IEventExecTestCasePO> getAllEventEventExecTC(){
  Collection<IEventExecTestCasePO> evHandlers=getEventExecTcMap().values();
  setParents(evHandlers);
  return Collections.unmodifiableCollection(evHandlers);
}
Program: 96094
Project: 96094
Buggy source:
/** 
 * find the next eventHandler for given eventType
 * @param eventType eventType for eventHandler to find
 * @return the next eventHandler for given eventType
 */
@SuppressWarnings("String_Node_Str") private EventObject getEventObject(String eventType){
  List<INodePO> nodeList=IteratorUtils.toList(m_execStack.peek().getExecNode().getNodeListIterator());
  ICapPO cap=(ICapPO)nodeList.get(m_execStack.peek().getIndex());
  ExecStackMarker marker=new ExecStackMarker(m_execStack,cap);
  EventObject eventObj=null;
  int startIndex=m_execStack.size() - 1;
  for (int i=startIndex; i > 0 && i < m_execStack.size(); --i) {
    ExecObject obj=m_execStack.get(i);
    IExecTestCasePO execTc=(IExecTestCasePO)obj.getExecNode();
    Map<String,IEventExecTestCasePO> eventMap=execTc.getEventMap();
    if (!isHandlingError(i) && eventMap.containsKey(eventType)) {
      IEventExecTestCasePO eventExecTc=eventMap.get(eventType);
      if (!(eventExecTc.getReentryProp().equals(ReentryProperty.RETRY) && m_markerToNumRetriesMap.containsKey(marker) && m_markerToNumRetriesMap.get(marker) >= eventExecTc.getMaxRetries())) {
        eventObj=new EventObject(eventExecTc,i);
        break;
      }
      eventExecTc=null;
    }
  }
  if (eventObj == null) {
    IEventExecTestCasePO eventExecTc=DefaultEventHandler.getDefaultEventHandler(eventType,m_root);
    Validate.notNull(eventExecTc,Messages.MissingDefaultEventHandlerForEventType + eventType + StringConstants.DOT);
    eventObj=new EventObject(eventExecTc,0);
  }
  return eventObj;
}

Fixed version (ground truth):
/** 
 * find the next eventHandler for given eventType
 * @param eventType eventType for eventHandler to find
 * @return the next eventHandler for given eventType
 */
@SuppressWarnings("String_Node_Str") private EventObject getEventObject(String eventType){
  List<INodePO> nodeList=IteratorUtils.toList(m_execStack.peek().getExecNode().getNodeListIterator());
  ICapPO cap=(ICapPO)nodeList.get(m_execStack.peek().getIndex());
  ExecStackMarker marker=new ExecStackMarker(m_execStack,cap);
  EventObject eventObj=null;
  int startIndex=m_execStack.size() - 1;
  for (int i=startIndex; i > 0 && i < m_execStack.size(); --i) {
    ExecObject obj=m_execStack.get(i);
    IExecTestCasePO execTc=(IExecTestCasePO)obj.getExecNode();
    IEventExecTestCasePO eventExecTc=execTc.getEventExecTC(eventType);
    if (!isHandlingError(i) && eventExecTc != null) {
      if (!(eventExecTc.getReentryProp().equals(ReentryProperty.RETRY) && m_markerToNumRetriesMap.containsKey(marker) && m_markerToNumRetriesMap.get(marker) >= eventExecTc.getMaxRetries())) {
        eventObj=new EventObject(eventExecTc,i);
        break;
      }
      eventExecTc=null;
    }
  }
  if (eventObj == null) {
    IEventExecTestCasePO eventExecTc=DefaultEventHandler.getDefaultEventHandler(eventType,m_root);
    Validate.notNull(eventExecTc,Messages.MissingDefaultEventHandlerForEventType + eventType + StringConstants.DOT);
    eventObj=new EventObject(eventExecTc,0);
  }
  return eventObj;
}
Program: 96095
Project: 96095
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void decorate(Object element,IDecoration decoration){
  final INodePO node=(INodePO)element;
  if (ProblemFactory.hasProblem(node)) {
    IProblem worstProblem=ProblemFactory.getWorstProblem(node.getProblems());
switch (worstProblem.getStatus().getSeverity()) {
case IStatus.WARNING:
      decoration.addOverlay(IconConstants.WARNING_IMAGE_DESCRIPTOR);
    break;
case IStatus.ERROR:
  decoration.addOverlay(IconConstants.ERROR_IMAGE_DESCRIPTOR);
break;
default :
break;
}
}
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void decorate(Object element,IDecoration decoration){
  final INodePO node=(INodePO)element;
  IProblem worstProblem=ProblemFactory.getWorstProblem(node.getProblems());
  if (worstProblem != null) {
switch (worstProblem.getStatus().getSeverity()) {
case IStatus.WARNING:
      decoration.addOverlay(IconConstants.WARNING_IMAGE_DESCRIPTOR);
    break;
case IStatus.ERROR:
  decoration.addOverlay(IconConstants.ERROR_IMAGE_DESCRIPTOR);
break;
default :
break;
}
}
}
Program: 96096
Project: 96096
Buggy source:
/** 
 * {@inheritDoc}
 */
public void handleEditorDirtyStateChanged(IJBEditor gdEditor,boolean isDirty){
  if (gdEditor == this) {
    m_revertEditorChangesAction.setEnabled(isDirty);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void handleEditorDirtyStateChanged(IJBEditor gdEditor,boolean isDirty){
  if (gdEditor == this) {
    IEvaluationService service=(IEvaluationService)getSite().getService(IEvaluationService.class);
    service.requestEvaluation(EditorPartPropertyTester.FQN_IS_DIRTY);
  }
}
Program: 96097
Project: 96097
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);
  setInitialInput();
  ColumnViewerToolTipSupport.enableFor(getTreeViewer());
  DecoratingCellLabelProvider lp=new DecoratingCellLabelProvider(new TooltipLabelProvider(),Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  getTreeViewer().setLabelProvider(lp);
  final DataEventDispatcher dispatcher=DataEventDispatcher.getInstance();
  dispatcher.addPropertyChangedListener(this,true);
  addDragAndDropSupport(DND.DROP_MOVE,new Transfer[]{LocalSelectionTransfer.getInstance()});
  getEditorHelper().addListeners();
  setActionHandlers();
  addTreeDoubleClickListener(RCPCommandIDs.REFERENCE_TC_COMMAND_ID);
  GuiEventDispatcher.getInstance().addEditorDirtyStateListener(this,true);
  DataEventDispatcher.getInstance().addDataChangedListener(new CentralTestDataUpdateListener(),false);
}

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);
  setInitialInput();
  ColumnViewerToolTipSupport.enableFor(getTreeViewer());
  DecoratingCellLabelProvider lp=new DecoratingCellLabelProvider(new TooltipLabelProvider(),Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  getTreeViewer().setLabelProvider(lp);
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  ded.addPropertyChangedListener(this,true);
  addDragAndDropSupport(DND.DROP_MOVE,new Transfer[]{LocalSelectionTransfer.getInstance()});
  getEditorHelper().addListeners();
  setActionHandlers();
  addTreeDoubleClickListener(RCPCommandIDs.REFERENCE_TC_COMMAND_ID);
  GuiEventDispatcher.getInstance().addEditorDirtyStateListener(this,true);
  ded.addDataChangedListener(new CentralTestDataUpdateListener(),false);
  ded.addParamChangedListener(this,true);
}
Program: 96098
Project: 96098
Buggy source:
/** 
 * Cleanup on closing.
 */
public void dispose(){
  try {
    if (CAPRecordedCommand.getRecordListener() == this) {
      CAPRecordedCommand.setRecordListener(null);
      TestExecutionContributor.getInstance().getClientTest().resetToTesting();
    }
    if (getEditorSite() != null && getEditorSite().getPage() != null) {
      DataEventDispatcher.getInstance().fireRecordModeStateChanged(RecordModeState.notRunning);
      removeGlobalActionHandler();
    }
  }
  finally {
    super.dispose();
  }
}

Fixed version (ground truth):
/** 
 * Cleanup on closing.
 */
public void dispose(){
  try {
    DataEventDispatcher ded=DataEventDispatcher.getInstance();
    if (CAPRecordedCommand.getRecordListener() == this) {
      CAPRecordedCommand.setRecordListener(null);
      TestExecutionContributor.getInstance().getClientTest().resetToTesting();
    }
    if (getEditorSite() != null && getEditorSite().getPage() != null) {
      ded.fireRecordModeStateChanged(RecordModeState.notRunning);
      removeGlobalActionHandler();
    }
    ded.removeParamChangedListener(this);
  }
  finally {
    super.dispose();
  }
}
Program: 96099
Project: 96099
Buggy source:
/** 
 * {@inheritDoc} 
 */
public Object execute(ExecutionEvent event) throws ExecutionException {
  AutStarter autAgentInstance=AutStarter.getInstance();
  if (autAgentInstance.getCommunicator() == null) {
    final int port=Platform.getPreferencesService().getInt(Activator.PLUGIN_ID,PreferenceInitializer.PREF_EMBEDDED_AGENT_PORT,PreferenceInitializer.DEFAULT_EMBEDDED_AGENT_PORT,null);
    try {
      autAgentInstance.start(port,false,Verbosity.QUIET,false);
    }
 catch (    Exception e) {
      ExecutionException execException=new ExecutionException("String_Node_Str",e);
      StatusManager.getManager().handle(new Status(IStatus.ERROR,Activator.PLUGIN_ID,I18n.getString("String_Node_Str",new String[]{String.valueOf(port)}),e),StatusManager.SHOW);
      throw execException;
    }
  }
  String hostname=EMBEDDED_AGENT_HOSTNAME;
  int port=autAgentInstance.getCommunicator().getLocalPort();
  Command connectToAutAgentCommand=CommandHelper.getCommandService().getCommand(RCPCommandIDs.CONNECT_TO_AUT_AGENT_COMMAND_ID);
  Map<String,String> parameters=new HashMap<String,String>();
  parameters.put(AUTAgentConnectHandler.AUT_AGENT_NAME_TO_CONNECT,hostname);
  parameters.put(AUTAgentConnectHandler.AUT_AGENT_PORT_TO_CONNECT,String.valueOf(port));
  parameters.put(RadioState.PARAMETER_ID,hostname + StringConstants.COLON + port);
  CommandHelper.executeParameterizedCommand(ParameterizedCommand.generateCommand(connectToAutAgentCommand,parameters));
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public Object execute(ExecutionEvent event) throws ExecutionException {
  AutStarter autAgentInstance=AutStarter.getInstance();
  if (autAgentInstance.getCommunicator() == null) {
    final int port=Platform.getPreferencesService().getInt(Activator.PLUGIN_ID,PreferenceInitializer.PREF_EMBEDDED_AGENT_PORT,PreferenceInitializer.DEFAULT_EMBEDDED_AGENT_PORT,null);
    try {
      autAgentInstance.start(port,false,Verbosity.QUIET,false);
    }
 catch (    Exception e) {
      ExecutionException execException=new ExecutionException("String_Node_Str",e);
      StatusManager.getManager().handle(new Status(IStatus.ERROR,Activator.PLUGIN_ID,I18n.getString("String_Node_Str",new String[]{String.valueOf(port)}),e),StatusManager.SHOW);
      throw execException;
    }
  }
  String hostname=EMBEDDED_AGENT_HOSTNAME;
  int port=autAgentInstance.getCommunicator().getLocalPort();
  Command connectToAutAgentCommand=CommandHelper.getCommandService().getCommand(RCPCommandIDs.CONNECT_TO_AUT_AGENT_COMMAND_ID);
  Map<String,String> parameters=new HashMap<String,String>();
  parameters.put(AUTAgentConnectHandler.AUT_AGENT_NAME_TO_CONNECT,hostname);
  parameters.put(AUTAgentConnectHandler.AUT_AGENT_PORT_TO_CONNECT,String.valueOf(port));
  CommandHelper.executeParameterizedCommand(ParameterizedCommand.generateCommand(connectToAutAgentCommand,parameters));
  return null;
}
Program: 96100
Project: 96100
Buggy source:
/** 
 * {@inheritDoc}
 */
public boolean operate(ITreeTraverserContext<INodePO> ctx,INodePO parent,INodePO node,boolean alreadyVisited){
  Class<? extends INodePO> nodeType=null;
  if (node instanceof ICategoryPO || node instanceof ISpecTestCasePO || node instanceof ICapPO|| node instanceof ITestSuitePO|| node instanceof IExecTestCasePO|| node instanceof ITestJobPO|| node instanceof IRefTestSuitePO|| node instanceof IComponentNamePO|| node instanceof IEventExecTestCasePO) {
    nodeType=node.getClass();
  }
  if (nodeType != null) {
    Integer ccount=getAmount().get(nodeType);
    if (ccount == null) {
      ccount=new Integer(0);
    }
    Integer nCount=ccount + 1;
    getAmount().put(nodeType,nCount);
    getProgressMonitor().worked(1);
    if (getProgressMonitor().isCanceled()) {
      getProgressMonitor().done();
      throw new OperationCanceledException();
    }
  }
  return !alreadyVisited;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public boolean operate(ITreeTraverserContext<INodePO> ctx,INodePO parent,INodePO node,boolean alreadyVisited){
  if (node instanceof IProjectPO) {
    return !alreadyVisited;
  }
  long currentProjectID=GeneralStorage.getInstance().getProject().getId();
  long nodeParentProjectID=node.getParentProjectId();
  if (currentProjectID != nodeParentProjectID) {
    return alreadyVisited;
  }
  Class<? extends INodePO> nodeType=null;
  if (node instanceof ICategoryPO || node instanceof ISpecTestCasePO || node instanceof ICapPO|| node instanceof ITestSuitePO|| node instanceof IExecTestCasePO|| node instanceof ITestJobPO|| node instanceof IRefTestSuitePO|| node instanceof IEventExecTestCasePO) {
    nodeType=node.getClass();
  }
  if (nodeType != null) {
    Integer ccount=getAmount().get(nodeType);
    if (ccount == null) {
      ccount=new Integer(0);
    }
    Integer nCount=ccount + 1;
    getAmount().put(nodeType,nCount);
    getProgressMonitor().worked(1);
    if (getProgressMonitor().isCanceled()) {
      getProgressMonitor().done();
      throw new OperationCanceledException();
    }
  }
  return !alreadyVisited;
}
Program: 96101
Project: 96101
Buggy source:
/** 
 * {@inheritDoc}
 */
public boolean operate(ITreeTraverserContext<INodePO> ctx,INodePO parent,INodePO node,boolean alreadyVisited){
  Class<? extends INodePO> nodeType=null;
  if (node instanceof ICategoryPO || node instanceof ISpecTestCasePO || node instanceof ICapPO|| node instanceof ITestSuitePO|| node instanceof IExecTestCasePO|| node instanceof ITestJobPO|| node instanceof IRefTestSuitePO|| node instanceof IComponentNamePO|| node instanceof IEventExecTestCasePO) {
    nodeType=node.getClass();
  }
  if (nodeType != null) {
    Integer ccount=getAmount().get(nodeType);
    if (ccount == null) {
      ccount=new Integer(0);
    }
    Integer nCount=ccount + 1;
    getAmount().put(nodeType,nCount);
    getProgressMonitor().worked(1);
    if (getProgressMonitor().isCanceled()) {
      getProgressMonitor().done();
      throw new OperationCanceledException();
    }
  }
  return !alreadyVisited;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public boolean operate(ITreeTraverserContext<INodePO> ctx,INodePO parent,INodePO node,boolean alreadyVisited){
  if (node instanceof IProjectPO) {
    return !alreadyVisited;
  }
  long currentProjectID=GeneralStorage.getInstance().getProject().getId();
  long nodeParentProjectID=node.getParentProjectId();
  if (currentProjectID != nodeParentProjectID) {
    return alreadyVisited;
  }
  Class<? extends INodePO> nodeType=null;
  if (node instanceof ICategoryPO || node instanceof ISpecTestCasePO || node instanceof ICapPO|| node instanceof ITestSuitePO|| node instanceof IExecTestCasePO|| node instanceof ITestJobPO|| node instanceof IRefTestSuitePO|| node instanceof IEventExecTestCasePO) {
    nodeType=node.getClass();
  }
  if (nodeType != null) {
    Integer ccount=getAmount().get(nodeType);
    if (ccount == null) {
      ccount=new Integer(0);
    }
    Integer nCount=ccount + 1;
    getAmount().put(nodeType,nCount);
    getProgressMonitor().worked(1);
    if (getProgressMonitor().isCanceled()) {
      getProgressMonitor().done();
      throw new OperationCanceledException();
    }
  }
  return !alreadyVisited;
}
Program: 96103
Project: 96103
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);
    if (shouldAndCanRunWithMonitoring(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());
    }
  }
 else {
    if (shouldAndCanRunWithMonitoring(parameters)) {
      sb.append(JAVA_OPTIONS_INTRO).append(getMonitoringAgent(parameters));
    }
  }
  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 (org.eclipse.jubula.tools.utils.MonitoringUtil.shouldAndCanRunWithMonitoring(parameters)) {
      String monAgent=getMonitoringAgent(parameters);
      if (monAgent != null) {
        sb.append(monAgent).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());
    }
  }
 else {
    if (org.eclipse.jubula.tools.utils.MonitoringUtil.shouldAndCanRunWithMonitoring(parameters)) {
      String monAgent=getMonitoringAgent(parameters);
      if (monAgent != null) {
        sb.append(JAVA_OPTIONS_INTRO).append(monAgent);
      }
    }
  }
  return sb.toString();
}
Program: 96104
Project: 96104
Buggy source:
/** 
 * {@inheritDoc}
 */
protected String[] createEnvArray(Map parameters,boolean isAgentSet){
  String[] envArray=super.createEnvArray(parameters,isAgentSet);
  if (envArray == null) {
    envArray=EnvironmentUtils.propToStrArray(EnvironmentUtils.getProcessEnvironment(),IStartAut.PROPERTY_DELIMITER);
  }
  Vector<String> envList=new Vector<String>(Arrays.asList(envArray));
  envList.addAll(getConnectionProperties(parameters,StartSwtAutServerCommand.ENV_VAR_PREFIX,StartSwtAutServerCommand.ENV_VALUE_SEP));
  if (shouldAndCanRunWithMonitoring(parameters)) {
    StringBuffer sb=new StringBuffer();
    sb.append(JAVA_OPTIONS_INTRO);
    sb.append(this.getMonitoringAgent(parameters));
    envList.add(sb.toString());
    envArray=super.createEnvArray(parameters,true);
  }
  envArray=envList.toArray(new String[envList.size()]);
  return envArray;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
protected String[] createEnvArray(Map parameters,boolean isAgentSet){
  String[] envArray=super.createEnvArray(parameters,isAgentSet);
  if (envArray == null) {
    envArray=EnvironmentUtils.propToStrArray(EnvironmentUtils.getProcessEnvironment(),IStartAut.PROPERTY_DELIMITER);
  }
  Vector<String> envList=new Vector<String>(Arrays.asList(envArray));
  envList.addAll(getConnectionProperties(parameters,StartSwtAutServerCommand.ENV_VAR_PREFIX,StartSwtAutServerCommand.ENV_VALUE_SEP));
  if (MonitoringUtil.shouldAndCanRunWithMonitoring(parameters)) {
    String monAgent=this.getMonitoringAgent(parameters);
    if (monAgent != null) {
      StringBuffer sb=new StringBuffer();
      sb.append(JAVA_OPTIONS_INTRO);
      sb.append(monAgent);
      envList.add(sb.toString());
      envArray=super.createEnvArray(parameters,true);
    }
  }
  envArray=envList.toArray(new String[envList.size()]);
  return envArray;
}
Program: 96105
Project: 96105
Buggy source:
/** 
 * {@inheritDoc}
 */
protected String[] createEnvArray(Map parameters,boolean isAgentSet){
  if (isRunningFromExecutable(parameters) || shouldAndCanRunWithMonitoring(parameters)) {
    setEnv(parameters);
    boolean agentActive=true;
    return super.createEnvArray(parameters,agentActive);
  }
  return super.createEnvArray(parameters,isAgentSet);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
protected String[] createEnvArray(Map parameters,boolean isAgentSet){
  if (isRunningFromExecutable(parameters) || MonitoringUtil.shouldAndCanRunWithMonitoring(parameters)) {
    setEnv(parameters);
    boolean agentActive=true;
    return super.createEnvArray(parameters,agentActive);
  }
  return super.createEnvArray(parameters,isAgentSet);
}
Program: 96107
Project: 96107
Buggy source:
/** 
 * checks if last connected AUT was running with monitoring agent.
 * @return true if last connected AUT was running with monitoring else false
 */
private boolean isRunningWithMonitoring(){
  AutIdentifier autID=TestExecution.getInstance().getConnectedAutId();
  if (autID != null) {
    Map<String,String> m=requestAutConfigMapFromAgent(autID.getExecutableName());
    if (m != null) {
      String monitoringID=m.get(AutConfigConstants.MONITORING_AGENT_ID);
      if (!StringUtils.isEmpty(monitoringID)) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * checks if last connected AUT was running with monitoring agent.
 * @return true if last connected AUT was running with monitoring else false
 */
private boolean isRunningWithMonitoring(){
  AutIdentifier autID=TestExecution.getInstance().getConnectedAutId();
  if (autID != null) {
    Map<String,String> m=requestAutConfigMapFromAgent(autID.getExecutableName());
    if (m != null) {
      if (MonitoringUtil.shouldAndCanRunWithMonitoring(m)) {
        return true;
      }
    }
  }
  return false;
}
Program: 96108
Project: 96108
Buggy source:
/** 
 * Create this dialog's expert area component.
 * @param expertAreaComposite Composite representing the expert area.
 */
protected void createExpertArea(Composite expertAreaComposite){
  ControlDecorator.decorateInfo(UIComponentHelper.createLabel(expertAreaComposite,"String_Node_Str"),"String_Node_Str",false);
  m_autJreParamTextField=UIComponentHelper.createTextField(expertAreaComposite,2);
  initGuiEnvironmentEditor(expertAreaComposite);
  UIComponentHelper.createLabel(expertAreaComposite,"String_Node_Str");
  m_activationMethodCombo=UIComponentHelper.createEnumCombo(expertAreaComposite,2,"String_Node_Str",ActivationMethod.class);
  UIComponentHelper.createSeparator(expertAreaComposite,3);
  ControlDecorator.decorateInfo(UIComponentHelper.createLabel(expertAreaComposite,"String_Node_Str"),"String_Node_Str",false);
  m_monitoringCombo=UIComponentHelper.createCombo(expertAreaComposite,2,MonitoringUtils.getAllRegisteredMonitoringIds(),MonitoringUtils.getAllRegisteredMonitoringNames(),true);
  super.createExpertArea(expertAreaComposite);
}

Fixed version (ground truth):
/** 
 * Create this dialog's expert area component.
 * @param expertAreaComposite Composite representing the expert area.
 */
protected void createExpertArea(Composite expertAreaComposite){
  ControlDecorator.decorateInfo(UIComponentHelper.createLabel(expertAreaComposite,"String_Node_Str"),"String_Node_Str",false);
  m_autJreParamTextField=UIComponentHelper.createTextField(expertAreaComposite,2);
  initGuiEnvironmentEditor(expertAreaComposite);
  UIComponentHelper.createLabel(expertAreaComposite,"String_Node_Str");
  m_activationMethodCombo=UIComponentHelper.createEnumCombo(expertAreaComposite,2,"String_Node_Str",ActivationMethod.class);
  UIComponentHelper.createSeparator(expertAreaComposite,3);
  ControlDecorator.decorateInfo(UIComponentHelper.createLabel(expertAreaComposite,"String_Node_Str"),"String_Node_Str",false);
  m_monitoringCombo=UIComponentHelper.createCombo(expertAreaComposite,2,MonitoringRegistry.getAllRegisteredMonitoringIds(),MonitoringRegistry.getAllRegisteredMonitoringNames(),true);
  super.createExpertArea(expertAreaComposite);
}
Program: 96109
Project: 96109
Buggy source:
/** 
 * {@inheritDoc}
 */
protected void createMonitoringArea(Composite monitoringComposite){
  GridLayout result=(GridLayout)monitoringComposite.getLayout();
  result.horizontalSpacing=40;
  result.numColumns=2;
  monitoringComposite.setLayout(result);
  final String monitoringID=super.getConfigValue(AutConfigConstants.MONITORING_AGENT_ID);
  if (!StringUtils.isEmpty(monitoringID)) {
    IConfigurationElement monitoringExtension=MonitoringUtils.getElement(monitoringID);
    if (monitoringExtension != null) {
      createMonitoringUIComponents(monitoringComposite,MonitoringUtils.getAttributes(monitoringExtension));
    }
 else {
      StyledText missingExtensionLabel=new StyledText(monitoringComposite,SWT.WRAP);
      missingExtensionLabel.setText(Messages.MissingMonitoringExtension);
      missingExtensionLabel.setEditable(false);
      missingExtensionLabel.setEnabled(false);
      missingExtensionLabel.setStyleRange(new StyleRange(0,missingExtensionLabel.getText().length(),null,null,SWT.ITALIC));
      ControlDecorator.decorateWarning(missingExtensionLabel,SWT.LEAD,"String_Node_Str");
    }
  }
  resize();
  getShell().pack();
  super.createMonitoringArea(monitoringComposite);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
protected void createMonitoringArea(Composite monitoringComposite){
  GridLayout result=(GridLayout)monitoringComposite.getLayout();
  result.horizontalSpacing=40;
  result.numColumns=2;
  monitoringComposite.setLayout(result);
  final String monitoringID=super.getConfigValue(AutConfigConstants.MONITORING_AGENT_ID);
  if (!StringUtils.isEmpty(monitoringID)) {
    IConfigurationElement monitoringExtension=MonitoringRegistry.getElement(monitoringID);
    if (monitoringExtension != null) {
      createMonitoringUIComponents(monitoringComposite,MonitoringRegistry.getAttributes(monitoringExtension));
    }
 else {
      StyledText missingExtensionLabel=new StyledText(monitoringComposite,SWT.WRAP);
      missingExtensionLabel.setText(Messages.MissingMonitoringExtension);
      missingExtensionLabel.setEditable(false);
      missingExtensionLabel.setEnabled(false);
      missingExtensionLabel.setStyleRange(new StyleRange(0,missingExtensionLabel.getText().length(),null,null,SWT.ITALIC));
      ControlDecorator.decorateWarning(missingExtensionLabel,SWT.LEAD,"String_Node_Str");
    }
  }
  resize();
  getShell().pack();
  super.createMonitoringArea(monitoringComposite);
}