nus-yam/ex-repair huggingface dataset:
Program: 96183
Project: 96183
Buggy source:
/** 
 * @return the String from the Cell Renderer
 */
public String getText(){
  final JComboBox comboBox=((JComboBox)m_implClass.getComponent());
  final int selIndex=comboBox.getSelectedIndex();
  if (selIndex == -1) {
    return null;
  }
  final JList jlist=new JList(comboBox.getModel());
  Object o=m_eventThreadQueuer.invokeAndWait("String_Node_Str",new IRunnable(){
    public Object run(){
      Component disp=comboBox.getRenderer().getListCellRendererComponent(jlist,jlist.getModel().getElementAt(selIndex),selIndex,true,comboBox.hasFocus());
      return m_implClass.getRenderedText(disp,false);
    }
  }
);
  return o.toString();
}

Fixed version (ground truth):
/** 
 * @return the String from the Cell Renderer
 */
public String getText(){
  JComboBox comboBox=((JComboBox)m_implClass.getComponent());
  return m_implClass.getRenderedText(getComboBoxEditorComponent(comboBox),true);
}
Program: 96184
Project: 96184
Buggy source:
public Object run(){
  Component disp=comboBox.getRenderer().getListCellRendererComponent(jlist,jlist.getModel().getElementAt(selIndex),selIndex,true,comboBox.hasFocus());
  return m_implClass.getRenderedText(disp,false);
}

Fixed version (ground truth):
public Object run(){
  JComboBox comboBox=(JComboBox)m_implClass.getComponent();
  return comboBox.isEditable() ? Boolean.TRUE : Boolean.FALSE;
}
Program: 96185
Project: 96185
Buggy source:
/** 
 * @param component the combobox
 * @return the editor component
 * @throws StepExecutionException if the editor comonent could not be found
 */
private Component getComboBoxEditorComponent(JComboBox component) throws StepExecutionException {
  ComboBoxEditor cbe=component.getEditor();
  if (cbe == null) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.COMP_NOT_FOUND));
  }
  Component c=cbe.getEditorComponent();
  if (c == null) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.COMP_NOT_FOUND));
  }
  return c;
}

Fixed version (ground truth):
/** 
 * @param component the combobox
 * @return the editor used to render and edit the selected item in theJComboBox field.
 * @throws StepExecutionException if the editor comonent could not be found
 */
private Component getComboBoxEditorComponent(JComboBox component) throws StepExecutionException {
  ComboBoxEditor cbe=component.getEditor();
  if (cbe == null) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.COMP_NOT_FOUND));
  }
  Component c=cbe.getEditorComponent();
  if (c == null) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.COMP_NOT_FOUND));
  }
  return c;
}
Program: 96186
Project: 96186
Buggy source:
/** 
 * Action to read the value of a JComboBox to store it in a variable in the Client
 * @param variable the name of the variable
 * @return the text value.
 */
public String gdReadValue(String variable){
  final String selectedValue=getComboBoxHelper().getSelectedValue();
  return selectedValue != null ? selectedValue : StringConstants.EMPTY;
}

Fixed version (ground truth):
/** 
 * Action to read the value of a JComboBox to store it in a variable in the Client
 * @param variable the name of the variable
 * @return the text value.
 */
public String gdReadValue(String variable){
  return getComboBoxHelper().getText();
}
Program: 96187
Project: 96187
Buggy source:
/** 
 * Notifies that the check is finished.
 */
private void fireCompletenessCheckFinished(){
  DataEventDispatcher.getInstance().fireCompletenessCheckFinished();
}

Fixed version (ground truth):
/** 
 * Notifies that the check is finished.
 */
private static void fireCompletenessCheckFinished(){
  DataEventDispatcher.getInstance().fireCompletenessCheckFinished();
}
Program: 96188
Project: 96188
Buggy source:
@SuppressWarnings("String_Node_Str") public IStatus run(IProgressMonitor monitor){
  IStatus result=Status.OK_STATUS;
  monitor.beginTask(jobName,IProgressMonitor.UNKNOWN);
  try {
    CompletenessGuard.checkAll(wl,root);
    fireCompletenessCheckFinished();
    monitor.done();
  }
 catch (  ConcurrentModificationException e) {
    result=Status.CANCEL_STATUS;
    monitor.setCanceled(true);
    runCheck(true,root,wl);
  }
  monitor.done();
  return result;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void run(IProgressMonitor monitor){
  monitor.beginTask(Messages.CompletenessCheckRunningOperation,IProgressMonitor.UNKNOWN);
  ProgressMonitorTracker.getInstance().setProgressMonitor(monitor);
  try {
    final INodePO root=GeneralStorage.getInstance().getProject();
    final Locale wl=WorkingLanguageBP.getInstance().getWorkingLanguage();
    CompletenessGuard.checkAll(wl,root);
  }
  finally {
    ProgressMonitorTracker.getInstance().setProgressMonitor(null);
    fireCompletenessCheckFinished();
    monitor.done();
  }
}
Program: 96189
Project: 96189
Buggy source:
/** 
 * private constructor
 */
private CompletenessBP(){
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  ded.addDataChangedListener(this,false);
  ded.addLanguageChangedListener(this,false);
  ded.addProjectLoadedListener(this,false);
}

Fixed version (ground truth):
/** 
 * private constructor
 */
private CompletenessBP(){
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  ded.addLanguageChangedListener(this,false);
  ded.addProjectLoadedListener(this,false);
  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);
}
Program: 96190
Project: 96190
Buggy source:
/** 
 * {@inheritDoc}
 */
