nus-yam/ex-repair huggingface dataset:
Program: 96038
Project: 96038
Buggy source:
/** 
 * Clicks at the current mouse position.
 * @param graphicsComponent The component used for confirming the click.
 * @param clickOptions Configuration for the click.
 */
private void clickImpl(Object graphicsComponent,ClickOptions clickOptions){
  int buttonMask=getButtonMask(clickOptions.getMouseButton());
  int clickCount=clickOptions.getClickCount();
  int[] modifierMask=getModifierMask(clickOptions.getClickModifier());
  if (clickCount > 0) {
    final InterceptorOptions options=new InterceptorOptions(new long[]{SWT.MouseUp,SWT.MouseDown});
    final IEventMatcher matcher=new ClickSwtEventMatcher(clickOptions);
    final IRobotEventConfirmer confirmer=m_interceptor.intercept(options);
    try {
      pressModifier(modifierMask);
      RobotTiming.sleepPreClickDelay();
      for (int i=0; i < clickCount; i++) {
        m_robot.mousePress(buttonMask);
        RobotTiming.sleepPostMouseDownDelay();
        m_robot.mouseRelease(buttonMask);
        RobotTiming.sleepPostMouseUpDelay();
      }
      if (clickOptions.isConfirmClick()) {
        try {
          confirmer.waitToConfirm(graphicsComponent,matcher);
        }
 catch (        RobotException re) {
          StringBuffer sb=new StringBuffer("String_Node_Str");
          logRobotException(graphicsComponent,re,sb);
          throw re;
        }
      }
    }
  finally {
      releaseModifier(modifierMask);
    }
  }
}

Fixed version (ground truth):
/** 
 * Clicks at the current mouse position.
 * @param graphicsComponent The component used for confirming the click.
 * @param clickOptions Configuration for the click.
 */
private void clickImpl(Object graphicsComponent,ClickOptions clickOptions){
  int buttonMask=getButtonMask(clickOptions.getMouseButton());
  int clickCount=clickOptions.getClickCount();
  int[] modifierMask=getModifierMask(clickOptions.getClickModifier());
  if (clickCount > 0) {
    final IEventMatcher matcher=new ClickSwtEventMatcher(clickOptions);
    IRobotEventConfirmer confirmer=null;
    if (clickOptions.isConfirmClick()) {
      final InterceptorOptions options=new InterceptorOptions(new long[]{SWT.MouseUp,SWT.MouseDown});
      confirmer=m_interceptor.intercept(options);
    }
    try {
      pressModifier(modifierMask);
      RobotTiming.sleepPreClickDelay();
      for (int i=0; i < clickCount; i++) {
        m_robot.mousePress(buttonMask);
        RobotTiming.sleepPostMouseDownDelay();
        m_robot.mouseRelease(buttonMask);
        RobotTiming.sleepPostMouseUpDelay();
      }
      if (confirmer != null) {
        try {
          confirmer.waitToConfirm(graphicsComponent,matcher);
        }
 catch (        RobotException re) {
          StringBuffer sb=new StringBuffer("String_Node_Str");
          logRobotException(graphicsComponent,re,sb);
          throw re;
        }
      }
    }
  finally {
      releaseModifier(modifierMask);
    }
  }
}
Program: 96039
Project: 96039
Buggy source:
/** 
 * {@inheritDoc}
 */
public Object executeImpl(ExecutionEvent event){
  ProjectDialog.ProjectData project=null;
  boolean cancelPressed=false;
  ProjectDialog dialog=null;
  List<IProjectPO> projList=checkAllAvailableProjects();
  if (!projList.isEmpty()) {
    if (ProjectUIBP.getInstance().shouldPerformAutoProjectLoad()) {
      project=ProjectUIBP.getMostRecentProjectData();
    }
 else {
      dialog=openProjectOpenDialog(projList);
      if (dialog.getReturnCode() == Window.CANCEL) {
        cancelPressed=true;
      }
 else {
        project=dialog.getSelection();
      }
    }
    if (!cancelPressed) {
      loadProject(project,projList);
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public Object executeImpl(ExecutionEvent event){
  ProjectDialog.ProjectData project=null;
  boolean cancelPressed=false;
  ProjectDialog dialog=null;
  List<IProjectPO> projList=checkAllAvailableProjects();
  if (!projList.isEmpty()) {
    if (ProjectUIBP.getInstance().shouldPerformAutoProjectLoad()) {
      project=ProjectUIBP.getMostRecentProjectData();
    }
 else {
      dialog=openProjectOpenDialog(projList);
      if (dialog == null || dialog.getReturnCode() == Window.CANCEL) {
        cancelPressed=true;
      }
 else {
        project=dialog.getSelection();
      }
    }
    if (!cancelPressed) {
      loadProject(project,projList);
    }
  }
  return null;
}
Program: 96040
Project: 96040
Buggy source:
/** 
 * sleep the pre show popup delay
 */
public static final void sleepPostShowSubMenuItem(){
  delay(POST_SHOW_SUB_MENU_DELAY);
}

Fixed version (ground truth):
/** 
 * sleep the post show popup delay
 * @param lookAndFeelSpecific a look and feel specific delay
 */
public static final void sleepPostShowSubMenuItem(int lookAndFeelSpecific){
  delay(lookAndFeelSpecific);
  delay(POST_SHOW_SUB_MENU_DELAY);
}
Program: 96041
Project: 96041
Buggy source:
/** 
 * Tries to navigate through the menu to the specified menu item.
 * @param robot robot
 * @param item the menu item
 * @param path the path where to navigate in the menu.
 * @param idx the current index in the path
 * @return the component at the end of the specified path.
 */
private static JMenuItem navigateToMenuItem(IRobot robot,JMenuItem item,int[] path,int idx){
  if (path.length == idx) {
    return item;
  }
  if (!(item instanceof JMenu)) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError());
  }
  clickMenuItem(robot,item);
  RobotTiming.sleepPostShowSubMenuItem();
  JMenuItem next=findMenuItem((JMenu)item,path[idx]);
  return navigateToMenuItem(robot,next,path,idx + 1);
}

Fixed version (ground truth):
/** 
 * Tries to navigate through the menu to the specified menu item.
 * @param robot robot
 * @param item the menu item
 * @param path the path where to navigate in the menu.
 * @param idx the current index in the path
 * @return the component at the end of the specified path.
 */
private static JMenuItem navigateToMenuItem(IRobot robot,JMenuItem item,int[] path,int idx){
  if (path.length == idx) {
    return item;
  }
  if (!(item instanceof JMenu)) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError());
  }
  JMenu menu=(JMenu)item;
  clickMenuItem(robot,menu);
  RobotTiming.sleepPostShowSubMenuItem(menu.getDelay());
  JMenuItem next=findMenuItem(menu,path[idx]);
  return navigateToMenuItem(robot,next,path,idx + 1);
}
Program: 96042
Project: 96042
Buggy source:
/** 
 * Returns an absolute (resolved) path of the given Plugin and the given Plugin-relative path.
 * @param plugin the Plugin
 * @param pluginRelPath the relative path
 * @return an absolute (resolved) path or null if the path could not be resolved.
 */
