nus-yam/ex-repair huggingface dataset:
Program: 95570
Project: 95570
Buggy source:
/** 
 * {@inheritDoc} 
 */
public Object getAdapter(Class targetedClass,Object objectToAdapt){
  if (targetedClass.isAssignableFrom(IContainerAdapter.class)) {
    if (objectToAdapt instanceof ButtonBar) {
      return new ButtonBarContainerAdapter<ButtonBar>((ButtonBar)objectToAdapt);
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public Object getAdapter(Class targetedClass,Object objectToAdapt){
  if (targetedClass == IContainerAdapter.class) {
    if (objectToAdapt instanceof ButtonBar) {
      return new ButtonBarContainerAdapter<ButtonBar>((ButtonBar)objectToAdapt);
    }
  }
  return null;
}
Program: 95571
Project: 95571
Buggy source:
@Override public Object getAdapter(Class targetAdapterClass,Object objectToAdapt){
  IComponent returnvalue=null;
  if (targetAdapterClass.isAssignableFrom(IComponent.class)) {
    returnvalue=getComponentAdapter(objectToAdapt);
  }
  if (returnvalue == null && targetAdapterClass.isAssignableFrom(IContainerAdapter.class)) {
    returnvalue=getContainerAdapter(objectToAdapt);
  }
  if (returnvalue == null && targetAdapterClass.isAssignableFrom(IComponent.class) && objectToAdapt instanceof Node) {
    return new JavaFXComponentAdapter<Node>((Node)objectToAdapt);
  }
  return returnvalue;
}

Fixed version (ground truth):
@Override public Object getAdapter(Class targetAdapterClass,Object objectToAdapt){
  IComponent returnvalue=null;
  if (targetAdapterClass.isAssignableFrom(IComponent.class)) {
    returnvalue=getComponentAdapter(objectToAdapt);
  }
  if (returnvalue == null && targetAdapterClass == IContainerAdapter.class) {
    returnvalue=getContainerAdapter(objectToAdapt);
  }
  if (returnvalue == null && targetAdapterClass.isAssignableFrom(IComponent.class) && objectToAdapt instanceof Node) {
    return new JavaFXComponentAdapter<Node>((Node)objectToAdapt);
  }
  return returnvalue;
}
Program: 95572
Project: 95572
Buggy source:
/** 
 * @param nodes the nodes to delete
 * @param editor the editor to perfrom the deletion for
 */
public static void deleteNodesFromEditor(List<? extends INodePO> nodes,AbstractJBEditor editor){
  editor.getEditorHelper().getClipboard().clearContents();
  for (  INodePO node : nodes) {
    try {
      node.getParentNode().removeNode(node);
      if (node.getId() != null) {
        editor.getEditorHelper().getEditSupport().getSession().remove(node);
      }
      editor.getEditorHelper().setDirty(true);
      DataEventDispatcher.getInstance().fireDataChangedListener(node,DataState.Deleted,UpdateState.onlyInEditor);
    }
 catch (    PersistenceException e) {
      try {
        PersistenceManager.handleDBExceptionForEditor(node,e,editor.getEditorHelper().getEditSupport());
      }
 catch (      PMException pme) {
        PMExceptionHandler.handlePMExceptionForMasterSession(pme);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @param nodes the nodes to delete
 * @param editor the editor to perfrom the deletion for
 */
public static void deleteNodesFromEditor(List<? extends INodePO> nodes,AbstractJBEditor editor){
  editor.getEditorHelper().getClipboard().clearContents();
  for (  INodePO node : nodes) {
    try {
      node.getParentNode().removeNode(node);
      if (node instanceof IExecTestCasePO) {
        IExecTestCasePO po=(IExecTestCasePO)node;
        Collection<ICompNamesPairPO> col=po.getCompNamesPairs();
        for (        ICompNamesPairPO iCompNamesPairPO : col) {
          iCompNamesPairPO.getSecondName();
        }
      }
      if (node.getId() != null) {
        editor.getEditorHelper().getEditSupport().getSession().remove(node);
      }
      createReuseEvents(editor,node);
      editor.getEditorHelper().setDirty(true);
      DataEventDispatcher.getInstance().fireDataChangedListener(node,DataState.Deleted,UpdateState.onlyInEditor);
    }
 catch (    PersistenceException e) {
      try {
        PersistenceManager.handleDBExceptionForEditor(node,e,editor.getEditorHelper().getEditSupport());
      }
 catch (      PMException pme) {
        PMExceptionHandler.handlePMExceptionForMasterSession(pme);
      }
    }
  }
}
Program: 95574
Project: 95574
Buggy source:
/** 
 * {@inheritDoc} 
 */
public Object getAdapter(Class targetedClass,Object objectToAdapt){
  if (targetedClass == IContainerAdapter.class) {
    if (objectToAdapt instanceof ListCell) {
      return new CustomContainerAdapter((ListCell<?>)objectToAdapt);
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public Object getAdapter(Class targetedClass,Object objectToAdapt){
  if (targetedClass.isAssignableFrom(IContainerAdapter.class)) {
    if (objectToAdapt instanceof ListCell) {
      return new CustomContainerAdapter((ListCell<?>)objectToAdapt);
    }
  }
  return null;
}
Program: 95575
Project: 95575
Buggy source:
/** 
 * @param targetAdapterClass Type of the adapter
 * @param objectToAdapt object that should be adapted
 * @return Returns an adapter for the objectToAdapt of typetargetAdapterClass. The collection of all supported adapter factories is iterated. The first value that is not null will be returned. <code>Null</code> will only be returned if no adapter can be found for the targetAdapterClass, none of the given factories can handle the objectToAdapt or the objectToAdapt itself is <code>null</code>.
 */
public Object getAdapter(Class targetAdapterClass,Object objectToAdapt){
  if (objectToAdapt == null) {
    return null;
  }
  Collection<IAdapterFactory> registeredFactories=null;
  Class superClass=objectToAdapt.getClass();
  registeredFactories=findAdapterFactories(objectToAdapt,superClass);
  while (registeredFactories != null && superClass != Object.class) {
    for (Iterator<IAdapterFactory> iterator=registeredFactories.iterator(); iterator.hasNext(); ) {
      IAdapterFactory adapterFactory=iterator.next();
      Object object=adapterFactory.getAdapter(targetAdapterClass,objectToAdapt);
      if (object != null) {
        return object;
      }
    }
    superClass=superClass.getSuperclass();
    registeredFactories=findAdapterFactories(objectToAdapt,superClass);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param targetAdapterClass Type of the adapter
 * @param objectToAdapt object that should be adapted
 * @return Returns an adapter for the objectToAdapt of typetargetAdapterClass. The collection of all supported adapter factories is iterated. The first value that is not null will be returned. <code>Null</code> will only be returned if no adapter can be found for the targetAdapterClass, none of the given factories can handle the objectToAdapt or the objectToAdapt itself is <code>null</code>.
 */
public Object getAdapter(Class targetAdapterClass,Object objectToAdapt){
  if (objectToAdapt == null) {
    return null;
  }
  Collection<IAdapterFactory> registeredFactories=null;
  Class superClass=objectToAdapt.getClass();
  while (registeredFactories == null && superClass != Object.class) {
    registeredFactories=m_registrationMap.get(superClass);
    superClass=superClass.getSuperclass();
  }
  if (registeredFactories == null) {
    return null;
  }
  for (Iterator<IAdapterFactory> iterator=registeredFactories.iterator(); iterator.hasNext(); ) {
    IAdapterFactory adapterFactory=iterator.next();
    Object object=adapterFactory.getAdapter(targetAdapterClass,objectToAdapt);
    if (object != null) {
      return object;
    }
  }
  return null;
}
Program: 95576
Project: 95576
Buggy source:
/** 
 * {@inheritDoc} 
 */
public Object getAdapter(Class targetedClass,Object objectToAdapt){
  if (targetedClass == IContainerAdapter.class) {
    if (objectToAdapt instanceof ButtonBar) {
      return new ButtonBarContainerAdapter<ButtonBar>((ButtonBar)objectToAdapt);
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public Object getAdapter(Class targetedClass,Object objectToAdapt){
  if (targetedClass.isAssignableFrom(IContainerAdapter.class)) {
    if (objectToAdapt instanceof ButtonBar) {
      return new ButtonBarContainerAdapter<ButtonBar>((ButtonBar)objectToAdapt);
    }
  }
  return null;
}
Program: 95577
Project: 95577
Buggy source:
@Override public Object getAdapter(Class targetAdapterClass,Object objectToAdapt){
  IComponent returnvalue=null;
  if (targetAdapterClass.isAssignableFrom(IComponent.class)) {
    returnvalue=getComponentAdapter(objectToAdapt);
  }
  if (returnvalue == null && targetAdapterClass == IContainerAdapter.class) {
    returnvalue=getContainerAdapter(objectToAdapt);
  }
  if (returnvalue == null && targetAdapterClass.isAssignableFrom(IComponent.class) && objectToAdapt instanceof Node) {
    return new JavaFXComponentAdapter<Node>((Node)objectToAdapt);
  }
  return returnvalue;
}

Fixed version (ground truth):
@Override public Object getAdapter(Class targetAdapterClass,Object objectToAdapt){
  IComponent returnvalue=null;
  if (targetAdapterClass.isAssignableFrom(IComponent.class)) {
    returnvalue=getComponentAdapter(objectToAdapt);
  }
  if (returnvalue == null && targetAdapterClass.isAssignableFrom(IContainerAdapter.class)) {
    returnvalue=getContainerAdapter(objectToAdapt);
  }
  if (returnvalue == null && targetAdapterClass.isAssignableFrom(IComponent.class) && objectToAdapt instanceof Node) {
    return new JavaFXComponentAdapter<Node>((Node)objectToAdapt);
  }
  return returnvalue;
}
Program: 95578
Project: 95578
Buggy source:
/** 
 * @param nodes the nodes to delete
 * @param editor the editor to perfrom the deletion for
 */
public static void deleteNodesFromEditor(List<? extends INodePO> nodes,AbstractJBEditor editor){
  editor.getEditorHelper().getClipboard().clearContents();
  for (  INodePO node : nodes) {
    try {
      node.getParentNode().removeNode(node);
      if (node.getId() != null) {
        editor.getEditorHelper().getEditSupport().getSession().remove(node);
      }
      editor.getEditorHelper().setDirty(true);
      DataEventDispatcher.getInstance().fireDataChangedListener(node,DataState.Deleted,UpdateState.onlyInEditor);
    }
 catch (    PersistenceException e) {
      try {
        PersistenceManager.handleDBExceptionForEditor(node,e,editor.getEditorHelper().getEditSupport());
      }
 catch (      PMException pme) {
        PMExceptionHandler.handlePMExceptionForMasterSession(pme);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @param nodes the nodes to delete
 * @param editor the editor to perfrom the deletion for
 */
public static void deleteNodesFromEditor(List<? extends INodePO> nodes,AbstractJBEditor editor){
  editor.getEditorHelper().getClipboard().clearContents();
  for (  INodePO node : nodes) {
    try {
      node.getParentNode().removeNode(node);
      if (node instanceof IExecTestCasePO) {
        IExecTestCasePO po=(IExecTestCasePO)node;
        Collection<ICompNamesPairPO> col=po.getCompNamesPairs();
        for (        ICompNamesPairPO iCompNamesPairPO : col) {
          iCompNamesPairPO.getSecondName();
        }
      }
      if (node.getId() != null) {
        editor.getEditorHelper().getEditSupport().getSession().remove(node);
      }
      createReuseEvents(editor,node);
      editor.getEditorHelper().setDirty(true);
      DataEventDispatcher.getInstance().fireDataChangedListener(node,DataState.Deleted,UpdateState.onlyInEditor);
    }
 catch (    PersistenceException e) {
      try {
        PersistenceManager.handleDBExceptionForEditor(node,e,editor.getEditorHelper().getEditSupport());
      }
 catch (      PMException pme) {
        PMExceptionHandler.handlePMExceptionForMasterSession(pme);
      }
    }
  }
}
Program: 95580
Project: 95580
Buggy source:
/** 
 * The contructor.
 * @param parentShell The shell.
 * @param autConfig The selected AUTConfiguration in the AUTPropertiesDialog.
 * @param toolkit the toolkit.
 * @param autName The name of the AUT that will be using this configuration.
 * @param autIdValidator The validator for the AUT ID text field.
 */
public AUTConfigPropertiesDialog(Shell parentShell,IAUTConfigPO autConfig,String toolkit,String autName,IValidator autIdValidator){
  super(parentShell);
  m_autConfig=autConfig;
  m_toolkit=toolkit;
  m_autName=autName;
  m_autIdValidator=autIdValidator;
}

Fixed version (ground truth):
/** 
 * The contructor.
 * @param parentShell The shell.
 * @param autConfig The selected AUTConfiguration in the AUTPropertiesDialog.
 * @param toolkit the toolkit.
 * @param autName The name of the AUT that will be using this configuration.
 * @param autIdValidator The validator for the AUT ID text field.
 * @param autConfigNameValidator The validator for the AUT Config Name
 */
public AUTConfigPropertiesDialog(Shell parentShell,IAUTConfigPO autConfig,String toolkit,String autName,IValidator autIdValidator,AutConfigNameValidator autConfigNameValidator){
  super(parentShell);
  m_autConfig=autConfig;
  m_toolkit=toolkit;
  m_autName=autName;
  m_autIdValidator=autIdValidator;
  m_autConfigNameValidator=autConfigNameValidator;
}
Program: 95581
Project: 95581
Buggy source:
/** 
 * {@inheritDoc}
 */
protected Control createDialogArea(Composite parent){
  DataEventDispatcher.getInstance().getDialogStatusListenerMgr().addListener(this);
  Plugin.getHelpSystem().setHelp(parent,ContextHelpIds.AUT_CONFIG_PROP_DIALOG);
  setTitle(Messages.ProjectWizardAutSettings);
  setMessage(Messages.ProjectWizardAUTData);
  try {
    Composite autConfigComposite=ToolkitSupportBP.getAutConfigComposite(m_toolkit,parent,SWT.H_SCROLL | SWT.V_SCROLL,m_autConfig.getConfigMap(),m_autName);
    autConfigComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
    if (autConfigComposite instanceof AutConfigComponent) {
      ((AutConfigComponent)autConfigComposite).setAutIdValidator(m_autIdValidator);
    }
  }
 catch (  ToolkitPluginException e) {
    log.error(Messages.NoAUTConfigPageForToolkit + StringConstants.COLON + StringConstants.SPACE+ String.valueOf(m_toolkit),e);
    ErrorHandlingUtil.createMessageDialog(MessageIDs.E_NO_AUTCONFIG_DIALOG);
  }
  return parent;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
protected Control createDialogArea(Composite parent){
  DataEventDispatcher.getInstance().getDialogStatusListenerMgr().addListener(this);
  Plugin.getHelpSystem().setHelp(parent,ContextHelpIds.AUT_CONFIG_PROP_DIALOG);
  setTitle(Messages.ProjectWizardAutSettings);
  setMessage(Messages.ProjectWizardAUTData);
  try {
    Composite autConfigComposite=ToolkitSupportBP.getAutConfigComposite(m_toolkit,parent,SWT.H_SCROLL | SWT.V_SCROLL,m_autConfig.getConfigMap(),m_autName);
    autConfigComposite.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
    if (autConfigComposite instanceof AutConfigComponent) {
      m_autConfigComponent=((AutConfigComponent)autConfigComposite);
      m_autConfigComponent.setAutIdValidator(m_autIdValidator);
      m_autConfigComponent.setAutConfignameValidator(m_autConfigNameValidator);
    }
  }
 catch (  ToolkitPluginException e) {
    log.error(Messages.NoAUTConfigPageForToolkit + StringConstants.COLON + StringConstants.SPACE+ String.valueOf(m_toolkit),e);
    ErrorHandlingUtil.createMessageDialog(MessageIDs.E_NO_AUTCONFIG_DIALOG);
  }
  return parent;
}
Program: 95582
Project: 95582
Buggy source:
/** 
 * Handles the selectionEvent of the Edit Button.
 */
private void handleEditButtonEvent(){
  IAUTConfigPO autConfig=getSelectedAUTConf();
  if (autConfig != null) {
    Map<String,String> preEditConfig=PoMaker.createAUTConfigPO().getConfigMap();
    Utils.makeAutConfigCopy(autConfig.getConfigMap(),preEditConfig);
    AUTConfigPropertiesDialog dialog=new AUTConfigPropertiesDialog(m_editButton.getShell(),autConfig,getAutToolkit(),m_autMain.getName(),new AutIdValidator(m_project,m_autMain,autConfig));
    dialog.create();
    DialogUtils.setWidgetNameForModalDialog(dialog);
    dialog.getShell().setText(Messages.AUTPropertiesDialogAUTConfigTitle);
    dialog.open();
    if (dialog.getReturnCode() == Window.OK) {
      final Set<IAUTConfigPO> autConfigSet=m_autMain.getAutConfigSet();
      String[] listHelper=new String[autConfigSet.size()];
      int i=0;
      for (      IAUTConfigPO configPO : autConfigSet) {
        listHelper[i]=configPO.getName();
        i++;
      }
      setAutConfigList(listHelper);
    }
 else {
      Utils.makeAutConfigCopy(preEditConfig,autConfig.getConfigMap());
    }
    Map<String,String> newAutConfigMap=new HashMap<String,String>(autConfig.getConfigMap());
    autConfig.setConfigMap(newAutConfigMap);
    setFocus(new String[]{autConfig.getName()});
  }
}

Fixed version (ground truth):
/** 
 * Handles the selectionEvent of the Edit Button.
 */
private void handleEditButtonEvent(){
  IAUTConfigPO autConfig=getSelectedAUTConf();
  if (autConfig != null) {
    Map<String,String> preEditConfig=PoMaker.createAUTConfigPO().getConfigMap();
    Utils.makeAutConfigCopy(autConfig.getConfigMap(),preEditConfig);
    AUTConfigPropertiesDialog dialog=new AUTConfigPropertiesDialog(m_editButton.getShell(),autConfig,getAutToolkit(),m_autMain.getName(),new AutIdValidator(m_project,m_autMain,autConfig),new AutConfigNameValidator(m_autMain,autConfig));
    dialog.create();
    DialogUtils.setWidgetNameForModalDialog(dialog);
    dialog.getShell().setText(Messages.AUTPropertiesDialogAUTConfigTitle);
    dialog.open();
    if (dialog.getReturnCode() == Window.OK) {
      final Set<IAUTConfigPO> autConfigSet=m_autMain.getAutConfigSet();
      String[] listHelper=new String[autConfigSet.size()];
      int i=0;
      for (      IAUTConfigPO configPO : autConfigSet) {
        listHelper[i]=configPO.getName();
        i++;
      }
      setAutConfigList(listHelper);
    }
 else {
      Utils.makeAutConfigCopy(preEditConfig,autConfig.getConfigMap());
    }
    Map<String,String> newAutConfigMap=new HashMap<String,String>(autConfig.getConfigMap());
    autConfig.setConfigMap(newAutConfigMap);
    setFocus(new String[]{autConfig.getName()});
  }
}
Program: 95583
Project: 95583
Buggy source:
/** 
 * Edit a newly create AUT configuration
 * @param autConfig the new configuration
 */
private void editNewAUTConfig(IAUTConfigPO autConfig){
  String autName=m_autMain.getName();
  if (autName == null || autName.length() == 0) {
    autName=m_autNameText.getText();
  }
  String[] selection=m_autConfigList.getSelection();
  AUTConfigPropertiesDialog dialog=new AUTConfigPropertiesDialog(m_addButton.getShell(),autConfig,getAutToolkit(),autName,new AutIdValidator(m_project,m_autMain,autConfig));
  dialog.create();
  DialogUtils.setWidgetNameForModalDialog(dialog);
  dialog.getShell().setText(Messages.AUTPropertiesDialogAUTConfigTitle);
  dialog.open();
  if (dialog.getReturnCode() == Window.OK) {
    m_autConfigList.add(autConfig.getName());
    String[] autConfigList=m_autConfigList.getItems();
    setAutConfigList(autConfigList);
    m_autMain.addAutConfigToSet(autConfig);
    setFocus(new String[]{autConfig.getName()});
    return;
  }
  setFocus(selection);
}

Fixed version (ground truth):
/** 
 * Edit a newly create AUT configuration
 * @param autConfig the new configuration
 */
private void editNewAUTConfig(IAUTConfigPO autConfig){
  String autName=m_autMain.getName();
  if (autName == null || autName.length() == 0) {
    autName=m_autNameText.getText();
  }
  String[] selection=m_autConfigList.getSelection();
  AUTConfigPropertiesDialog dialog=new AUTConfigPropertiesDialog(m_addButton.getShell(),autConfig,getAutToolkit(),autName,new AutIdValidator(m_project,m_autMain,autConfig),new AutConfigNameValidator(m_autMain,autConfig));
  dialog.create();
  DialogUtils.setWidgetNameForModalDialog(dialog);
  dialog.getShell().setText(Messages.AUTPropertiesDialogAUTConfigTitle);
  dialog.open();
  if (dialog.getReturnCode() == Window.OK) {
    m_autConfigList.add(autConfig.getName());
    String[] autConfigList=m_autConfigList.getItems();
    setAutConfigList(autConfigList);
    m_autMain.addAutConfigToSet(autConfig);
    setFocus(new String[]{autConfig.getName()});
    return;
  }
  setFocus(selection);
}
Program: 95584
Project: 95584
Buggy source:
/** 
 * {@inheritDoc}
 */
public void addUsedProject(IReusedProjectPO reusedProject){
  Iterator it=getUsedProjects().iterator();
  while (it.hasNext()) {
    IReusedProjectPO oldReusedProject=(IReusedProjectPO)it.next();
    if (oldReusedProject.getName().equals(reusedProject.getName()) && oldReusedProject.getProjectVersion().compareTo(reusedProject.getProjectVersion()) <= 0) {
      removeUsedProject(oldReusedProject);
    }
  }
  getProjectProperties().addUsedProject(reusedProject);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void addUsedProject(IReusedProjectPO reusedProject){
  getProjectProperties().addUsedProject(reusedProject);
}
Program: 95585
Project: 95585
Buggy source:
/** 
 * Adds appropriate testcase libraries to the given project's reused  projects set.
 * @param newProject The project that will reuse the testcase libraries.
 */
private void addUnboundModules(IProjectPO newProject){
  ToolkitDescriptor desc=ComponentBuilder.getInstance().getCompSystem().getToolkitDescriptor(newProject.getToolkit());
  while (desc != null) {
    try {
      String moduleName=LIBRARY_PREFIX + StringUtils.lowerCase(desc.getName());
      IProjectPO ubmProject=ProjectPM.loadLatestVersionOfProjectByName(moduleName);
      if (ubmProject != null) {
        newProject.addUsedProject(PoMaker.createReusedProjectPO(ubmProject));
      }
 else {
        if (log.isInfoEnabled()) {
          log.info(Messages.Project + StringConstants.SPACE + StringConstants.APOSTROPHE+ moduleName+ StringConstants.APOSTROPHE+ Messages.DoesNotExist+ StringConstants.DOT);
        }
      }
    }
 catch (    JBException e) {
      log.error(e + StringConstants.COLON + StringConstants.SPACE+ e.getMessage());
    }
    desc=ComponentBuilder.getInstance().getCompSystem().getToolkitDescriptor(desc.getIncludes());
  }
}

Fixed version (ground truth):
/** 
 * Adds appropriate testcase libraries to the given project's reused  projects set.
 * @param newProject The project that will reuse the testcase libraries.
 */
private void addUnboundModules(IProjectPO newProject){
  ToolkitDescriptor desc=ComponentBuilder.getInstance().getCompSystem().getToolkitDescriptor(newProject.getToolkit());
  while (desc != null) {
    try {
      String moduleName=LIBRARY_PREFIX + StringUtils.lowerCase(desc.getName());
      IProjectPO ubmProject=ProjectPM.loadLatestVersionOfProjectByName(moduleName);
      if (ubmProject != null) {
        IReusedProjectPO[] reusedProj=new IReusedProjectPO[newProject.getUsedProjects().size()];
        newProject.getUsedProjects().toArray(reusedProj);
        for (int i=0; i < reusedProj.length; i++) {
          IReusedProjectPO oldReusedProject=reusedProj[i];
          if (oldReusedProject != null && oldReusedProject.getName().equals(ubmProject.getName()) && oldReusedProject.getProjectVersion().compareTo(ubmProject.getProjectVersion()) <= 0) {
            newProject.removeUsedProject(oldReusedProject);
          }
        }
        newProject.addUsedProject(PoMaker.createReusedProjectPO(ubmProject));
      }
 else {
        if (log.isInfoEnabled()) {
          log.info(Messages.Project + StringConstants.SPACE + StringConstants.APOSTROPHE+ moduleName+ StringConstants.APOSTROPHE+ Messages.DoesNotExist+ StringConstants.DOT);
        }
      }
    }
 catch (    JBException e) {
      log.error(e + StringConstants.COLON + StringConstants.SPACE+ e.getMessage());
    }
    desc=ComponentBuilder.getInstance().getCompSystem().getToolkitDescriptor(desc.getIncludes());
  }
}
Program: 95586
Project: 95586
Buggy source:
/** 
 * Checks every element with checks of the project for CheckStyle errors.
 */
public void doCompleteCheck(){
  Job checkEverythingJob=new CompleteTestStyleCheckJob("String_Node_Str");
  checkEverythingJob.setRule(SingleJobRule.TESTSTYLERULE);
  JobUtils.executeJob(checkEverythingJob,null);
  try {
    checkEverythingJob.join();
  }
 catch (  InterruptedException e) {
    LOG.warn("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Checks every element with checks of the project for CheckStyle errors.
 */
public void doCompleteCheck(){
  Job checkEverythingJob=new CompleteTestStyleCheckJob("String_Node_Str");
  checkEverythingJob.setRule(new MultiRule(new ISchedulingRule[]{SingleJobRule.COMPLETENESSRULE,SingleJobRule.TESTSTYLERULE}));
  JobUtils.executeJob(checkEverythingJob,null);
  try {
    checkEverythingJob.join();
  }
 catch (  InterruptedException e) {
    LOG.warn("String_Node_Str",e);
  }
}
Program: 95587
Project: 95587
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void handleDataChanged(DataChangedEvent... events){
  if (!isEnabled()) {
    return;
  }
  boolean isUpdateInEditor=true;
  for (  DataChangedEvent e : events) {
    if (e.getUpdateState() != UpdateState.onlyInEditor) {
      TestStyleJob tj=new TestStyleJob("String_Node_Str",events);
      tj.setRule(SingleJobRule.TESTSTYLERULE);
      JobUtils.executeJob(tj,null);
      for (      Job job : Job.getJobManager().find(tj)) {
        if (job != tj) {
          job.cancel();
        }
      }
      return;
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void handleDataChanged(DataChangedEvent... events){
  if (!isEnabled()) {
    return;
  }
  boolean isUpdateInEditor=true;
  for (  DataChangedEvent e : events) {
    if (e.getUpdateState() != UpdateState.onlyInEditor) {
      TestStyleJob tj=new TestStyleJob("String_Node_Str",events);
      tj.setRule(new MultiRule(new ISchedulingRule[]{SingleJobRule.COMPLETENESSRULE,SingleJobRule.TESTSTYLERULE}));
      JobUtils.executeJob(tj,null);
      for (      Job job : Job.getJobManager().find(tj)) {
        if (job != tj) {
          job.cancel();
        }
      }
      return;
    }
  }
}
Program: 95588
Project: 95588
Buggy source:
/** 
 * Packs the table.
 */
private void packTable(){
  final Table table=getTable();
  final TableColumn[] columns=table.getColumns();
  final int columnCount=columns.length;
  for (int i=1; i < columnCount; i++) {
    final TableColumn column=columns[i];
    column.pack();
    if (column.getWidth() < COLUMN_WIDTH) {
      column.setWidth(COLUMN_WIDTH);
    }
  }
}

Fixed version (ground truth):
/** 
 * Packs the table.
 */
private void packTable(){
  final Table table=getTable();
  final TableColumn[] columns=table.getColumns();
  final int columnCount=columns.length;
  for (int i=1; i < columnCount; i++) {
    final TableColumn column=columns[i];
    column.pack();
    column.setWidth(m_columnWidths != null ? m_columnWidths[i] : COLUMN_WIDTH);
  }
}
Program: 95589
Project: 95589
Buggy source:
/** 
 * creates the TableColumns with Parameter
 */
private void initTableViewerParameterColumns(){
  if (getParamInterfaceObj() == null) {
    return;
  }
  final Table table=getTable();
  String[] columnProperties=new String[getParamInterfaceObj().getParameterList().size() + 1];
  columnProperties[0]=initDataSetColumn();
  int i=1;
  for (  IParamDescriptionPO descr : getParamInterfaceObj().getParameterList()) {
    TableColumn column=new TableColumn(table,SWT.NONE);
    String columnName=descr.getName();
    column.setText(columnName);
    columnProperties[i++]=columnName;
    column.setWidth(COLUMN_WIDTH);
  }
  getTableViewer().setColumnProperties(columnProperties);
}

Fixed version (ground truth):
/** 
 * creates the TableColumns with Parameter
 */
private void initTableViewerParameterColumns(){
  if (getParamInterfaceObj() == null) {
    return;
  }
  final Table table=getTable();
  if (m_paramId == getParamInterfaceObj().getId()) {
    TableColumn[] tableColumns=table.getColumns();
    if (tableColumns != null && tableColumns.length != 0) {
      m_columnWidths=new int[tableColumns.length];
      int i=0;
      for (      TableColumn column : tableColumns) {
        m_columnWidths[i++]=column.getWidth();
      }
    }
  }
 else {
    m_paramId=getParamInterfaceObj().getId();
    m_columnWidths=null;
  }
  String[] columnProperties=new String[getParamInterfaceObj().getParameterList().size() + 1];
  columnProperties[0]=initDataSetColumn();
  int i=1;
  for (  IParamDescriptionPO descr : getParamInterfaceObj().getParameterList()) {
    TableColumn column=new TableColumn(table,SWT.NONE);
    String columnName=descr.getName();
    column.setText(columnName);
    columnProperties[i++]=columnName;
    if (m_columnWidths == null) {
      if (column.getWidth() < COLUMN_WIDTH) {
        column.setWidth(COLUMN_WIDTH);
      }
    }
 else {
      column.setWidth(m_columnWidths[i - 1]);
    }
  }
  getTableViewer().setColumnProperties(columnProperties);
}
Program: 95590
Project: 95590
Buggy source:
@Override public void closeConsole(){
  IConsole[] cons=ConsolePlugin.getDefault().getConsoleManager().getConsoles();
  ArrayList<IConsole> toRemove=new ArrayList<IConsole>();
  for (  IConsole c : cons) {
    if (c.getName().contains(CONNECTION_CONSOLE_NAME) && c instanceof MessageConsole) {
      toRemove.add(c);
    }
  }
  ConsolePlugin.getDefault().getConsoleManager().removeConsoles(toRemove.toArray(new IConsole[toRemove.size()]));
}

Fixed version (ground truth):
@Override public void closeConsole(){
  ConsolePlugin consolePlugin=ConsolePlugin.getDefault();
  if (consolePlugin != null && consolePlugin.getConsoleManager() != null) {
    IConsole[] cons=ConsolePlugin.getDefault().getConsoleManager().getConsoles();
    ArrayList<IConsole> toRemove=new ArrayList<IConsole>();
    for (    IConsole c : cons) {
      if (c.getName().contains(CONNECTION_CONSOLE_NAME) && c instanceof MessageConsole) {
        toRemove.add(c);
      }
    }
    ConsolePlugin.getDefault().getConsoleManager().removeConsoles(toRemove.toArray(new IConsole[toRemove.size()]));
  }
}
Program: 95591
Project: 95591
Buggy source:
/** 
 * only for Persistence (JPA / EclipseLink)!
 * @return the config
 */
@ElementCollection(fetch=FetchType.EAGER) @CollectionTable(name="String_Node_Str",joinColumns=@JoinColumn(name="String_Node_Str")) @MapKeyColumn(name="String_Node_Str") @Column(name="String_Node_Str",length=MAX_STRING_LENGTH) @BatchFetch(value=BatchFetchType.JOIN) Map<String,String> getHbmConfigMap(){
  return m_config;
}

Fixed version (ground truth):
/** 
 * only for Persistence (JPA / EclipseLink)!
 * @return the config
 */
@ElementCollection(fetch=FetchType.EAGER) @CollectionTable(name="String_Node_Str",joinColumns=@JoinColumn(name="String_Node_Str")) @MapKeyColumn(name="String_Node_Str") @Column(name="String_Node_Str",length=MAX_STRING_LENGTH) Map<String,String> getHbmConfigMap(){
  return m_config;
}
Program: 95592
Project: 95592
Buggy source:
/** 
 * @return Returns the autMainList.
 */
@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.EAGER,targetEntity=AUTMainPO.class) @JoinColumn(name="String_Node_Str") public Set<IAUTMainPO> getAutMainList(){
  return m_autMainList;
}

Fixed version (ground truth):
/** 
 * @return Returns the autMainList.
 */
@OneToMany(cascade=CascadeType.ALL,fetch=FetchType.EAGER,targetEntity=AUTMainPO.class) @JoinColumn(name="String_Node_Str") @BatchFetch(value=BatchFetchType.JOIN) public Set<IAUTMainPO> getAutMainList(){
  return m_autMainList;
}
Program: 95593
Project: 95593
Buggy source:
/** 
 * @return Returns the autConfigSet.
 */
@OneToMany(fetch=FetchType.EAGER,cascade=CascadeType.ALL,targetEntity=AUTConfigPO.class,orphanRemoval=true) @BatchFetch(value=BatchFetchType.JOIN) public Set<IAUTConfigPO> getAutConfigSet(){
  return m_autConfigSet;
}

Fixed version (ground truth):
/** 
 * @return Returns the autConfigSet.
 */
@OneToMany(fetch=FetchType.EAGER,cascade=CascadeType.ALL,targetEntity=AUTConfigPO.class,orphanRemoval=true) public Set<IAUTConfigPO> getAutConfigSet(){
  return m_autConfigSet;
}
Program: 95594
Project: 95594
Buggy source:
/** 
 * Finds a node within the project with the given ID.
 * @param nodeGuid The GUID of the node
 * @return the {@inheritDoc INodePO} with the given GUID, or <code>null</code> if the  {@link INodePO} cannot be found
 */
public static synchronized INodePO getNode(String nodeGuid){
  EntityManager session=GeneralStorage.getInstance().getMasterSession();
  Validate.notNull(session);
  Query specTcQuery=session.createQuery("String_Node_Str");
  specTcQuery.setParameter("String_Node_Str",nodeGuid);
  try {
    Object result=specTcQuery.getSingleResult();
    if (result instanceof INodePO) {
      return (INodePO)result;
    }
  }
 catch (  NoResultException nre) {
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Finds a node within the project with the given ID.
 * @param projectId The ID of the parent project of the spec testcase
 * @param nodeGuid The GUID of the node
 * @param session may not be null
 * @return the spec testcase with the given guid, or <code>null</code> if the testcase cannot be found
 */
public static synchronized INodePO getNode(Long projectId,String nodeGuid,EntityManager session){
  Validate.notNull(session);
  Query specTcQuery=session.createQuery("String_Node_Str" + "String_Node_Str");
  specTcQuery.setParameter("String_Node_Str",nodeGuid);
  specTcQuery.setParameter("String_Node_Str",projectId);
  try {
    Object result=specTcQuery.getSingleResult();
    if (result instanceof INodePO) {
      return (INodePO)result;
    }
  }
 catch (  NoResultException nre) {
  }
  return null;
}
Program: 95595
Project: 95595
Buggy source:
/** 
 * This method is getting the Node from   {@link TestResultNode}.  If this is a generated   {@link ITestCasePO} than it is searched in the database for the correct node.
 * @param trNode the testResult node
 * @return an {@link INodePO} which can be of any kind and from any project
 */
private static INodePO getExecFromTestResultNode(TestResultNode trNode){
  INodePO nodePO=trNode.getNode();
  if (nodePO instanceof ITestCasePO && nodePO.isGenerated()) {
    nodePO=NodePM.getNode(nodePO.getGuid());
  }
  return nodePO;
}

Fixed version (ground truth):
/** 
 * This method is getting the Node from   {@link TestResultNode}.  If this is a generated   {@link ITestCasePO} than it is searched in the database for the correct node.
 * @param trNode the testResult node
 * @return an {@link INodePO} which can be of any kind and from any project
 */
private static INodePO getExecFromTestResultNode(TestResultNode trNode){
  INodePO nodePO=trNode.getNode();
  String guid=nodePO.getGuid();
  if (nodePO instanceof ITestCasePO && nodePO.isGenerated()) {
    nodePO=NodePM.getNode(GeneralStorage.getInstance().getProject().getId(),guid);
    if (nodePO == null) {
      for (      IReusedProjectPO usedProject : GeneralStorage.getInstance().getProject().getUsedProjects()) {
        nodePO=NodePM.getNode(usedProject.getId(),guid);
        if (nodePO != null) {
          break;
        }
      }
    }
  }
  return nodePO;
}
Program: 95596
Project: 95596
Buggy source:
/** 
 * @param structuredSel find the referenced specification test case for the given structured selection
 * @return a valid ISpecTestCasePO or <code>null</code> if no referencecould be found
 */
public static ISpecTestCasePO getSpecTC(IStructuredSelection structuredSel){
  IExecTestCasePO execTc=null;
  Object firstElement=structuredSel.getFirstElement();
  if (firstElement instanceof IExecTestCasePO) {
    execTc=(IExecTestCasePO)firstElement;
  }
 else   if (firstElement instanceof TestResultNode) {
    TestResultNode trNode=(TestResultNode)firstElement;
    INodePO nodePO=getExecFromTestResultNode(trNode);
    if (nodePO instanceof ITestCasePO && !(nodePO instanceof IExecTestCasePO)) {
      nodePO=NodePM.getNode(nodePO.getGuid());
    }
    while (!(nodePO instanceof IExecTestCasePO)) {
      trNode=trNode.getParent();
      if (trNode == null) {
        return null;
      }
      nodePO=getExecFromTestResultNode(trNode);
    }
    execTc=(IExecTestCasePO)nodePO;
  }
  if (execTc != null) {
    return execTc.getSpecTestCase();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param structuredSel find the referenced specification test case for the given structured selection
 * @return a valid ISpecTestCasePO or <code>null</code> if no referencecould be found
 */
public static ISpecTestCasePO getSpecTC(IStructuredSelection structuredSel){
  IExecTestCasePO execTc=null;
  Object firstElement=structuredSel.getFirstElement();
  if (firstElement instanceof IExecTestCasePO) {
    execTc=(IExecTestCasePO)firstElement;
  }
 else   if (firstElement instanceof TestResultNode) {
    TestResultNode trNode=(TestResultNode)firstElement;
    INodePO nodePO=getExecFromTestResultNode(trNode);
    if (nodePO instanceof ITestCasePO && !(nodePO instanceof IExecTestCasePO)) {
      nodePO=NodePM.getNode(GeneralStorage.getInstance().getProject().getId(),nodePO.getGuid());
      if (nodePO == null) {
        for (        IReusedProjectPO usedProject : GeneralStorage.getInstance().getProject().getUsedProjects()) {
          nodePO=NodePM.getNode(usedProject.getId(),nodePO.getGuid());
          if (nodePO != null) {
            break;
          }
        }
      }
    }
    while (!(nodePO instanceof IExecTestCasePO)) {
      trNode=trNode.getParent();
      if (trNode == null) {
        return null;
      }
      nodePO=getExecFromTestResultNode(trNode);
    }
    execTc=(IExecTestCasePO)nodePO;
  }
  if (execTc != null) {
    return execTc.getSpecTestCase();
  }
  return null;
}
Program: 95597
Project: 95597
Buggy source:
/** 
 * Finds a node within the project with the given ID.
 * @param nodeGuid The GUID of the node
 * @return the {@inheritDoc INodePO} with the given GUID, or <code>null</code> if the  {@link INodePO} cannot be found
 */
public static synchronized INodePO getNode(String nodeGuid){
  EntityManager session=GeneralStorage.getInstance().getMasterSession();
  Validate.notNull(session);
  Query specTcQuery=session.createQuery("String_Node_Str");
  specTcQuery.setParameter("String_Node_Str",nodeGuid);
  try {
    Object result=specTcQuery.getSingleResult();
    if (result instanceof INodePO) {
      return (INodePO)result;
    }
  }
 catch (  NoResultException nre) {
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Finds a node within the project with the given ID.
 * @param projectId The ID of the parent project of the spec testcase
 * @param nodeGuid The GUID of the node
 * @param session may not be null
 * @return the spec testcase with the given guid, or <code>null</code> if the testcase cannot be found
 */
public static synchronized INodePO getNode(Long projectId,String nodeGuid,EntityManager session){
  Validate.notNull(session);
  Query specTcQuery=session.createQuery("String_Node_Str" + "String_Node_Str");
  specTcQuery.setParameter("String_Node_Str",nodeGuid);
  specTcQuery.setParameter("String_Node_Str",projectId);
  try {
    Object result=specTcQuery.getSingleResult();
    if (result instanceof INodePO) {
      return (INodePO)result;
    }
  }
 catch (  NoResultException nre) {
  }
  return null;
}
Program: 95598
Project: 95598
Buggy source:
/** 
 * This method is getting the Node from   {@link TestResultNode}.  If this is a generated   {@link ITestCasePO} than it is searched in the database for the correct node.
 * @param trNode the testResult node
 * @return an {@link INodePO} which can be of any kind and from any project
 */
private static INodePO getExecFromTestResultNode(TestResultNode trNode){
  INodePO nodePO=trNode.getNode();
  if (nodePO instanceof ITestCasePO && nodePO.isGenerated()) {
    nodePO=NodePM.getNode(nodePO.getGuid());
  }
  return nodePO;
}

Fixed version (ground truth):
/** 
 * This method is getting the Node from   {@link TestResultNode}.  If this is a generated   {@link ITestCasePO} than it is searched in the database for the correct node.
 * @param trNode the testResult node
 * @return an {@link INodePO} which can be of any kind and from any project
 */
private static INodePO getExecFromTestResultNode(TestResultNode trNode){
  INodePO nodePO=trNode.getNode();
  String guid=nodePO.getGuid();
  if (nodePO instanceof ITestCasePO && nodePO.isGenerated()) {
    nodePO=NodePM.getNode(GeneralStorage.getInstance().getProject().getId(),guid);
    if (nodePO == null) {
      for (      IReusedProjectPO usedProject : GeneralStorage.getInstance().getProject().getUsedProjects()) {
        nodePO=NodePM.getNode(usedProject.getId(),guid);
        if (nodePO != null) {
          break;
        }
      }
    }
  }
  return nodePO;
}
Program: 95599
Project: 95599
Buggy source:
/** 
 * @param structuredSel find the referenced specification test case for the given structured selection
 * @return a valid ISpecTestCasePO or <code>null</code> if no referencecould be found
 */
public static ISpecTestCasePO getSpecTC(IStructuredSelection structuredSel){
  IExecTestCasePO execTc=null;
  Object firstElement=structuredSel.getFirstElement();
  if (firstElement instanceof IExecTestCasePO) {
    execTc=(IExecTestCasePO)firstElement;
  }
 else   if (firstElement instanceof TestResultNode) {
    TestResultNode trNode=(TestResultNode)firstElement;
    INodePO nodePO=getExecFromTestResultNode(trNode);
    if (nodePO instanceof ITestCasePO && !(nodePO instanceof IExecTestCasePO)) {
      nodePO=NodePM.getNode(nodePO.getGuid());
    }
    while (!(nodePO instanceof IExecTestCasePO)) {
      trNode=trNode.getParent();
      if (trNode == null) {
        return null;
      }
      nodePO=getExecFromTestResultNode(trNode);
    }
    execTc=(IExecTestCasePO)nodePO;
  }
  if (execTc != null) {
    return execTc.getSpecTestCase();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param structuredSel find the referenced specification test case for the given structured selection
 * @return a valid ISpecTestCasePO or <code>null</code> if no referencecould be found
 */
public static ISpecTestCasePO getSpecTC(IStructuredSelection structuredSel){
  IExecTestCasePO execTc=null;
  Object firstElement=structuredSel.getFirstElement();
  if (firstElement instanceof IExecTestCasePO) {
    execTc=(IExecTestCasePO)firstElement;
  }
 else   if (firstElement instanceof TestResultNode) {
    TestResultNode trNode=(TestResultNode)firstElement;
    INodePO nodePO=getExecFromTestResultNode(trNode);
    if (nodePO instanceof ITestCasePO && !(nodePO instanceof IExecTestCasePO)) {
      nodePO=NodePM.getNode(GeneralStorage.getInstance().getProject().getId(),nodePO.getGuid());
      if (nodePO == null) {
        for (        IReusedProjectPO usedProject : GeneralStorage.getInstance().getProject().getUsedProjects()) {
          nodePO=NodePM.getNode(usedProject.getId(),nodePO.getGuid());
          if (nodePO != null) {
            break;
          }
        }
      }
    }
    while (!(nodePO instanceof IExecTestCasePO)) {
      trNode=trNode.getParent();
      if (trNode == null) {
        return null;
      }
      nodePO=getExecFromTestResultNode(trNode);
    }
    execTc=(IExecTestCasePO)nodePO;
  }
  if (execTc != null) {
    return execTc.getSpecTestCase();
  }
  return null;
}
Program: 95601
Project: 95601
Buggy source:
/** 
 * Looks through the Hierarchy for a Stage with a given Title.
 * @param title the Title of the Stage to look for
 * @param operator the operator
 * @return the Stage or null
 */
private Stage getStageByTitle(final String title,final String operator){
  Stage result=null;
  try {
    result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Stage>(){
      @Override public Stage call() throws Exception {
        List<? extends Stage> stages=ComponentHandler.getAssignableFrom(Stage.class);
        for (        final Stage stage : stages) {
          if (MatchUtil.getInstance().match(stage.getTitle(),title,operator)) {
            return stage;
          }
        }
        return null;
      }
    }
);
  }
 catch (  IllegalStateException e) {
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Looks through the Hierarchy for a Stage with a given Title.
 * @param title the Title of the Stage to look for
 * @param operator the operator
 * @return the Stage or null
 */
private Stage getStageByTitle(final String title,final String operator){
  Stage result=null;
  result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Stage>(){
    @Override public Stage call() throws Exception {
      List<? extends Stage> stages=ComponentHandler.getAssignableFrom(Stage.class);
      for (      final Stage stage : stages) {
        if (MatchUtil.getInstance().match(stage.getTitle(),title,operator)) {
          return stage;
        }
      }
      return null;
    }
  }
);
  return result;
}
Program: 95602
Project: 95602
Buggy source:
public Void run(){
  if (!m_slider.isEnabled()) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError("String_Node_Str"));
  }
  Integer value=null;
  Dictionary<Integer,?> labelTable=m_slider.getLabelTable();
  if (labelTable != null) {
    Enumeration<Integer> keys=labelTable.keys();
    MatchUtil matcher=MatchUtil.getInstance();
    for (    Integer k : Collections.list(keys)) {
      Object o=labelTable.get(k);
      String stringToMatch;
      if (o instanceof JLabel) {
        stringToMatch=((JLabel)o).getText();
      }
 else {
        stringToMatch=String.valueOf(position);
      }
      if (matcher.match(stringToMatch,position,operator)) {
        value=k;
        break;
      }
    }
    if (value == null) {
      throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.NOT_FOUND));
    }
  }
 else {
    try {
      value=Integer.valueOf(position);
    }
 catch (    NumberFormatException nfe) {
      throwInvalidInputMessage();
    }
  }
  setValueProgrammatically(units,value);
  return null;
}

Fixed version (ground truth):
public Void run(){
  if (!m_slider.isEnabled()) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError("String_Node_Str"));
  }
  Integer value=null;
  Dictionary<Integer,?> labelTable=m_slider.getLabelTable();
  String prefPos=getPreferredPosition(position,units);
  String possiblePos=getPossiblePosition(prefPos);
  int min=m_slider.getMinimum();
  int max=m_slider.getMaximum();
  int incr=getSliderIncrement();
  MatchUtil matcher=MatchUtil.getInstance();
  for (int val=min; val <= max; val+=incr) {
    if (labelTable != null) {
      Object label=labelTable.get(val);
      if (label != null && label instanceof JLabel) {
        if (matcher.match(((JLabel)label).getText(),possiblePos,operator)) {
          value=val;
          break;
        }
      }
    }
    if (matcher.match(String.valueOf(val),possiblePos,operator)) {
      value=val;
      break;
    }
  }
  if (value == null) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.NOT_FOUND));
  }
  m_slider.setValue(value);
  return null;
}