public void handleProjectLoaded(){
  checkProject(false);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void handleProjectLoaded(){
  completeProjectCheck();
}
Program: 96193
Project: 96193
Buggy source:
/** 
 * @param summaryID The current selected summaryID
 * @return The monitored values
 */
public static final Map<String,IMonitoringValue> loadMonitoringValues(Object summaryID){
  if (Persistor.instance() == null) {
    return Collections.emptyMap();
  }
  EntityManager session=Persistor.instance().openSession();
  ITestResultSummaryPO summary;
  try {
    Persistor.instance().getTransaction(session);
    summary=session.find(PoMaker.getTestResultSummaryClass(),summaryID);
  }
  finally {
    Persistor.instance().dropSession(session);
  }
  return summary.getMonitoringValues();
}

Fixed version (ground truth):
/** 
 * @param summaryID The current selected summaryID
 * @return The monitored values
 */
public static final Map<String,IMonitoringValue> loadMonitoringValues(Object summaryID){
  if (Persistor.instance() == null) {
    return Collections.emptyMap();
  }
  EntityManager session=Persistor.instance().openSession();
  ITestResultSummaryPO summary;
  try {
    Persistor.instance().getTransaction(session);
    summary=session.find(PoMaker.getTestResultSummaryClass(),summaryID);
    if (summary == null) {
      return Collections.emptyMap();
    }
  }
  finally {
    Persistor.instance().dropSession(session);
  }
  return summary.getMonitoringValues();
}
Program: 96194
Project: 96194
Buggy source:
/** 
 * {@inheritDoc} 
 */
public boolean operate(ITreeTraverserContext<INodePO> ctx,INodePO parent,INodePO node,boolean alreadyVisited){
  node.removeProblem(ERROR_IN_CHILD);
  node.removeProblem(WARNING_IN_CHILD);
  return true;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public boolean operate(ITreeTraverserContext<INodePO> ctx,INodePO parent,INodePO node,boolean alreadyVisited){
  node.removeProblem(ERROR_IN_CHILD);
  node.removeProblem(WARNING_IN_CHILD);
  if (!node.isActive()) {
    return false;
  }
  return true;
}
Program: 96196
Project: 96196
Buggy source:
/** 
 * executing batch of test suites
 */
private void doTestSuite(){
  while (m_job.getTestSuite() != null && !m_stopProcessing) {
    while (m_idle && !m_stopProcessing) {
      try {
        Thread.sleep(50);
      }
 catch (      InterruptedException e) {
      }
    }
    if (m_job.getTestSuite() != null && !m_stopProcessing && !m_idle && !m_isFirstAutStart) {
      m_idle=true;
      AbstractCmdlineClient.printConsoleLn(StringConstants.TAB + NLS.bind(Messages.ExecutionControllerTestSuiteBegin,m_job.getTestSuite().getName()),true);
      ClientTestFactory.getClientTest().startTestSuite(m_job.getTestSuite(),m_job.getLanguage(),m_startedAutId != null ? m_startedAutId : m_job.getAutId(),m_job.isAutoScreenshot());
    }
  }
}

Fixed version (ground truth):
/** 
 * execute a test suite
 */
private void doTestSuite(){
  while (m_job.getActualTestSuite() != null && !m_stopProcessing) {
    while (m_idle && !m_stopProcessing) {
      try {
        Thread.sleep(50);
      }
 catch (      InterruptedException e) {
      }
    }
    if (m_job.getActualTestSuite() != null && !m_stopProcessing && !m_idle && !m_isFirstAutStart) {
      m_idle=true;
      AbstractCmdlineClient.printConsoleLn(StringConstants.TAB + NLS.bind(Messages.ExecutionControllerTestSuiteBegin,m_job.getActualTestSuite().getName()),true);
      ClientTestFactory.getClientTest().startTestSuite(m_job.getActualTestSuite(),m_job.getLanguage(),m_startedAutId != null ? m_startedAutId : m_job.getAutId(),m_job.isAutoScreenshot());
    }
  }
}
Program: 96198
Project: 96198
Buggy source:
/** 
 * executes the complete test
 * @throws CommunicationException Error
 * @return boolean true if all testsuites completed successfully
 */
public boolean executeJob() throws CommunicationException {
  WatchdogTimer timer=null;
  if (m_job.getTimeout() > 0) {
    timer=new WatchdogTimer(m_job.getTimeout());
    timer.start();
  }
  IClientTest clientTest=ClientTestFactory.getClientTest();
  clientTest.connectToServer(m_job.getServer(),m_job.getPort());
  if (!ServerConnection.getInstance().isConnected()) {
    throw new CommunicationException(Messages.ConnectionToAUT_Agent,MessageIDs.E_COMMUNICATOR_CONNECTION);
  }
  clientTest.setRelevantFlag(m_job.isRelevant());
  prepareExecution();
  m_idle=true;
  if (m_shutdown) {
    AbstractCmdlineClient.printConsoleLn(Messages.ReceivedShutdownCommand,true);
    endTestExecution();
  }
  try {
    if (m_rmiBase != null) {
      doClcService();
    }
 else     if (m_job.getTestJob() != null) {
      ensureAutIsStarted(m_job.getTestSuite(),m_job.getAutConfig());
      doTestJob();
    }
 else {
      ensureAutIsStarted(m_job.getTestSuite(),m_job.getAutConfig());
      doTestSuite();
    }
  }
 catch (  ToolkitPluginException e1) {
    AbstractCmdlineClient.printlnConsoleError(Messages.ExecutionControllerAUT + Messages.ErrorMessageAUT_TOOLKIT_NOT_AVAILABLE);
  }
  if (timer != null) {
    timer.abort();
  }
  return isNoErrorWhileExecution();
}

Fixed version (ground truth):
/** 
 * executes the complete test
 * @throws CommunicationException Error
 * @return boolean true if all testsuites completed successfully
 */
public boolean executeJob() throws CommunicationException {
  WatchdogTimer timer=null;
  if (m_job.getTimeout() > 0) {
    timer=new WatchdogTimer(m_job.getTimeout());
    timer.start();
  }
  IClientTest clientTest=ClientTestFactory.getClientTest();
  clientTest.connectToServer(m_job.getServer(),m_job.getPort());
  if (!ServerConnection.getInstance().isConnected()) {
    throw new CommunicationException(Messages.ConnectionToAUT_Agent,MessageIDs.E_COMMUNICATOR_CONNECTION);
  }
  clientTest.setRelevantFlag(m_job.isRelevant());
  prepareExecution();
  m_idle=true;
  if (m_shutdown) {
    AbstractCmdlineClient.printConsoleLn(Messages.ReceivedShutdownCommand,true);
    endTestExecution();
  }
  try {
    if (m_rmiBase != null) {
      doClcService();
    }
 else     if (m_job.getTestJob() != null) {
      ensureAutIsStarted(m_job.getActualTestSuite(),m_job.getAutConfig());
      doTestJob();
    }
 else {
      ensureAutIsStarted(m_job.getActualTestSuite(),m_job.getAutConfig());
      doTestSuite();
    }
  }
 catch (  ToolkitPluginException e1) {
    AbstractCmdlineClient.printlnConsoleError(Messages.ExecutionControllerAUT + Messages.ErrorMessageAUT_TOOLKIT_NOT_AVAILABLE);
  }
  if (timer != null) {
    timer.abort();
  }
  return isNoErrorWhileExecution();
}
Program: 96199
Project: 96199
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_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:
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);
  }
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: 96200
Project: 96200
Buggy source:
/** 
 * @param testSuiteName the test suite to execute
 */