public static URL getURL(Plugin plugin,String pluginRelPath){
  URL unresolvedUrl=plugin.getBundle().getEntry(pluginRelPath);
  URL fileURL=null;
  try {
    fileURL=FileLocator.toFileURL(unresolvedUrl);
  }
 catch (  IOException e) {
    StringBuilder logMsg=new StringBuilder();
    logMsg.append(Messages.CouldNotResolvePath);
    logMsg.append(StringConstants.COLON);
    logMsg.append(StringConstants.SPACE);
    logMsg.append(pluginRelPath);
    logMsg.append(StringConstants.SPACE);
    logMsg.append(Messages.OfPlugin);
    logMsg.append(StringConstants.COLON);
    logMsg.append(StringConstants.SPACE);
    LOG.error(logMsg.toString(),e);
  }
  return fileURL;
}

Fixed version (ground truth):
/** 
 * Returns a (resolved) URL of the given Plugin and the given Plugin-relative path.
 * @param plugin the Plugin
 * @param pluginRelPath the relative path
 * @return a (resolved) URL or null if the path could not beresolved.
 */
public static URL getURL(Plugin plugin,String pluginRelPath){
  URL unresolvedUrl=plugin.getBundle().getEntry(pluginRelPath);
  URL fileURL=null;
  try {
    fileURL=FileLocator.resolve(unresolvedUrl);
  }
 catch (  IOException e) {
    StringBuilder logMsg=new StringBuilder();
    logMsg.append(Messages.CouldNotResolvePath);
    logMsg.append(StringConstants.COLON);
    logMsg.append(StringConstants.SPACE);
    logMsg.append(pluginRelPath);
    logMsg.append(StringConstants.SPACE);
    logMsg.append(Messages.OfPlugin);
    logMsg.append(StringConstants.COLON);
    logMsg.append(StringConstants.SPACE);
    LOG.error(logMsg.toString(),e);
  }
  return fileURL;
}
Program: 96043
Project: 96043
Buggy source:
/** 
 * tries to move all selected node into the target node. Operates on the GUI model and on the INodePO model 
 * @param target GuiNode
 * @param nodes List <INodePO>
 */
protected static void doMove(List<INodePO> nodes,IPersistentObject target) throws PMException, ProjectDeletedException {
  List<AbstractCmdHandle> cmds=new ArrayList<AbstractCmdHandle>();
  for (  INodePO nodeToMove : nodes) {
    INodePO oldParent=nodeToMove.getParentNode();
    cmds.add(new MoveNodeHandle(nodeToMove,oldParent,target));
  }
  MultipleNodePM.getInstance().executeCommands(cmds);
}

Fixed version (ground truth):
/** 
 * tries to move all selected node into the target node. Operates on the GUI model and on the INodePO model 
 * @param target GuiNode
 * @param nodes List <INodePO>
 */
protected static void doMove(List<INodePO> nodes,IPersistentObject target) throws PMException, ProjectDeletedException {
  List<AbstractCmdHandle> cmds=new ArrayList<AbstractCmdHandle>();
  List<DataChangedEvent> eventList=new ArrayList<DataChangedEvent>();
  for (  INodePO nodeToMove : nodes) {
    INodePO oldParent=nodeToMove.getParentNode();
    cmds.add(new MoveNodeHandle(nodeToMove,oldParent,target));
    eventList.add(new DataChangedEvent(target,DataState.StructureModified,UpdateState.notInEditor));
    eventList.add(new DataChangedEvent(oldParent,DataState.StructureModified,UpdateState.notInEditor));
  }
  MultipleNodePM.getInstance().executeCommands(cmds);
  DataEventDispatcher.getInstance().fireDataChangedListener(eventList.toArray(new DataChangedEvent[0]));
}
Program: 96045
Project: 96045
Buggy source:
/** 
 * @param po The persistent object for which the structure has changed
 */
private void handleDataStructureModified(final IPersistentObject po){
  if (po instanceof INodePO) {
    getTreeViewer().getTree().getParent().setRedraw(false);
    Object[] expandedElements=getTreeViewer().getExpandedElements();
    ISelection selection=getTreeViewer().getSelection();
    if (po instanceof IProjectPO) {
      rebuildTree();
    }
    getTreeViewer().refresh();
    getTreeViewer().setExpandedElements(expandedElements);
    getTreeViewer().setSelection(selection);
    getTreeViewer().getTree().getParent().setRedraw(true);
  }
}

Fixed version (ground truth):
/** 
 * @param po The persistent object for which the structure has changed
 */
private void handleDataStructureModified(final IPersistentObject po){
  if (po instanceof INodePO) {
    final TreeViewer tv=getTreeViewer();
    try {
      tv.getTree().getParent().setRedraw(false);
      Object[] expandedElements=tv.getExpandedElements();
      ISelection selection=tv.getSelection();
      if (po instanceof IProjectPO) {
        rebuildTree();
      }
      tv.refresh();
      tv.setExpandedElements(expandedElements);
      tv.setSelection(selection);
    }
  finally {
      tv.getTree().getParent().setRedraw(true);
    }
  }
}
Program: 96046
Project: 96046
Buggy source:
/** 
 * {@inheritDoc}
 */