private void setTestSuiteName(String testSuiteName){
  m_testSuiteName=testSuiteName;
}

Fixed version (ground truth):
/** 
 * @param testSuiteName   The name of the Test Suite to execute. 
 */
private void setTestSuiteName(String testSuiteName){
  List<String> tsNames=new ArrayList<String>(1);
  tsNames.add(testSuiteName);
  setTestSuiteNames(tsNames);
}
Program: 96204
Project: 96204
Buggy source:
/** 
 * @return the test suite name to execute
 */
public String getTestSuiteName(){
  return m_testSuiteName;
}

Fixed version (ground truth):
/** 
 * @return the name of the Test suite to execute, or <code>null</code> if noTest suite should be executed.
 */
private String getTestSuiteName(){
  return getTestSuiteNames().get(m_actualTestSuite);
}
Program: 96205
Project: 96205
Buggy source:
/** 
 * Fills the server combo box.
 */
private void fillServerCombo(){
  boolean checkListeners=m_selectionListener != null;
  if (checkListeners) {
    deinstallListeners();
  }
  m_serverCombo.removeAll();
  String currentlySelectedServer=getConfigValue(AutConfigConstants.SERVER);
  if (currentlySelectedServer != null && currentlySelectedServer.trim().length() != 0 && !m_listOfServers.getServerNames().contains(currentlySelectedServer)) {
    String defaultServerInfo=Plugin.getDefault().getPreferenceStore().getDefaultString(Constants.SERVER_SETTINGS_KEY);
    String defaultServerPort=defaultServerInfo.substring(defaultServerInfo.indexOf(StringConstants.COLON) + 1);
    m_listOfServers.addServer(new ServerManager.Server(currentlySelectedServer,Integer.valueOf(defaultServerPort)));
    ErrorHandlingUtil.createMessageDialog(MessageIDs.I_SERVER_NAME_ADDED,null,new String[]{Messages.ServerName + StringConstants.COLON + StringConstants.SPACE+ currentlySelectedServer+ StringConstants.NEWLINE+ Messages.ServerPortDefault+ defaultServerPort});
  }
  for (  String serverName : m_listOfServers.getServerNames()) {
    m_serverCombo.add(serverName);
  }
  if (checkListeners) {
    installListeners();
  }
}

Fixed version (ground truth):
/** 
 * Fills the server combo box.
 */
private void fillServerCombo(){
  boolean checkListeners=m_selectionListener != null;
  if (checkListeners) {
    deinstallListeners();
  }
  m_serverCombo.removeAll();
  String currentlySelectedServer=getConfigValue(AutConfigConstants.SERVER);
  if (currentlySelectedServer != null && currentlySelectedServer.trim().length() != 0 && !m_listOfServers.getServerNames().contains(currentlySelectedServer)) {
    int defaultServerPort=ConfigurationConstants.AUT_AGENT_DEFAULT_PORT;
    m_listOfServers.addServer(new ServerManager.Server(currentlySelectedServer,defaultServerPort));
    ErrorHandlingUtil.createMessageDialog(MessageIDs.I_SERVER_NAME_ADDED,null,new String[]{Messages.ServerName + StringConstants.COLON + StringConstants.SPACE+ currentlySelectedServer+ StringConstants.NEWLINE+ Messages.ServerPortDefault+ defaultServerPort});
  }
  for (  String serverName : m_listOfServers.getServerNames()) {
    m_serverCombo.add(serverName);
  }
  if (checkListeners) {
    installListeners();
  }
}
Program: 96206
Project: 96206
Buggy source:
/** 
 * @param node The node for which to check the editabilty.
 * @return the results of <code>guiNode.isEditable()</code>.
 */
private boolean testIsEditable(IPersistentObject node){
  return NodeBP.isEditable(node);
}

Fixed version (ground truth):
/** 
 * @param node The node for which to check the editabilty.
 * @return the results of <code>guiNode.isEditable()</code>.
 */
private boolean testIsEditable(IPersistentObject node){
  if (node instanceof IObjectMappingCategoryPO) {
    return true;
  }
  return NodeBP.isEditable(node);
}
Program: 96207
Project: 96207
Buggy source:
/** 
 * {@inheritDoc}
 */