public void handleDataChanged(final IPersistentObject po,final DataState dataState,final UpdateState updateState){
  Plugin.getDisplay().syncExec(new Runnable(){
    public void run(){
      if ((po instanceof IAUTMainPO) || (po instanceof ITestSuitePO)) {
        return;
      }
      if (updateState == UpdateState.onlyInEditor) {
        return;
      }
      if (po instanceof IReusedProjectPO) {
        handleProjectLoaded();
        return;
      }
switch (dataState) {
case Added:
        handleDataAdded(po,new NullProgressMonitor());
      break;
case Deleted:
    handleDataDeleted(po);
  break;
case Renamed:
handleDataRenamed(po);
break;
case StructureModified:
handleDataStructureModified(po);
break;
default :
break;
}
}
}
);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void handleDataChanged(final IPersistentObject po,final DataState dataState,final UpdateState updateState){
  Plugin.getDisplay().syncExec(new Runnable(){
    public void run(){
      if ((po instanceof IAUTMainPO) || (po instanceof ITestSuitePO)) {
        return;
      }
      if (updateState == UpdateState.onlyInEditor) {
        return;
      }
      if (po instanceof IReusedProjectPO) {
        handleProjectLoaded();
        return;
      }
switch (dataState) {
case Added:
        handleDataAdded(po,new NullProgressMonitor());
      break;
case Deleted:
    handleDataDeleted(po);
  break;
case Renamed:
handleDataRenamed(po);
break;
case StructureModified:
handleDataStructureModified(po);
break;
default :
break;
}
}
}
);
}
Program: 96047
Project: 96047
Buggy source:
/** 
 * Loads the project in a session. This is shared code for detached in master session loading.
 * @param reused The reused project information for this project.
 * @param session Session context for db ops
 * @return the ProjectPO or null if no project in db 
 * @throws JBFatalAbortException
 * @throws OperationCanceledException
 * @throws JBException in case of general db access errors (db disconnect, shutdown, etc)
 */
private static IProjectPO loadProjectInSession(IReusedProjectPO reused,EntityManager session) throws JBFatalAbortException, OperationCanceledException, JBException {
  try {
    Query query=session.createQuery("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    query.setParameter("String_Node_Str",reused.getProjectGuid());
    query.setParameter("String_Node_Str",reused.getMajorNumber());
    query.setParameter("String_Node_Str",reused.getMinorNumber());
    try {
      return (IProjectPO)query.getSingleResult();
    }
 catch (    NoResultException nre) {
      return null;
    }
  }
 catch (  PersistenceException e) {
    OperationCanceledUtil.checkForOperationCanceled(e);
    log.error(Messages.PersistenceLoadFailed,e);
    throw new JBException(e.getMessage(),MessageIDs.E_PERSISTENCE_LOAD_FAILED);
  }
}

Fixed version (ground truth):
/** 
 * Loads the project in a session. This is shared code for detached in  master session loading.
 * @param reused The reused project information for this project.
 * @param session Session context for db ops
 * @return the ProjectPO or null if no project in db 
 * @throws JBFatalAbortException
 * @throws OperationCanceledException
 * @throws JBException in case of general db access errors (db disconnect, shutdown, etc)
 */
private static IProjectPO loadProjectInSession(IReusedProjectPO reused,EntityManager session) throws JBFatalAbortException, OperationCanceledException, JBException {
  try {
    Query query=session.createQuery("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    query.setParameter("String_Node_Str",reused.getProjectGuid());
    query.setParameter("String_Node_Str",reused.getMajorNumber());
    query.setParameter("String_Node_Str",reused.getMinorNumber());
    try {
      return (IProjectPO)query.getSingleResult();
    }
 catch (    NoResultException nre) {
      return null;
    }
  }
 catch (  PersistenceException e) {
    OperationCanceledUtil.checkForOperationCanceled(e);
    log.error(Messages.PersistenceLoadFailed,e);
    throw new JBException(e.getMessage(),MessageIDs.E_PERSISTENCE_LOAD_FAILED);
  }
}
Program: 96049
Project: 96049
Buggy source:
/** 
 * {@inheritDoc}
 */
public Object executeImpl(ExecutionEvent event){
  ProjectDialog.ProjectData project=null;
  boolean cancelPressed=false;
  ProjectDialog dialog=null;
  List<IProjectPO> projList=checkAllAvailableProjects();
  if (ProjectUIBP.getInstance().shouldPerformAutoProjectLoad()) {
    project=ProjectUIBP.getMostRecentProjectData();
  }
 else {
    dialog=openProjectOpenDialog(projList);
    if (dialog.getReturnCode() == Window.CANCEL) {
      cancelPressed=true;
    }
 else {
      project=dialog.getSelection();
    }
  }
  if (!cancelPressed) {
    loadProject(project,projList);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public Object executeImpl(ExecutionEvent event){
  ProjectDialog.ProjectData project=null;
  boolean cancelPressed=false;
  ProjectDialog dialog=null;
  List<IProjectPO> projList=checkAllAvailableProjects();
  if (ProjectUIBP.getInstance().shouldPerformAutoProjectLoad()) {
    project=ProjectUIBP.getMostRecentProjectData();
  }
 else {
    dialog=openProjectOpenDialog(projList);
    if (dialog.getReturnCode() == Window.CANCEL) {
      cancelPressed=true;
    }
 else {
      project=dialog.getSelection();
    }
  }
  if (!cancelPressed && !projList.isEmpty()) {
    loadProject(project,projList);
  }
  return null;
}
Program: 96050
Project: 96050
Buggy source:
/** 
 * {@inheritDoc}
 */
public Object executeImpl(ExecutionEvent event){
  ProjectDialog.ProjectData project=null;
  boolean cancelPressed=false;
  ProjectDialog dialog=null;
  List<IProjectPO> projList=checkAllAvailableProjects();
  if (ProjectUIBP.getInstance().shouldPerformAutoProjectLoad()) {
    project=ProjectUIBP.getMostRecentProjectData();
  }
 else {
    dialog=openProjectOpenDialog(projList);
    if (dialog.getReturnCode() == Window.CANCEL) {
      cancelPressed=true;
    }
 else {
      project=dialog.getSelection();
    }
  }
  if (!cancelPressed && !projList.isEmpty()) {
    loadProject(project,projList);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public Object executeImpl(ExecutionEvent event){
  ProjectDialog.ProjectData project=null;
  boolean cancelPressed=false;
  ProjectDialog dialog=null;
  List<IProjectPO> projList=checkAllAvailableProjects();
  if (!projList.isEmpty()) {
    if (ProjectUIBP.getInstance().shouldPerformAutoProjectLoad()) {
      project=ProjectUIBP.getMostRecentProjectData();
    }
 else {
      dialog=openProjectOpenDialog(projList);
      if (dialog.getReturnCode() == Window.CANCEL) {
        cancelPressed=true;
      }
 else {
        project=dialog.getSelection();
      }
    }
    if (!cancelPressed) {
      loadProject(project,projList);
    }
  }
  return null;
}
Program: 96051
Project: 96051
Buggy source:
/** 
 * Releases the given mouse button on the given component in the given constraints. <br> <b>Note:</b> Use only for Drag and Drop! To click with the mouse, use click-methods!
 * @param graphicsComponent The graphics component.If null, the mouse button is released at the current location.
 * @param constraints A constraints object used by the Robot implementation, may be <code>null</code>.
 * @param button the mouse button.
 */
public void mouseRelease(Object graphicsComponent,Object constraints,int button) throws RobotException {
  if (graphicsComponent != null) {
    move(graphicsComponent,constraints);
  }
  RobotTiming.sleepPreClickDelay();
  m_robot.mouseRelease(getButtonMask(button));
  DragAndDropHelper.getInstance().setDragMode(false);
}

Fixed version (ground truth):
/** 
 * Releases the given mouse button on the given component in the given constraints. <br> <b>Note:</b> Use only for Drag and Drop! To click with the mouse, use click-methods!
 * @param graphicsComponent The graphics component.If null, the mouse button is released at the current location.
 * @param constraints A constraints object used by the Robot implementation, may be <code>null</code>.
 * @param button the mouse button.
 */
public void mouseRelease(Object graphicsComponent,Object constraints,int button) throws RobotException {
  if (graphicsComponent != null) {
    move(graphicsComponent,constraints);
  }
  RobotTiming.sleepPreClickDelay();
  m_robot.mouseRelease(getButtonMask(button));
  m_eventFlusher.flush();
  DragAndDropHelper.getInstance().setDragMode(false);
}
Program: 96053
Project: 96053
Buggy source:
/** 
 * Clicks at the current mouse position.
 * @param graphicsComponent The component used for confirming the click.
 * @param clickOptions Configuration for the click.
 */
private void clickImpl(Object graphicsComponent,ClickOptions clickOptions){
  int buttonMask=getButtonMask(clickOptions.getMouseButton());
  int clickCount=clickOptions.getClickCount();
  int[] modifierMask=getModifierMask(clickOptions.getClickModifier());
  if (clickCount > 0) {
    InterceptorOptions options=new InterceptorOptions(new long[]{AWTEvent.MOUSE_EVENT_MASK});
    IRobotEventConfirmer confirmer=m_interceptor.intercept(options);
    try {
      pressModifier(modifierMask);
      RobotTiming.sleepPreClickDelay();
      for (int i=0; i < clickCount; i++) {
        m_robot.mousePress(buttonMask);
        RobotTiming.sleepPostMouseDownDelay();
        m_robot.mouseRelease(buttonMask);
        RobotTiming.sleepPostMouseUpDelay();
      }
      if (clickOptions.isConfirmClick()) {
        confirmer.waitToConfirm(graphicsComponent,new ClickAwtEventMatcher(clickOptions));
      }
    }
  finally {
      releaseModifier(modifierMask);
    }
  }
}

Fixed version (ground truth):
/** 
 * Clicks at the current mouse position.
 * @param graphicsComponent The component used for confirming the click.
 * @param clickOptions Configuration for the click.
 */
private void clickImpl(Object graphicsComponent,ClickOptions clickOptions){
  int buttonMask=getButtonMask(clickOptions.getMouseButton());
  int clickCount=clickOptions.getClickCount();
  int[] modifierMask=getModifierMask(clickOptions.getClickModifier());
  if (clickCount > 0) {
    InterceptorOptions options=new InterceptorOptions(new long[]{AWTEvent.MOUSE_EVENT_MASK});
    IRobotEventConfirmer confirmer=m_interceptor.intercept(options);
    try {
      pressModifier(modifierMask);
      RobotTiming.sleepPreClickDelay();
      for (int i=0; i < clickCount; i++) {
        m_robot.mousePress(buttonMask);
        RobotTiming.sleepPostMouseDownDelay();
        m_eventFlusher.flush();
        m_robot.mouseRelease(buttonMask);
        RobotTiming.sleepPostMouseUpDelay();
        m_eventFlusher.flush();
      }
      if (clickOptions.isConfirmClick()) {
        confirmer.waitToConfirm(graphicsComponent,new ClickAwtEventMatcher(clickOptions));
      }
    }
  finally {
      releaseModifier(modifierMask);
    }
  }
}
Program: 96054
Project: 96054
Buggy source:
/** 
 * {@inheritDoc}
 */
public void keyType(Object graphicsComponent,int keycode) throws RobotException {
  try {
    InterceptorOptions options=new InterceptorOptions(new long[]{AWTEvent.KEY_EVENT_MASK});
    IRobotEventConfirmer confirmer=m_interceptor.intercept(options);
    try {
      m_robot.keyPress(keycode);
    }
  finally {
      m_robot.keyRelease(keycode);
    }
    confirmer.waitToConfirm(graphicsComponent,new KeyAwtEventMatcher(KeyEvent.KEY_RELEASED));
  }
 catch (  IllegalArgumentException e) {
    throw new RobotException(e);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void keyType(Object graphicsComponent,int keycode) throws RobotException {
  try {
    InterceptorOptions options=new InterceptorOptions(new long[]{AWTEvent.KEY_EVENT_MASK});
    IRobotEventConfirmer confirmer=m_interceptor.intercept(options);
    try {
      m_robot.keyPress(keycode);
      m_eventFlusher.flush();
    }
  finally {
      m_robot.keyRelease(keycode);
      m_eventFlusher.flush();
    }
    confirmer.waitToConfirm(graphicsComponent,new KeyAwtEventMatcher(KeyEvent.KEY_RELEASED));
  }
 catch (  IllegalArgumentException e) {
    throw new RobotException(e);
  }
}
Program: 96055
Project: 96055
Buggy source:
/** 
 * Implements the key press or release. 
 * @param graphicsComponent The component, may be <code>null</code>
 * @param keyCode  The key code
 * @param press If <code>true</code>, the key is pressed, otherwise released
 */
private void keyPressReleaseImpl(Object graphicsComponent,int keyCode,boolean press){
  InterceptorOptions options=new InterceptorOptions(new long[]{AWTEvent.KEY_EVENT_MASK});
  IRobotEventConfirmer confirmer=m_interceptor.intercept(options);
  if (press) {
    m_robot.keyPress(keyCode);
  }
 else {
    m_robot.keyRelease(keyCode);
  }
  confirmer.waitToConfirm(graphicsComponent,new KeyAwtEventMatcher(press ? KeyEvent.KEY_PRESSED : KeyEvent.KEY_RELEASED));
}

Fixed version (ground truth):
/** 
 * Implements the key press or release. 
 * @param graphicsComponent The component, may be <code>null</code>
 * @param keyCode  The key code
 * @param press If <code>true</code>, the key is pressed, otherwise released
 */
private void keyPressReleaseImpl(Object graphicsComponent,int keyCode,boolean press){
  InterceptorOptions options=new InterceptorOptions(new long[]{AWTEvent.KEY_EVENT_MASK});
  IRobotEventConfirmer confirmer=m_interceptor.intercept(options);
  if (press) {
    m_robot.keyPress(keyCode);
    m_eventFlusher.flush();
  }
 else {
    m_robot.keyRelease(keyCode);
    m_eventFlusher.flush();
  }
  confirmer.waitToConfirm(graphicsComponent,new KeyAwtEventMatcher(press ? KeyEvent.KEY_PRESSED : KeyEvent.KEY_RELEASED));
}
Program: 96056
Project: 96056
Buggy source:
/** 
 * Performs a mouse move only if the mouse motion tracker returns no latest motion event. In this case, the mouse is moved into the middle of the given component's root, or, if the root cannot be determined, into the middle of the component itself. 
 * @param component The AWT/Swing component
 * @throws RobotException If the component's location cannot be calculated.
 */
private void preMove(Component component) throws RobotException {
  if (m_mouseMotionTracker.getLastMouseMotionEvent() == null) {
    Component root=SwingUtilities.getRoot(component);
    Component c=(root != null) ? root : component;
    Point p=getLocation(c,null);
    m_robot.mouseMove(p.x,p.y);
  }
}

Fixed version (ground truth):
/** 
 * Performs a mouse move only if the mouse motion tracker returns no latest motion event. In this case, the mouse is moved into the middle of the given component's root, or, if the root cannot be determined, into the middle of the component itself. 
 * @param component The AWT/Swing component
 * @throws RobotException If the component's location cannot be calculated.
 */
private void preMove(Component component) throws RobotException {
  if (m_mouseMotionTracker.getLastMouseMotionEvent() == null) {
    Component root=SwingUtilities.getRoot(component);
    Component c=(root != null) ? root : component;
    Point p=getLocation(c,null);
    m_robot.mouseMove(p.x,p.y);
    m_eventFlusher.flush();
  }
}
Program: 96057
Project: 96057
Buggy source:
/** 
 * Presses the given mouse button on the given component in the given constraints. <br> <b>Note:</b> Use only for Drag and Drop! To click with the mouse, use click-methods!
 * @param graphicsComponent the component where to press the mouse button.If null, the mouse is pressed at the current location.
 * @param constraints A constraints object used by the Robot implementation, may be <code>null</code>.
 * @param button the mouse button which is to be pressed. 
 */
public void mousePress(Object graphicsComponent,Object constraints,int button){
  DragAndDropHelper.getInstance().setDragMode(true);
  if (graphicsComponent != null) {
    move(graphicsComponent,constraints);
  }
  RobotTiming.sleepPreClickDelay();
  m_robot.mousePress(getButtonMask(button));
}

Fixed version (ground truth):
/** 
 * Presses the given mouse button on the given component in the given constraints. <br> <b>Note:</b> Use only for Drag and Drop! To click with the mouse, use click-methods!
 * @param graphicsComponent the component where to press the mouse button.If null, the mouse is pressed at the current location.
 * @param constraints A constraints object used by the Robot implementation, may be <code>null</code>.
 * @param button the mouse button which is to be pressed. 
 */
public void mousePress(Object graphicsComponent,Object constraints,int button){
  DragAndDropHelper.getInstance().setDragMode(true);
  if (graphicsComponent != null) {
    move(graphicsComponent,constraints);
  }
  RobotTiming.sleepPreClickDelay();
  m_robot.mousePress(getButtonMask(button));
  m_eventFlusher.flush();
}
Program: 96058
Project: 96058
Buggy source:
/** 
 * Creates a new instance. 
 * @param factory The Robot factory instance.
 * @throws RobotException If the AWT-Robot cannot be created.
 */
public RobotAwtImpl(IRobotFactory factory) throws RobotException {
  try {
    m_robot=new Robot();
    m_robot.setAutoWaitForIdle(false);
    m_robot.setAutoDelay(0);
  }
 catch (  AWTException awte) {
    log.error(awte);
    m_robot=null;
    throw new RobotException(awte);
  }
catch (  SecurityException se) {
    log.error(se);
    m_robot=null;
    throw new RobotException(se);
  }
  m_interceptor=factory.getRobotEventInterceptor();
  m_mouseMotionTracker=factory.getMouseMotionTracker();
  m_queuer=factory.getEventThreadQueuer();
}

Fixed version (ground truth):
/** 
 * Creates a new instance. 
 * @param factory The Robot factory instance.
 * @throws RobotException If the AWT-Robot cannot be created.
 */
public RobotAwtImpl(IRobotFactory factory) throws RobotException {
  try {
    m_robot=new Robot();
    m_robot.setAutoWaitForIdle(false);
    m_robot.setAutoDelay(0);
  }
 catch (  AWTException awte) {
    log.error(awte);
    m_robot=null;
    throw new RobotException(awte);
  }
catch (  SecurityException se) {
    log.error(se);
    m_robot=null;
    throw new RobotException(se);
  }
  m_interceptor=factory.getRobotEventInterceptor();
  m_mouseMotionTracker=factory.getMouseMotionTracker();
  m_queuer=factory.getEventThreadQueuer();
  m_eventFlusher=new EventFlusher(m_robot,FLUSH_TIMEOUT);
}
Program: 96059
Project: 96059
Buggy source:
/** 
 * Creates the table page of the editor.
 * @param parent The parent composite.
 * @return the base control of the table view.
 */
private Control createTablePageControl(Composite parent){
  m_tableViewer=new TableViewer(parent,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER| SWT.FULL_SELECTION);
  addLogicalNameColumn(m_tableViewer);
  addTechNameColumn(m_tableViewer);
  addCategoryColumn(m_tableViewer);
  addCompTypeColumn(m_tableViewer);
  TableViewerEditor.create(m_tableViewer,new OMTableEditorActivationStrategy(m_tableViewer),ColumnViewerEditor.TABBING_VERTICAL | ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR | ColumnViewerEditor.TABBING_HORIZONTAL);
  m_tableViewer.setContentProvider(new OMEditorTableContentProvider());
  m_tableViewer.getTable().setLinesVisible(true);
  m_tableViewer.getTable().setHeaderVisible(true);
  TableColumn sortColumn=m_tableViewer.getTable().getColumn(0);
  m_tableViewer.getTable().setSortColumn(sortColumn);
  m_tableViewer.getTable().setSortDirection(SWT.DOWN);
  ColumnSortListener sortListener=new ColumnSortListener(m_tableViewer,sortColumn);
  m_tableViewer.setComparator(sortListener);
  for (  TableColumn col : m_tableViewer.getTable().getColumns()) {
    col.addSelectionListener(sortListener);
  }
  m_tableViewer.setUseHashlookup(true);
  m_tableViewer.setInput(getAut().getObjMap());
  createTableContextMenu();
  return m_tableViewer.getControl();
}

Fixed version (ground truth):
/** 
 * Creates the table page of the editor.
 * @param parent The parent composite.
 * @return the base control of the table view.
 */
private Control createTablePageControl(Composite parent){
  m_tableViewer=new TableViewer(parent,SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER| SWT.FULL_SELECTION);
  addLogicalNameColumn(m_tableViewer);
  addTechNameColumn(m_tableViewer);
  addCategoryColumn(m_tableViewer);
  addCompTypeColumn(m_tableViewer);
  TableViewerEditor.create(m_tableViewer,new OMTableEditorActivationStrategy(m_tableViewer),ColumnViewerEditor.TABBING_VERTICAL | ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR | ColumnViewerEditor.TABBING_HORIZONTAL);
  m_tableViewer.setContentProvider(new OMEditorTableContentProvider());
  m_tableViewer.getTable().setLinesVisible(true);
  m_tableViewer.getTable().setHeaderVisible(true);
  TableColumn sortColumn=m_tableViewer.getTable().getColumn(0);
  m_tableViewer.getTable().setSortColumn(sortColumn);
  m_tableViewer.getTable().setSortDirection(SWT.DOWN);
  ColumnSortListener sortListener=new ColumnSortListener(m_tableViewer,sortColumn);
  for (  TableColumn col : m_tableViewer.getTable().getColumns()) {
    col.addSelectionListener(sortListener);
  }
  m_tableViewer.setUseHashlookup(true);
  m_tableViewer.setInput(getAut().getObjMap());
  createTableContextMenu();
  return m_tableViewer.getControl();
}
Program: 96060
Project: 96060
Buggy source:
/** 
 * {@inheritDoc}
 */
public Object executeImpl(ExecutionEvent event){
  IWorkbenchPart activePart=HandlerUtil.getActivePart(event);
  if (activePart instanceof TestresultSummaryView) {
    final TestresultSummaryView summary=(TestresultSummaryView)activePart;
    summary.refreshView();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public Object executeImpl(ExecutionEvent event){
  IWorkbenchPart activePart=HandlerUtil.getActivePart(event);
  if (activePart instanceof TestresultSummaryView) {
    final TestresultSummaryView summary=(TestresultSummaryView)activePart;
    summary.loadViewInput();
  }
  return null;
}
Program: 96061
Project: 96061
Buggy source:
/** 
 * {@inheritDoc}
 */
public Object[] getElements(Object inputElement){
  if (inputElement instanceof Object[]) {
    return (Object[])inputElement;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public Object[] getElements(Object inputElement){
  if (inputElement instanceof Object[]) {
    return (Object[])inputElement;
  }
  return null;
}
Program: 96062
Project: 96062
Buggy source:
/** 
 * {@inheritDoc}
 */
public void dispose(){
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void dispose(){
}
Program: 96063
Project: 96063
Buggy source:
/** 
 * {@inheritDoc}
 */
public void inputChanged(Viewer viewer,Object oldInput,Object newInput){
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void inputChanged(Viewer viewer,Object oldInput,Object newInput){
}
Program: 96064
Project: 96064
Buggy source:
/** 
 * Constructor
 * @param viewer TableViewer
 * @param initialSortColumn The column to use initially for sorting.
 */
public ColumnSortListener(TableViewer viewer,TableColumn initialSortColumn){
  m_tableViewer=viewer;
  initialSortColumn.getParent().setSortColumn(initialSortColumn);
  initialSortColumn.getParent().setSortDirection(SWT.DOWN);
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param viewer TableViewer
 * @param initialSortColumn The column to use initially for sorting.
 */
public ColumnSortListener(TableViewer viewer,TableColumn initialSortColumn){
  m_tableViewer=viewer;
  final Table parent=initialSortColumn.getParent();
  parent.setSortColumn(initialSortColumn);
  parent.setSortDirection(SWT.DOWN);
}
Program: 96065
Project: 96065
Buggy source:
/** 
 * Assigns the receiver as its viewer's sorter.
 * @param direction The sort direction to use.
 */
public void setSorter(int direction){
  m_column.getColumn().getParent().setSortColumn(m_column.getColumn());
  m_direction=direction;
  if (direction == ASC) {
    m_column.getColumn().getParent().setSortDirection(SWT.DOWN);
  }
 else {
    m_column.getColumn().getParent().setSortDirection(SWT.UP);
  }
  if (m_viewer.getComparator() == this) {
    m_viewer.refresh();
  }
 else {
    m_viewer.setComparator(this);
  }
}

Fixed version (ground truth):
/** 
 * Assigns the receiver as its viewer's sorter.
 * @param direction The sort direction to use.
 */
public void setSorter(int direction){
  final Table parent=m_column.getColumn().getParent();
  parent.setSortColumn(m_column.getColumn());
  m_direction=direction;
  if (direction == ASC) {
    parent.setSortDirection(SWT.UP);
  }
 else {
    parent.setSortDirection(SWT.DOWN);
  }
  if (m_viewer.getComparator() == this) {
    m_viewer.refresh();
  }
 else {
    m_viewer.setComparator(this);
  }
}
Program: 96066
Project: 96066
Buggy source:
/** 
 * @param arguments evaluate() parameter
 * @param numParamsExpected how many parameters does the Evaluator expect
 * @throws InvalidDataException if the are not exactly numParamsExpectedparameters in arguments
 */
protected void validateParamCount(String[] arguments,int numParamsExpected) throws InvalidDataException {
  if (arguments.length != 2) {
    throw new InvalidDataException(NLS.bind(Messages.WrongNumFunctionArgs,new Integer[]{numParamsExpected,arguments.length}),MessageIDs.E_WRONG_NUM_FUNCTION_ARGS);
  }
}

Fixed version (ground truth):
/** 
 * @param arguments evaluate() parameter
 * @param numParamsExpected how many parameters does the Evaluator expect
 * @throws InvalidDataException if the are not exactly numParamsExpected parameters in arguments
 */
protected void validateParamCount(String[] arguments,int numParamsExpected) throws InvalidDataException {
  if (arguments.length != numParamsExpected) {
    throw new InvalidDataException(NLS.bind(Messages.WrongNumFunctionArgs,new Integer[]{numParamsExpected,arguments.length}),MessageIDs.E_WRONG_NUM_FUNCTION_ARGS);
  }
}
Program: 96067
Project: 96067
Buggy source:
/** 
 * Shows the SpecTS in the Test Suite Browser
 * @param node the node to show
 * @param viewPart the view part to show the specification in
 */
protected void showSpecUINode(INodePO node,IViewPart viewPart){
  if (!Utils.openPerspective(Constants.SPEC_PERSPECTIVE)) {
    return;
  }
  if (!PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getPerspective().getId().equals(Constants.SPEC_PERSPECTIVE)) {
    ErrorHandlingUtil.createMessageDialog(MessageIDs.I_NO_PERSPECTIVE_CHANGE);
    return;
  }
  if (viewPart instanceof AbstractJBTreeView) {
    AbstractJBTreeView jbtv=(AbstractJBTreeView)viewPart;
    UINodeBP.selectNodeInTree(node.getId(),jbtv.getTreeViewer(),jbtv.getEntityManager());
  }
}

Fixed version (ground truth):
/** 
 * Shows the SpecTS in the Test Suite Browser
 * @param node the node to show
 * @param viewPart the view part to show the specification in
 */
protected void showSpecUINode(INodePO node,IViewPart viewPart){
  if (!Utils.openPerspective(Constants.SPEC_PERSPECTIVE)) {
    return;
  }
  if (!PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getPerspective().getId().equals(Constants.SPEC_PERSPECTIVE)) {
    ErrorHandlingUtil.createMessageDialog(MessageIDs.I_NO_PERSPECTIVE_CHANGE);
    return;
  }
  if (viewPart instanceof AbstractJBTreeView) {
    AbstractJBTreeView jbtv=(AbstractJBTreeView)viewPart;
    Plugin.activate(jbtv);
    UINodeBP.selectNodeInTree(node.getId(),jbtv.getTreeViewer(),jbtv.getEntityManager());
  }
}
Program: 96068
Project: 96068
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void jumpTo(Long id){
  AbstractJBTreeView jbtv=MultipleTCBTracker.getInstance().getMainTCB();
  if (jbtv == null) {
    jbtv=(AbstractJBTreeView)Plugin.showView(Constants.TC_BROWSER_ID);
  }
  TreeViewer tv=jbtv.getTreeViewer();
  EntityManager em=jbtv.getEntityManager();
  INodePO node=UINodeBP.selectNodeInTree(id,tv,em);
  if (node == null) {
    jbtv=(AbstractJBTreeView)Plugin.showView(Constants.TS_BROWSER_ID);
    tv=jbtv.getTreeViewer();
    node=UINodeBP.selectNodeInTree(id,tv,em);
  }
  BasicSearchResult.openEditorForNode(node,jbtv);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void jumpTo(Long id){
  AbstractJBTreeView jbtv=MultipleTCBTracker.getInstance().getMainTCB();
  if (jbtv == null) {
    jbtv=(AbstractJBTreeView)Plugin.showView(Constants.TC_BROWSER_ID);
  }
 else {
    Plugin.activate(jbtv);
  }
  TreeViewer tv=jbtv.getTreeViewer();
  EntityManager em=jbtv.getEntityManager();
  INodePO node=UINodeBP.selectNodeInTree(id,tv,em);
  if (node == null) {
    jbtv=(AbstractJBTreeView)Plugin.showView(Constants.TS_BROWSER_ID);
    tv=jbtv.getTreeViewer();
    node=UINodeBP.selectNodeInTree(id,tv,em);
  }
  BasicSearchResult.openEditorForNode(node,jbtv);
}
Program: 96069
Project: 96069
Buggy source:
/** 
 * performs the extraction
 * @param newTcName the name of the new SpecTestCase
 * @param node the edited  {@link INodePO} from which to extract
 * @param selection the nodes to be extracted
 * @return an error message or null.
 */
private ExtractionReturn performExtraction(final String newTcName,final INodePO node,final IStructuredSelection selection){
  final List<IParamNodePO> modNodes=new ArrayList<IParamNodePO>(selection.size());
  Iterator it=selection.iterator();
  while (it.hasNext()) {
    modNodes.add((IParamNodePO)it.next());
  }
  try {
    ExtractionReturn extractionRet=persistExtraction(node,newTcName,modNodes);
    DataEventDispatcher.getInstance().fireDataChangedListener(node,DataState.StructureModified,UpdateState.all);
    DataEventDispatcher.getInstance().fireDataChangedListener(extractionRet.getExecTestCasePO(),DataState.Added,UpdateState.all);
    final ISpecTestCasePO newSpecTc=extractionRet.getExecTestCasePO().getSpecTestCase();
    DataEventDispatcher.getInstance().fireDataChangedListener(newSpecTc,DataState.Added,UpdateState.all);
    return extractionRet;
  }
 catch (  PMException e) {
    PMExceptionHandler.handlePMExceptionForMasterSession(e);
  }
catch (  ProjectDeletedException e) {
    PMExceptionHandler.handleGDProjectDeletedException();
  }
  return new ExtractionReturn();
}

Fixed version (ground truth):
/** 
 * performs the extraction
 * @param newTcName the name of the new SpecTestCase
 * @param node the edited  {@link INodePO} from which to extract
 * @param selection the nodes to be extracted
 * @return an error message or null.
 */
private ExtractionReturn performExtraction(final String newTcName,final INodePO node,final IStructuredSelection selection){
  final List<IParamNodePO> modNodes=new ArrayList<IParamNodePO>(selection.size());
  Iterator it=selection.iterator();
  while (it.hasNext()) {
    modNodes.add((IParamNodePO)it.next());
  }
  try {
    ExtractionReturn extractionRet=persistExtraction(node,newTcName,modNodes);
    DataEventDispatcher.getInstance().fireDataChangedListener(node,DataState.StructureModified,UpdateState.all);
    DataEventDispatcher.getInstance().fireDataChangedListener(extractionRet.getExecTestCasePO(),DataState.Added,UpdateState.all);
    final ISpecTestCasePO newSpecTc=extractionRet.getExecTestCasePO().getSpecTestCase();
    DataEventDispatcher.getInstance().fireDataChangedListener(newSpecTc,DataState.Added,UpdateState.all);
    TestCaseBrowser tcb=MultipleTCBTracker.getInstance().getMainTCB();
    if (tcb != null) {
      tcb.getTreeViewer().setSelection(new StructuredSelection(newSpecTc),true);
    }
    return extractionRet;
  }
 catch (  PMException e) {
    PMExceptionHandler.handlePMExceptionForMasterSession(e);
  }
catch (  ProjectDeletedException e) {
    PMExceptionHandler.handleGDProjectDeletedException();
  }
  return new ExtractionReturn();
}
Program: 96071
Project: 96071
Buggy source:
/** 
 * {@inheritDoc} 
 */
public Object executeImpl(ExecutionEvent event){
  String newTestCaseName=getNewTestCaseName(event);
  if (newTestCaseName != null) {
    ISpecTestCasePO newSpecTC=null;
    IStructuredSelection ss=getSelection();
    final List<IParamNodePO> nodesToClone=new ArrayList<IParamNodePO>(ss.size());
    Iterator it=ss.iterator();
    while (it.hasNext()) {
      nodesToClone.add((IParamNodePO)it.next());
    }
    newSpecTC=createAndPerformNodeDuplication(newTestCaseName,nodesToClone);
    DataEventDispatcher.getInstance().fireDataChangedListener(newSpecTC,DataState.Added,UpdateState.all);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public Object executeImpl(ExecutionEvent event){
  String newTestCaseName=getNewTestCaseName(event);
  if (newTestCaseName != null) {
    ISpecTestCasePO newSpecTC=null;
    IStructuredSelection ss=getSelection();
    final List<IParamNodePO> nodesToClone=new ArrayList<IParamNodePO>(ss.size());
    Iterator it=ss.iterator();
    while (it.hasNext()) {
      nodesToClone.add((IParamNodePO)it.next());
    }
    newSpecTC=createAndPerformNodeDuplication(newTestCaseName,nodesToClone);
    DataEventDispatcher.getInstance().fireDataChangedListener(newSpecTC,DataState.Added,UpdateState.all);
    TestCaseBrowser tcb=MultipleTCBTracker.getInstance().getMainTCB();
    if (tcb != null) {
      tcb.getTreeViewer().setSelection(new StructuredSelection(newSpecTC),true);
    }
  }
  return null;
}
Program: 96072
Project: 96072
Buggy source:
/** 
 * @return the String from the Cell Renderer
 */
public String getText(){
  JComboBox comboBox=((JComboBox)m_implClass.getComponent());
  return m_implClass.getRenderedText(getComboBoxEditorComponent(comboBox),true);
}

Fixed version (ground truth):
/** 
 * @return the String from the Cell Renderer
 */
public String getText(){
  final JComboBox comboBox=((JComboBox)m_implClass.getComponent());
  String comboBoxText;
  if (comboBox.isEditable()) {
    comboBoxText=m_implClass.getRenderedText(getComboBoxEditorComponent(comboBox),true);
  }
 else {
    final int selIndex=comboBox.getSelectedIndex();
    if (selIndex == -1) {
      comboBoxText=String.valueOf(comboBox.getSelectedItem());
    }
 else {
      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);
        }
      }
);
      comboBoxText=String.valueOf(o);
    }
  }
  return comboBoxText;
}
Program: 96073
Project: 96073
Buggy source:
public Object run(){
  JComboBox comboBox=(JComboBox)m_implClass.getComponent();
  return comboBox.isEditable() ? Boolean.TRUE : Boolean.FALSE;
}

Fixed version (ground truth):
public Object run(){
  Component disp=comboBox.getRenderer().getListCellRendererComponent(jlist,jlist.getModel().getElementAt(selIndex),selIndex,true,comboBox.hasFocus());
  return m_implClass.getRenderedText(disp,false);
}
Program: 96074
Project: 96074
Buggy source:
/** 
 * {@inheritDoc}
 */
public void writeMonitoringReport(OutputStream out){
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void writeMonitoringReport(OutputStream out){
  try {
    out.close();
  }
 catch (  IOException e) {
    LOG.error(DebugConstants.ERROR,e);
  }
}
Program: 96075
Project: 96075
Buggy source:
/** 
 * {@inheritDoc}
 */
public Map<String,IMonitoringValue> getMonitoringData(){
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public Map<String,IMonitoringValue> getMonitoringData(){
  return new HashMap<String,IMonitoringValue>();
}