public void keyPress(Object graphicsComponent,int keycode) throws RobotException {
  keyPressReleaseImpl(graphicsComponent,keycode,true);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void keyPress(Object graphicsComponent,int keycode) throws RobotException {
  if (!post(new KeyCodeTyper(keycode).createKeyDownEvent())) {
    final String msg="String_Node_Str" + keycode + "String_Node_Str";
    log.warn(msg);
    throw new RobotException(msg,EventFactory.createActionError(TestErrorEvent.INVALID_INPUT));
  }
}
Program: 96208
Project: 96208
Buggy source:
/** 
 * @param parent to set
 */
public abstract void setParentNode(INodePO parent);

Fixed version (ground truth):
/** 
 * @param parent the model parent to set
 */
public abstract void setParentNode(INodePO parent);
Program: 96209
Project: 96209
Buggy source:
/** 
 * @return the current value of the m_parentNode property
 */
public INodePO getParentNode();

Fixed version (ground truth):
/** 
 * @return the model parent node of this node
 */
public INodePO getParentNode();
Program: 96210
Project: 96210
Buggy source:
/** 
 * @param specTc the spec to open the editor for
 */
protected void openEditorForSpecTC(ISpecTestCasePO specTc){
  boolean isNodeEditable=TestCaseBP.belongsToCurrentProject(specTc);
  if (isNodeEditable) {
    openEditor(specTc);
  }
 else {
    Utils.createMessageDialog(MessageIDs.I_NON_EDITABLE_NODE);
  }
}

Fixed version (ground truth):
/** 
 * @param specTc the spec to open the editor for
 */
protected void openEditorForSpecTC(ISpecTestCasePO specTc){
  boolean isNodeEditable=TestCaseBP.belongsToCurrentProject(specTc);
  if (isNodeEditable) {
    openEditor(specTc);
    InteractionEventDispatcher.getDefault().fireProgammableSelectionEvent(new StructuredSelection(specTc));
  }
 else {
    Utils.createMessageDialog(MessageIDs.I_NON_EDITABLE_NODE);
  }
}
Program: 96211
Project: 96211
Buggy source:
/** 
 * Search for the SpecTC of an ExecTC and opens the corresponding editor if possible.
 * @param structuredSel the current selection
 */
private void openSpecNode(IStructuredSelection structuredSel){
  ISpecTestCasePO specTc=UINodeBP.getSpecTC(structuredSel);
  openEditorForSpecTC(specTc);
  InteractionEventDispatcher.getDefault().fireProgammableSelectionEvent(new StructuredSelection(specTc));
}

Fixed version (ground truth):
/** 
 * Search for the SpecTC of an ExecTC and opens the corresponding editor if possible.
 * @param structuredSel the current selection
 */
private void openSpecNode(IStructuredSelection structuredSel){
  ISpecTestCasePO specTc=UINodeBP.getSpecTC(structuredSel);
  openEditorForSpecTC(specTc);
}
Program: 96212
Project: 96212
Buggy source:
/** 
 * @return Returns the completeOmMap.
 */
@Transient private Map getCompleteOmMap(){
  if (m_completeOmMap == null) {
    m_completeOmMap=new HashMap();
  }
  return m_completeOmMap;
}

Fixed version (ground truth):
/** 
 * @return Returns the completeOmMap.
 */
@Transient private Map<IAUTMainPO,Boolean> getCompleteOmMap(){
  if (m_completeOmMap == null) {
    m_completeOmMap=new HashMap<IAUTMainPO,Boolean>();
  }
  return m_completeOmMap;
}
Program: 96213
Project: 96213
Buggy source:
/** 
 * @param aut aut, for which the completeOMFlag is valid
 * @return Returns the completeOMFlag for given AUT
 */
public boolean getCompleteOMFlag(IAUTMainPO aut){
  if (aut != null) {
    Boolean value=(Boolean)getCompleteOmMap().get(aut);
    return value != null ? value.booleanValue() : false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @param aut aut, for which the completeOMFlag is valid
 * @return Returns the completeOMFlag for given AUT
 */
public boolean getCompleteOMFlag(IAUTMainPO aut){
  if (aut != null) {
    Boolean value=getCompleteOmMap().get(aut);
    return value != null ? value.booleanValue() : false;
  }
  return true;
}
Program: 96215
Project: 96215
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;
switch (dataState) {
case Added:
      if (isVisibleInEditor || (editorNode instanceof ISpecTestCasePO && ((ISpecTestCasePO)editorNode).getAllEventEventExecTC().contains(po))) {
        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();
}
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:
renameGUINode(po);
break;
case StructureModified:
if (isVisibleInEditor) {
getEditorHelper().setDirty(true);
}
if (!handleStructureModified(po)) {
return;
}
break;
case ReuseChanged:
break;
default :
Assert.notReached();
}
getEditorHelper().handleDataChanged(po,dataState);
}
}
Program: 96216
Project: 96216
Buggy source:
/** 
 * Shows information dialog that savin on observation mode is not allowed
 * @return returnCode of Dialog
 */
private int showSaveInObservModeDialog(){
  MessageDialog dialog=new MessageDialog(Plugin.getShell(),Messages.SaveInObservationModeDialogTitle,null,Messages.SaveInObservationModeDialogQuestion,MessageDialog.QUESTION,new String[]{Messages.NewProjectDialogMessageButton0,Messages.NewProjectDialogMessageButton0},0);
  dialog.create();
  DialogUtils.setWidgetNameForModalDialog(dialog);
  dialog.open();
  return dialog.getReturnCode();
}

Fixed version (ground truth):
/** 
 * Shows information dialog that savin on observation mode is not allowed
 * @return returnCode of Dialog
 */
private int showSaveInObservModeDialog(){
  MessageDialog dialog=new MessageDialog(Plugin.getShell(),Messages.SaveInObservationModeDialogTitle,null,Messages.SaveInObservationModeDialogQuestion,MessageDialog.QUESTION,new String[]{Messages.DialogMessageButton_YES,Messages.DialogMessageButton_NO},0);
  dialog.create();
  DialogUtils.setWidgetNameForModalDialog(dialog);
  dialog.open();
  return dialog.getReturnCode();
}
Program: 96217
Project: 96217
Buggy source:
/** 
 * @return a confirm Dialog, if monitoring job is still running.
 */
private MessageDialog getConfirmDialog(){
  MessageDialog dialog=new MessageDialog(Plugin.getShell(),Messages.ClientDisconnectFromAutAgentTitle,null,Messages.ClientDisconnectFromAutAgentMessage,MessageDialog.QUESTION,new String[]{Messages.NewProjectDialogMessageButton0,Messages.NewProjectDialogMessageButton1},0);
  dialog.create();
  DialogUtils.setWidgetNameForModalDialog(dialog);
  dialog.open();
  return dialog;
}

Fixed version (ground truth):
/** 
 * @return a confirm Dialog, if monitoring job is still running.
 */
private MessageDialog getConfirmDialog(){
  MessageDialog dialog=new MessageDialog(Plugin.getShell(),Messages.ClientDisconnectFromAutAgentTitle,null,Messages.ClientDisconnectFromAutAgentMessage,MessageDialog.QUESTION,new String[]{Messages.DialogMessageButton_YES,Messages.DialogMessageButton_NO},0);
  dialog.create();
  DialogUtils.setWidgetNameForModalDialog(dialog);
  dialog.open();
  return dialog;
}
Program: 96218
Project: 96218
Buggy source:
/** 
 * Shows information dialog, that selected testresults will be deleted
 * @return returnCode of Dialog
 */
private int showDeleteTestresultsDialog(){
  MessageDialog dialog=new MessageDialog(Plugin.getShell(),Messages.TestresultSummaryDeleteTestrunDialogTitle,null,Messages.TestresultSummaryDeleteTestrunDialogMessage,MessageDialog.QUESTION,new String[]{Messages.NewProjectDialogMessageButton0,Messages.NewProjectDialogMessageButton1},0);
  dialog.create();
  DialogUtils.setWidgetNameForModalDialog(dialog);
  dialog.open();
  return dialog.getReturnCode();
}

Fixed version (ground truth):
/** 
 * Shows information dialog, that selected testresults will be deleted
 * @return returnCode of Dialog
 */
private int showDeleteTestresultsDialog(){
  MessageDialog dialog=new MessageDialog(Plugin.getShell(),Messages.TestresultSummaryDeleteTestrunDialogTitle,null,Messages.TestresultSummaryDeleteTestrunDialogMessage,MessageDialog.QUESTION,new String[]{Messages.DialogMessageButton_YES,Messages.DialogMessageButton_NO},0);
  dialog.create();
  DialogUtils.setWidgetNameForModalDialog(dialog);
  dialog.open();
  return dialog.getReturnCode();
}
Program: 96219
Project: 96219
Buggy source:
/** 
 * Shows confirm dialog for this action and returns the dialog object
 * @return confirm dialog for this action
 */
private MessageDialog showConfirmDialog(){
  MessageDialog dialog=new MessageDialog(Plugin.getShell(),Messages.RevertEditorChangesActionShellTitle,null,Messages.RevertEditorChangesActionQuestionText,MessageDialog.QUESTION,new String[]{Messages.NewProjectDialogMessageButton0,Messages.NewProjectDialogMessageButton1},0);
  dialog.create();
  DialogUtils.setWidgetNameForModalDialog(dialog);
  dialog.open();
  return dialog;
}

Fixed version (ground truth):
/** 
 * Shows confirm dialog for this action and returns the dialog object
 * @return confirm dialog for this action
 */
private MessageDialog showConfirmDialog(){
  MessageDialog dialog=new MessageDialog(Plugin.getShell(),Messages.RevertEditorChangesActionShellTitle,null,Messages.RevertEditorChangesActionQuestionText,MessageDialog.QUESTION,new String[]{Messages.DialogMessageButton_YES,Messages.DialogMessageButton_NO},0);
  dialog.create();
  DialogUtils.setWidgetNameForModalDialog(dialog);
  dialog.open();
  return dialog;
}
Program: 96220
Project: 96220
Buggy source:
/** 
 * @return a confirm Dialog
 */
private MessageDialog getConfirmDialog(){
  String questionText;
  if (isJobRunning()) {
    questionText=Messages.StopAUTActionQuestionTextIfcollecting;
  }
 else {
    questionText=Messages.StopAUTActionQuestionText;
  }
  MessageDialog dialog=new MessageDialog(Plugin.getShell(),Messages.StopAUTActionShellTitle,null,questionText,MessageDialog.QUESTION,new String[]{Messages.NewProjectDialogMessageButton0,Messages.NewProjectDialogMessageButton1},0);
  dialog.create();
  DialogUtils.setWidgetNameForModalDialog(dialog);
  dialog.open();
  return dialog;
}

Fixed version (ground truth):
/** 
 * @return a confirm Dialog
 */
private MessageDialog getConfirmDialog(){
  String questionText;
  if (isJobRunning()) {
    questionText=Messages.StopAUTActionQuestionTextIfcollecting;
  }
 else {
    questionText=Messages.StopAUTActionQuestionText;
  }
  MessageDialog dialog=new MessageDialog(Plugin.getShell(),Messages.StopAUTActionShellTitle,null,questionText,MessageDialog.QUESTION,new String[]{Messages.DialogMessageButton_YES,Messages.DialogMessageButton_NO},0);
  dialog.create();
  DialogUtils.setWidgetNameForModalDialog(dialog);
  dialog.open();
  return dialog;
}
Program: 96221
Project: 96221
Buggy source:
/** 
 * Pops up a "confirmDelete" dialog.
 * @param itemNames The names of the items to be deleted.
 * @return <code>true</code>, if "yes" was clicked, <code>false</code> otherwise.
 */
public static boolean confirmDelete(Collection<String> itemNames){
  String label=StringConstants.EMPTY;
  if (itemNames.size() == 1) {
    label=NLS.bind(Messages.DeleteTreeItemActionDeleteOneItem,itemNames.iterator().next());
  }
 else   if (itemNames.size() == 0) {
    return false;
  }
 else {
    label=NLS.bind(Messages.DeleteTreeItemActionDeleteMultipleItems,itemNames.size());
  }
  MessageDialog dialog=new MessageDialog(Plugin.getShell(),Messages.DeleteTreeItemActionShellTitle,null,label,MessageDialog.QUESTION,new String[]{Messages.NewProjectDialogMessageButton0,Messages.NewProjectDialogMessageButton1},0);
  dialog.create();
  DialogUtils.setWidgetNameForModalDialog(dialog);
  dialog.open();
  if (dialog.getReturnCode() != 0) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Pops up a "confirmDelete" dialog.
 * @param itemNames The names of the items to be deleted.
 * @return <code>true</code>, if "yes" was clicked, <code>false</code> otherwise.
 */
public static boolean confirmDelete(Collection<String> itemNames){
  String label=StringConstants.EMPTY;
  if (itemNames.size() == 1) {
    label=NLS.bind(Messages.DeleteTreeItemActionDeleteOneItem,itemNames.iterator().next());
  }
 else   if (itemNames.size() == 0) {
    return false;
  }
 else {
    label=NLS.bind(Messages.DeleteTreeItemActionDeleteMultipleItems,itemNames.size());
  }
  MessageDialog dialog=new MessageDialog(Plugin.getShell(),Messages.DeleteTreeItemActionShellTitle,null,label,MessageDialog.QUESTION,new String[]{Messages.DialogMessageButton_YES,Messages.DialogMessageButton_NO},0);
  dialog.create();
  DialogUtils.setWidgetNameForModalDialog(dialog);
  dialog.open();
  if (dialog.getReturnCode() != 0) {
    return false;
  }
  return true;
}
Program: 96222
Project: 96222
Buggy source:
/** 
 * {@inheritDoc}
 */
public boolean canModify(Object element,String property){
  if (element instanceof ICompNamesPairPO) {
    final ICompNamesPairPO compNamesPair=(ICompNamesPairPO)element;
    return COLUMN_NEW_NAME.equals(property) && isModifiable() && compNamesPair.getType().length() != 0;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public boolean canModify(Object element,String property){
  boolean editable=false;
  if (getSelectedExecNodeOwner() instanceof AbstractTestCaseEditor && ((AbstractTestCaseEditor)getSelectedExecNodeOwner()).getEditorHelper().requestEditableState() == EditableState.OK) {
    editable=true;
  }
  if (editable && element instanceof ICompNamesPairPO) {
    final ICompNamesPairPO compNamesPair=(ICompNamesPairPO)element;
    return COLUMN_NEW_NAME.equals(property) && isModifiable() && compNamesPair.getType().length() != 0;
  }
  return false;
}
Program: 96225
Project: 96225
Buggy source:
/** 
 * @param changedObj notify listener about data modification of this object
 * @param dataState kind of object modification
 * @param updateState notification only relevant for editors
 */
public void fireDataChangedListener(final IPersistentObject changedObj,final DataState dataState,final UpdateState updateState){
  final Set<IDataChangedListener> stableListeners=new HashSet<IDataChangedListener>(m_dataChangedListeners);
  for (  final IDataChangedListener l : stableListeners) {
    try {
      l.handleDataChanged(changedObj,dataState,updateState);
    }
 catch (    Throwable t) {
      if (t instanceof EntityNotFoundException) {
        String msg=Messages.DataEventDispatcherReopenProject;
        ErrorMessagePresenter.getPresenter().showErrorMessage(MessageIDs.E_PERSISTENCE_LOAD_FAILED,null,new String[]{msg});
      }
      LOG.error(Messages.UnhandledExceptionWhileCallListeners,t);
    }
  }
  final Set<IDataChangedListener> stableListenersPost=new HashSet<IDataChangedListener>(m_dataChangedListenersPost);
  for (  IDataChangedListener l : stableListenersPost) {
    try {
      l.handleDataChanged(changedObj,dataState,updateState);
    }
 catch (    Throwable t) {
      LOG.error(Messages.UnhandledExceptionWhileCallListeners,t);
    }
  }
}

Fixed version (ground truth):
/** 
 * @param events data changed events
 */
public void fireDataChangedListener(final DataChangedEvent... events){
  final Set<IDataChangedListener> stableListeners=new HashSet<IDataChangedListener>(m_dataChangedListeners);
  for (  final IDataChangedListener l : stableListeners) {
    try {
      l.handleDataChanged(events);
    }
 catch (    Throwable t) {
      if (t instanceof EntityNotFoundException) {
        String msg=Messages.DataEventDispatcherReopenProject;
        ErrorMessagePresenter.getPresenter().showErrorMessage(MessageIDs.E_PERSISTENCE_LOAD_FAILED,null,new String[]{msg});
      }
      LOG.error(Messages.UnhandledExceptionWhileCallListeners,t);
    }
  }
  final Set<IDataChangedListener> stableListenersPost=new HashSet<IDataChangedListener>(m_dataChangedListenersPost);
  for (  IDataChangedListener l : stableListenersPost) {
    try {
      l.handleDataChanged(events);
    }
 catch (    Throwable t) {
      LOG.error(Messages.UnhandledExceptionWhileCallListeners,t);
    }
  }
}
Program: 96226
Project: 96226
Buggy source:
/** 
 * @param po changed persistent object
 * @param dataState kind of modification
 * @param updateState determines the parts to update
 */
public void handleDataChanged(IPersistentObject po,DataState dataState,UpdateState updateState);

Fixed version (ground truth):
/** 
 * @param events an array of data changed events
 */
public void handleDataChanged(DataChangedEvent... events);
Program: 96227
Project: 96227
Buggy source:
/** 
 * {@inheritDoc}
 */
public void dataModified(IPersistentObject po){
  fireDataChangedListener(po,DataState.StructureModified,UpdateState.all);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void dataModified(IPersistentObject po){
  fireDataChangedListener(new DataChangedEvent(po,DataState.StructureModified,UpdateState.all));
}
Program: 96228
Project: 96228
Buggy source:
/** 
 * {@inheritDoc}
 */
public void handleDataChanged(IPersistentObject po,DataState dataState,UpdateState updateState){
  if (dataState == DataState.Added) {
    fireProgammableSelectionEvent(new StructuredSelection(po));
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void handleDataChanged(IPersistentObject po,DataState dataState,UpdateState updateState){
  if (dataState == DataState.Added) {
    fireProgammableSelectionEvent(new StructuredSelection(po));
  }
}
Program: 96230
Project: 96230
Buggy source:
/** 
 * collect new logical component names / refresh object mapping editor
 */
public void collectNewLogicalComponentNames(){
  getEditor().cleanupNames();
  DataEventDispatcher.getInstance().fireDataChangedListener(getEditor().getAut().getObjMap().getUnmappedLogicalCategory(),DataState.StructureModified,UpdateState.onlyInEditor);
}

Fixed version (ground truth):
/** 
 * collect new logical component names / refresh object mapping editor
 */
public void collectNewLogicalComponentNames(){
  getEditor().cleanupNames();
  DataEventDispatcher.getInstance().fireDataChangedListener(getEditor().getAut().getObjMap(),DataState.StructureModified,UpdateState.onlyInEditor);
}
Program: 96231
Project: 96231
Buggy source:
/** 
 * {@inheritDoc}
 */
public void setMessage(Message message){
  m_message=(GetKeyboardLayoutNameMessage)m_message;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void setMessage(Message message){
  m_message=(GetKeyboardLayoutNameMessage)message;
}
Program: 96232
Project: 96232
Buggy source:
/** 
 * @return a flag indicating whether the selection is valid (e.g. nocategory or a node which would cause recursive loops)
 */
public boolean hasValidSelection(){
  IStructuredSelection selection=(IStructuredSelection)getTreeViewer().getSelection();
  for (  Object selectedObj : selection.toArray()) {
    if (m_circDependList.contains(selectedObj) || selectedObj instanceof ICategoryPO) {
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * @return a flag indicating whether the selection is valid (e.g. nocategory or a node which would cause recursive loops)
 */
public boolean hasValidSelection(){
  IStructuredSelection selection=(IStructuredSelection)getTreeViewer().getSelection();
  for (  Object selectedObj : selection.toArray()) {
    if (m_circDependList.contains(selectedObj) || selectedObj instanceof ICategoryPO || selectedObj instanceof IReusedProjectPO) {
      return false;
    }
  }
  return true;
}
Program: 96233
Project: 96233
Buggy source:
/** 
 * Select a menu item
 * @param robot The robot to use for the click operations.
 * @param popup popup menu
 * @param path path to the menu item
 * @param operator operator used for matching
 */
public static void selectMenuItem(final IRobot robot,Menu popup,String[] path,String operator){
  if (path.length == 0) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError());
  }
  MenuItem item=MenuUtil.navigateToMenuItem(robot,popup,path,operator);
  if (item == null) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.NOT_FOUND));
  }
  if (SWT.MOD1 == SWT.COMMAND) {
    MenuUtil.selectProgramatically(item);
  }
 else {
    MenuUtil.clickMenuItem(robot,item,1);
  }
}

Fixed version (ground truth):
/** 
 * Select a menu item
 * @param robot The robot to use for the click operations.
 * @param popup popup menu
 * @param path path to the menu item
 * @param operator operator used for matching
 */
public static void selectMenuItem(final IRobot robot,Menu popup,String[] path,String operator){
  if (path.length == 0) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError());
  }
  MenuItem item=MenuUtil.navigateToMenuItem(robot,popup,path,operator);
  selectItem(item,robot);
}
Program: 96234
Project: 96234
Buggy source:
/** 
 * Refreshes the aut.
 */
public void cleanUp(){
  final Display d=((SwtAUTServer)AUTServer.getInstance()).getAutDisplay();
  if (d != null) {
    d.syncExec(new Runnable(){
      public void run(){
        if (m_borderShell != null) {
          m_borderShell.close();
          m_borderShell.dispose();
          m_borderShell=null;
        }
      }
    }
);
  }
}

Fixed version (ground truth):
/** 
 * Refreshes the aut.
 */
public void cleanUp(){
  final Display d=((SwtAUTServer)AUTServer.getInstance()).getAutDisplay();
  if (d != null) {
    d.syncExec(new Runnable(){
      public void run(){
        if (m_borderShell != null) {
          m_borderShell.getRegion().dispose();
          m_borderShell.close();
          m_borderShell.dispose();
          m_borderShell=null;
        }
      }
    }
);
  }
}
Program: 96235
Project: 96235
Buggy source:
/** 
 * closes the m_borderShell.
 */
private void closeBorderShell(){
  if (m_borderShell != null) {
    m_borderShell.close();
    m_borderShell.dispose();
    m_borderShell=null;
    setCurrentComponent(null);
    m_oldWidget=null;
  }
}

Fixed version (ground truth):
/** 
 * closes the m_borderShell.
 */
private void closeBorderShell(){
  if (m_borderShell != null) {
    m_borderShell.getRegion().dispose();
    m_borderShell.close();
    m_borderShell.dispose();
    m_borderShell=null;
    setCurrentComponent(null);
    m_oldWidget=null;
  }
}
Program: 96236
Project: 96236
Buggy source:
/** 
 * {@inheritDoc}
 */
public void resetToTesting(){
  log.info("String_Node_Str");
  try {
    ChangeAUTModeMessage message=new ChangeAUTModeMessage();
    message.setMode(ChangeAUTModeMessage.TESTING);
    CAPRecordedCommand.setRecordListener(null);
    AUTConnection.getInstance().send(message);
  }
 catch (  UnknownMessageException ume) {
    fireAUTServerStateChanged(new AUTServerEvent(ume.getErrorId()));
  }
catch (  NotConnectedException nce) {
    log.error(nce);
  }
catch (  CommunicationException ce) {
    log.error(ce);
  }
  try {
    AUTConnection.getInstance().close();
  }
 catch (  ConnectionException e) {
    log.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void resetToTesting(){
  log.info("String_Node_Str");
  CAPRecordedCommand.setRecordListener(null);
  try {
    if (AUTConnection.getInstance().isConnected()) {
      try {
        ChangeAUTModeMessage message=new ChangeAUTModeMessage();
        message.setMode(ChangeAUTModeMessage.TESTING);
        AUTConnection.getInstance().send(message);
      }
 catch (      UnknownMessageException ume) {
        fireAUTServerStateChanged(new AUTServerEvent(ume.getErrorId()));
      }
catch (      NotConnectedException nce) {
        log.error(nce);
      }
catch (      CommunicationException ce) {
        log.error(ce);
      }
      AUTConnection.getInstance().close();
    }
  }
 catch (  ConnectionException e) {
    log.error("String_Node_Str",e);
  }
}
Program: 96237
Project: 96237
Buggy source:
/** 
 * @param element the element to get the text for 
 * @return a descriptive text for the given element
 */
public static String getGDText(Object element){
  if (element instanceof INodePO) {
    INodePO node=(INodePO)element;
    if (node.getName() == null) {
      return UNNAMED_NODE;
    }
    if (node instanceof ICapPO) {
      return getText((ICapPO)node);
    }
    if (node instanceof IExecTestCasePO) {
      return getText((IExecTestCasePO)node);
    }
    if (node instanceof ISpecTestCasePO) {
      return getText((ISpecTestCasePO)node);
    }
    return node.getName();
  }
  if (element instanceof ITestSuiteContPO) {
    return Messages.TSBCategoryTS;
  }
  if (element instanceof ITestJobContPO) {
    return Messages.TSBCategoryTJ;
  }
  if (element instanceof IReusedProjectPO) {
    IReusedProjectPO reusedProject=(IReusedProjectPO)element;
    return reusedProject.getProjectName() + reusedProject.getVersionString();
  }
  return element == null ? StringConstants.EMPTY : element.toString();
}

Fixed version (ground truth):
/** 
 * @param element the element to get the text for 
 * @return a descriptive text for the given element
 */
public static String getGDText(Object element){
  if (element instanceof INodePO) {
    INodePO node=(INodePO)element;
    if (node.getName() == null) {
      return UNNAMED_NODE;
    }
    if (node instanceof ICapPO) {
      return getText((ICapPO)node);
    }
    if (node instanceof IExecTestCasePO) {
      return getText((IExecTestCasePO)node);
    }
    if (node instanceof ISpecTestCasePO) {
      return getText((ISpecTestCasePO)node);
    }
    return node.getName();
  }
  if (element instanceof ITestSuiteContPO) {
    return Messages.TSBCategoryTS;
  }
  if (element instanceof ITestJobContPO) {
    return Messages.TSBCategoryTJ;
  }
  if (element instanceof IReusedProjectPO) {
    IReusedProjectPO reusedProject=(IReusedProjectPO)element;
    String projectName=reusedProject.getProjectName();
    if (projectName == null) {
      projectName=reusedProject.getProjectGuid();
    }
    return projectName + reusedProject.getVersionString();
  }
  return element == null ? StringConstants.EMPTY : element.toString();
}
Program: 96239
Project: 96239
Buggy source:
/** 
 * {@inheritDoc} 
 */
public String getToolTipText(Object element){
  if (element instanceof INodePO) {
    return createToolTipText((INodePO)element);
  }
  if (element instanceof ITestSuitePO) {
    StringBuilder toolTip=new StringBuilder();
    ITestSuitePO testSuite=(ITestSuitePO)element;
    final WorkingLanguageBP workLangBP=WorkingLanguageBP.getInstance();
    Locale locale=workLangBP.getWorkingLanguage();
    IAUTMainPO aut=testSuite.getAut();
    if (testSuite.getAut() != null && !workLangBP.isTestSuiteLanguage(locale,testSuite)) {
      toolTip.append(Constants.BULLET).append(Messages.TestDataDecoratorUnsupportedAUTLanguage);
    }
 else {
      checkNode(testSuite,aut,locale,toolTip);
    }
    return toolTip.toString();
  }
  return super.getToolTipText(element);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public String getToolTipText(Object element){
  if (element instanceof INodePO) {
    return createToolTipText((INodePO)element);
  }
  return super.getToolTipText(element);
}
Program: 96240
Project: 96240
Buggy source:
/** 
 * Opens the server preference page
 */
protected void openServerPrefPage(){
  PreferenceDialog dialog=PreferencesUtil.createPreferenceDialogOn(null,Constants.JB_PREF_PAGE_AUTAGENT,null,null);
  DialogUtils.setWidgetNameForModalDialog(dialog);
  dialog.open();
  m_listOfServers=ServerManager.getInstance();
  String oldServer=m_serverCombo.getText();
  fillServerCombo();
  m_serverCombo.setText(oldServer);
}

Fixed version (ground truth):
/** 
 * Opens the server preference page
 */
protected void openServerPrefPage(){
  PreferenceDialog dialog=PreferencesUtil.createPreferenceDialogOn(getShell(),Constants.JB_PREF_PAGE_AUTAGENT,null,null);
  DialogUtils.setWidgetNameForModalDialog(dialog);
  dialog.open();
  m_listOfServers=ServerManager.getInstance();
  String oldServer=m_serverCombo.getText();
  fillServerCombo();
  m_serverCombo.setText(oldServer);
}