nus-yam/ex-repair huggingface dataset:
Program: 95705
Project: 95705
Buggy source:
/** 
 * Use this method only from the FX-Thread! Draws a border around the given Node
 * @param n the Node
 */
public static void drawHighlight(Node n){
  if (n.getEffect() != null) {
    oldEffects.put(n,n.getEffect());
  }
  n.setEffect(new InnerShadow(10,Color.GREEN));
}

Fixed version (ground truth):
/** 
 * Use this method only from the FX-Thread! Draws a border around the given Node
 * @param n the Node
 */
public static void drawHighlight(Node n){
  if (n.effectProperty().isBound()) {
    return;
  }
  if (n.getEffect() != null) {
    oldEffects.put(n,n.getEffect());
  }
  n.setEffect(new InnerShadow(10,Color.GREEN));
}
Program: 95706
Project: 95706
Buggy source:
/** 
 * Returns a sorted map consisting of the bean properties of a component
 * @param currComp the component
 * @return the sorted map of properties
 */
public static Map<String,String> getMapOfComponentProperties(final Object currComp){
  PropertyDescriptor[] propertyDescriptors=PropertyUtils.getPropertyDescriptors(currComp);
  Map<String,String> componentProperties=new TreeMap<String,String>();
  for (int i=0; i < propertyDescriptors.length; i++) {
    PropertyDescriptor pd=propertyDescriptors[i];
    String propertyName=pd.getName();
    try {
      Method readMethod=pd.getReadMethod();
      if (readMethod != null) {
        componentProperties.put(propertyName,getPropertyValue(currComp,propertyName));
      }
 else {
        componentProperties.put(propertyName,"String_Node_Str");
      }
    }
 catch (    IllegalArgumentException e) {
      componentProperties.put(propertyName,"String_Node_Str");
    }
  }
  return componentProperties;
}

Fixed version (ground truth):
/** 
 * Returns a sorted map consisting of the bean properties of a component
 * @param currComp the component
 * @return the sorted map of properties
 */
public static Map<String,String> getMapOfComponentProperties(final Object currComp){
  PropertyDescriptor[] propertyDescriptors=PropertyUtils.getPropertyDescriptors(currComp);
  Map<String,String> componentProperties=new TreeMap<String,String>();
  for (int i=0; i < propertyDescriptors.length; i++) {
    PropertyDescriptor pd=propertyDescriptors[i];
    String propertyName=pd.getName();
    try {
      Method readMethod=pd.getReadMethod();
      if (readMethod != null) {
        componentProperties.put(propertyName,getPropertyValue(currComp,propertyName));
      }
 else {
        componentProperties.put(propertyName,"String_Node_Str");
      }
    }
 catch (    Exception e) {
      log.warn("String_Node_Str" + propertyName + "String_Node_Str"+ currComp.toString()+ "String_Node_Str",e);
      componentProperties.put(propertyName,"String_Node_Str");
    }
  }
  return componentProperties;
}
Program: 95707
Project: 95707
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public boolean isFallBackEventMatching(List eventObjects,Object graphicsComponent){
  return false;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public boolean isFallBackEventMatching(List eventObjects,Object graphicsComponent){
  int clickEventCount=0;
  for (  Object object : eventObjects) {
    Event e=(Event)object;
    if (e != null && e.getEventType().equals(MouseEvent.MOUSE_CLICKED)) {
      clickEventCount++;
    }
  }
  return clickEventCount == m_clickOptions.getClickCount();
}
Program: 95708
Project: 95708
Buggy source:
/** 
 * Calculates the timeout for a Show Text Action
 * @param messageCap The message cap
 * @return The timeout to use, or -1 if the timeout cannot be calculated
 */
private int calculateShowTextTimeout(MessageCap messageCap){
  MessageParam textParam=(MessageParam)messageCap.getMessageParams().get(0);
  MessageParam timePerWordParam=(MessageParam)messageCap.getMessageParams().get(2);
  try {
    int numWords=StringParsing.countWords(textParam.getValue());
    return Integer.parseInt(timePerWordParam.getValue()) * numWords;
  }
 catch (  NumberFormatException e) {
    LOG.warn(Messages.ErrorParsingTimeoutParameter + StringConstants.DOT + StringConstants.SPACE+ Messages.UsingDefaultValue+ StringConstants.DOT,e);
  }
  return -1;
}

Fixed version (ground truth):
/** 
 * Calculates the timeout for a Show Text Action
 * @param messageCap The message cap
 * @return The timeout to use, or -1 if the timeout cannot be calculated
 */
private int calculateShowTextTimeout(MessageCap messageCap){
  MessageParam textParam=messageCap.getMessageParams().get(0);
  MessageParam timePerWordParam=messageCap.getMessageParams().get(2);
  try {
    int numWords=StringParsing.countWords(textParam.getValue());
    return Integer.parseInt(timePerWordParam.getValue()) * numWords;
  }
 catch (  NumberFormatException e) {
    LOG.warn(Messages.ErrorParsingTimeoutParameter + StringConstants.DOT + StringConstants.SPACE+ Messages.UsingDefaultValue+ StringConstants.DOT,e);
  }
  return -1;
}
Program: 95709
Project: 95709
Buggy source:
/** 
 * Calculates the request timeout. Important if an action has a higher timeout than the standard request timeout.
 * @param messageCap the MessageCap
 * @return the calculated timeout.
 */
private int calculateRequestTimeout(MessageCap messageCap){
  List<Integer> timeOuts=new ArrayList<Integer>();
  IParamDescriptionPO desc1=m_currentCap.getParameterForUniqueId(COMP_SYSTEM_TIMEOUT);
  timeOuts.add(m_currentCap.getParameterList().indexOf(desc1));
  desc1=m_currentCap.getParameterForUniqueId("String_Node_Str");
  timeOuts.add(m_currentCap.getParameterList().indexOf(desc1));
  int timeout=0;
  for (  int index : timeOuts) {
    if (index > -1) {
      final MessageParam param=(MessageParam)messageCap.getMessageParams().get(index);
      final String paramTimeOut=param.getValue();
      timeout+=Integer.parseInt(paramTimeOut);
    }
  }
  boolean isShowText=messageCap.getMethod().equals("String_Node_Str");
  if (isShowText) {
    int showTextTimeout=calculateShowTextTimeout(messageCap);
    if (showTextTimeout != -1) {
      timeout+=showTextTimeout;
    }
  }
  return m_requestTimeout + timeout;
}

Fixed version (ground truth):
/** 
 * Calculates the request timeout. Important if an action has a higher timeout than the standard request timeout.
 * @param messageCap the MessageCap
 * @return the calculated timeout.
 */
private int calculateRequestTimeout(MessageCap messageCap){
  List<Integer> timeOuts=new ArrayList<Integer>();
  IParamDescriptionPO desc1=m_currentCap.getParameterForUniqueId(COMP_SYSTEM_TIMEOUT);
  timeOuts.add(m_currentCap.getParameterList().indexOf(desc1));
  desc1=m_currentCap.getParameterForUniqueId("String_Node_Str");
  timeOuts.add(m_currentCap.getParameterList().indexOf(desc1));
  int timeout=0;
  for (  int index : timeOuts) {
    if (index > -1) {
      final MessageParam param=messageCap.getMessageParams().get(index);
      final String paramTimeOut=param.getValue();
      timeout+=Integer.parseInt(paramTimeOut);
    }
  }
  boolean isShowText=messageCap.getMethod().equals("String_Node_Str");
  if (isShowText) {
    int showTextTimeout=calculateShowTextTimeout(messageCap);
    if (showTextTimeout != -1) {
      timeout+=showTextTimeout;
    }
  }
  return m_requestTimeout + timeout;
}
Program: 95710
Project: 95710
Buggy source:
/** 
 * minimzes the component name, e.g. javax.swing.JButton_1 to Button_1
 * @param capName String
 * @return the minimized CapName
 */
private String minimizeCapName(String capName){
  String minCapName=capName;
  String[] nameParts=null;
  nameParts=minCapName.split("String_Node_Str",2);
  if (nameParts[0].lastIndexOf("String_Node_Str") > -1 && nameParts[0].length() > (nameParts[0].lastIndexOf("String_Node_Str") + 1)) {
    nameParts[0]=nameParts[0].substring(nameParts[0].lastIndexOf("String_Node_Str") + 1);
  }
  minCapName=nameParts[0];
  if (nameParts.length > 1) {
    minCapName=minCapName + "String_Node_Str" + nameParts[1];
  }
  return minCapName;
}

Fixed version (ground truth):
/** 
 * minimizes the component name, e.g. javax.swing.JButton_1 to Button_1
 * @param capName String
 * @return the minimized CapName
 */
private String minimizeCapName(String capName){
  String minCapName=capName;
  String[] nameParts=null;
  nameParts=minCapName.split("String_Node_Str",2);
  if (nameParts[0].lastIndexOf("String_Node_Str") > -1 && nameParts[0].length() > (nameParts[0].lastIndexOf("String_Node_Str") + 1)) {
    nameParts[0]=nameParts[0].substring(nameParts[0].lastIndexOf("String_Node_Str") + 1);
  }
  minCapName=nameParts[0];
  if (nameParts.length > 1) {
    minCapName=minCapName + "String_Node_Str" + nameParts[1];
  }
  return minCapName;
}
Program: 95711
Project: 95711
Buggy source:
/** 
 * The default constructor 
 */
public MessageCap(){
  super();
  m_messageParams=new ArrayList();
}

Fixed version (ground truth):
/** 
 * The default constructor 
 */
public MessageCap(){
  super();
  m_messageParams=new ArrayList<MessageParam>();
}
Program: 95712
Project: 95712
Buggy source:
/** 
 * @return Returns the messageParams. 
 */
public List getMessageParams(){
  return m_messageParams;
}

Fixed version (ground truth):
/** 
 * @return Returns the messageParams. 
 */
public List<MessageParam> getMessageParams(){
  return m_messageParams;
}
Program: 95713
Project: 95713
Buggy source:
/** 
 * {@inheritDoc}
 */
public String toString(){
  StringBuilder builder=new StringBuilder();
  builder.append("String_Node_Str" + getMethod());
  builder.append("String_Node_Str" + getCi());
  builder.append("String_Node_Str");
  for (Iterator iterator=getMessageParams().iterator(); iterator.hasNext(); ) {
    MessageParam parameter=(MessageParam)iterator.next();
    builder.append(parameter.getValue() + "String_Node_Str");
  }
  if (getPostExecutionCommand() != null) {
    builder.append("String_Node_Str");
    builder.append(getPostExecutionCommand().getClass().getCanonicalName());
  }
  return builder.toString();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public String toString(){
  StringBuilder builder=new StringBuilder();
  builder.append("String_Node_Str" + getMethod());
  builder.append("String_Node_Str" + getCi());
  builder.append("String_Node_Str");
  for (Iterator<MessageParam> iterator=getMessageParams().iterator(); iterator.hasNext(); ) {
    MessageParam parameter=iterator.next();
    builder.append(parameter.getValue() + "String_Node_Str");
  }
  if (getPostExecutionCommand() != null) {
    builder.append("String_Node_Str");
    builder.append(getPostExecutionCommand().getClass().getCanonicalName());
  }
  return builder.toString();
}
Program: 95715
Project: 95715
Buggy source:
/** 
 * Creates a new method invoker.
 * @param messageCap The message data
 * @throws MethodParamException If the action method parameters cannot be evaluated successfully.
 */
public MethodInvoker(MessageCap messageCap) throws MethodParamException {
  m_methodParams=new MethodParams();
  List paramList=messageCap.getMessageParams();
  for (Iterator it=paramList.iterator(); it.hasNext(); ) {
    MessageParam param=(MessageParam)it.next();
    m_methodParams.add(param);
  }
  m_messageCap=messageCap;
}

Fixed version (ground truth):
/** 
 * Creates a new method invoker.
 * @param messageCap The message data
 * @throws MethodParamException If the action method parameters cannot be evaluated successfully.
 */
public MethodInvoker(MessageCap messageCap) throws MethodParamException {
  m_methodParams=new MethodParams();
  List<MessageParam> paramList=messageCap.getMessageParams();
  for (Iterator<MessageParam> it=paramList.iterator(); it.hasNext(); ) {
    MessageParam param=it.next();
    m_methodParams.add(param);
  }
  m_messageCap=messageCap;
}
Program: 95716
Project: 95716
Buggy source:
/** 
 * constructor to add the stage which has focus to our event confirming mechanism
 */
public JavaFXApplicationTester(){
  RobotJavaFXImpl robot=((RobotJavaFXImpl)getRobot());
  Stage focusStage=CurrentStages.getfocusStage();
  robot.getInterceptor().addSceneGraph(focusStage.getScene().windowProperty());
}

Fixed version (ground truth):
/** 
 * constructor to add the stage which has focus to our event confirming mechanism
 */
public JavaFXApplicationTester(){
  for (  Stage s : CurrentStages.getStageList()) {
    ((RobotJavaFXImpl)getRobot()).getInterceptor().addSceneGraph(s.getScene().windowProperty());
  }
}
Program: 95717
Project: 95717
Buggy source:
/** 
 * @param original The original, or base, image.
 * @return the "cut" version of the image. Client should not dispose this image.
 */
public static Image getCutImage(Image original){
  Image cutImage=GENERATED_IMAGES.get(original);
  if (cutImage == null) {
    cutImage=new Image(original.getDevice(),original,SWT.IMAGE_GRAY);
    GENERATED_IMAGES.put(original,cutImage);
  }
  return cutImage;
}

Fixed version (ground truth):
/** 
 * @param original The original, or base, image.
 * @return the "cut" version of the image. Client should not dispose this image.
 */
public static Image getCutImage(Image original){
  Image cutImage=GRAYED_IMAGES.get(original);
  if (cutImage == null) {
    cutImage=new Image(original.getDevice(),original,SWT.IMAGE_GRAY);
    GRAYED_IMAGES.put(original,cutImage);
  }
  return cutImage;
}
Program: 95718
Project: 95718
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public boolean isFallBackEventMatching(List eventObjects,Object graphicsComponent){
  int clickEventCount=0;
  for (  Object object : eventObjects) {
    Event e=(Event)object;
    if (e != null && e.getEventType().equals(MouseEvent.MOUSE_CLICKED)) {
      clickEventCount++;
    }
  }
  return clickEventCount == m_clickOptions.getClickCount();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public boolean isFallBackEventMatching(List eventObjects,Object graphicsComponent){
  List<MouseEvent> catchedEvents=new ArrayList<MouseEvent>();
  for (  Object object : eventObjects) {
    Event e=(Event)object;
    if (e != null && e.getEventType().equals(MouseEvent.MOUSE_CLICKED)) {
      catchedEvents.add((MouseEvent)e);
    }
  }
  for (int i=0; i < catchedEvents.size(); i++) {
    int clickEventCount=getClickCount(catchedEvents.get(i));
    for (int j=(i + 1); j < catchedEvents.size(); j++) {
      if (catchedEvents.get(i).getSource().equals(catchedEvents.get(j).getSource())) {
        clickEventCount+=getClickCount(catchedEvents.get(j));
      }
    }
    if (clickEventCount == m_clickOptions.getClickCount()) {
      return true;
    }
  }
  return false;
}
Program: 95719
Project: 95719
Buggy source:
/** 
 * Gets the rendered text of a TreeTableCell
 * @param node this can be a cell or a tree item
 * @param col if node is a tree item this parameter is used to find the cell to get the rendered text from
 * @return the rendered text
 */
private String getRenderedTextFromCell(final Object node,final int col){
  String result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<String>(){
    @Override public String call() throws Exception {
      if (node instanceof TreeTableCell) {
        TreeTableCell<?,?> cell=(TreeTableCell<?,?>)node;
        return cell.getText();
      }
 else       if (node instanceof TreeItem) {
        TreeItem<?> item=(TreeItem<?>)node;
        TreeTableView<?> treeTable=getTree();
        List<TreeTableCell> cells=new NodeTraverseHelper<TreeTableCell>().getInstancesOf(treeTable,TreeTableCell.class);
        for (        TreeTableCell<?,?> cell : cells) {
          TreeTableRow<?> ttRow=cell.getTreeTableRow();
          if (ttRow == null) {
            continue;
          }
          TreeItem<?> checkItem=ttRow.getTreeItem();
          if (checkItem == null) {
            continue;
          }
          if (item != null && checkItem.equals(item) && treeTable.getColumns().indexOf(cell.getTableColumn()) == col) {
            return cell.getText();
          }
        }
      }
      return null;
    }
  }
);
  return result;
}

Fixed version (ground truth):
/** 
 * Gets the rendered text of a TreeTableCell
 * @param node this can be a cell or a tree item
 * @param col if node is a tree item this parameter is used to find the cell to get the rendered text from
 * @return the rendered text
 */
private String getRenderedTextFromCell(final Object node,final int col){
  if (node instanceof TreeItem<?>) {
    scrollNodeToVisible(node);
  }
  String result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<String>(){
    @Override public String call() throws Exception {
      if (node instanceof TreeTableCell) {
        TreeTableCell<?,?> cell=(TreeTableCell<?,?>)node;
        return cell.getText();
      }
 else       if (node instanceof TreeItem) {
        TreeItem<?> item=(TreeItem<?>)node;
        TreeTableView<?> treeTable=getTree();
        List<TreeTableCell> cells=new NodeTraverseHelper<TreeTableCell>().getInstancesOf(treeTable,TreeTableCell.class);
        for (        TreeTableCell<?,?> cell : cells) {
          TreeTableRow<?> ttRow=cell.getTreeTableRow();
          if (ttRow == null) {
            continue;
          }
          TreeItem<?> checkItem=ttRow.getTreeItem();
          if (checkItem == null) {
            continue;
          }
          if (item != null && checkItem.equals(item) && treeTable.getColumns().indexOf(cell.getTableColumn()) == col) {
            return cell.getText();
          }
        }
      }
      return null;
    }
  }
);
  return result;
}
Program: 95720
Project: 95720
Buggy source:
@Override public int getIndexOfChild(final Object parent,final Object child){
  return EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Integer>(){
    @Override public Integer call() throws Exception {
      return ((TreeItem<?>)parent).getChildren().indexOf(child);
    }
  }
);
}

Fixed version (ground truth):
@Override public int getIndexOfChild(final Object parent,final Object child){
  return EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Integer>(){
    @Override public Integer call() throws Exception {
      if (parent == null) {
        Object[] rootNodes=getRootNodes();
        for (int i=0; i < rootNodes.length; i++) {
          if (ObjectUtils.equals(rootNodes[i],child)) {
            return i;
          }
        }
        return -1;
      }
      List<?> children=((TreeItem<?>)parent).getChildren();
      if (children.contains(child)) {
        return children.indexOf(child);
      }
      return -1;
    }
  }
);
}
Program: 95721
Project: 95721
Buggy source:
@Override public Integer call() throws Exception {
  return ((TreeItem<?>)parent).getChildren().indexOf(child);
}

Fixed version (ground truth):
@Override public Integer call() throws Exception {
  if (parent == null) {
    Object[] rootNodes=getRootNodes();
    for (int i=0; i < rootNodes.length; i++) {
      if (ObjectUtils.equals(rootNodes[i],child)) {
        return i;
      }
    }
    return -1;
  }
  List<?> children=((TreeItem<?>)parent).getChildren();
  if (children.contains(child)) {
    return children.indexOf(child);
  }
  return -1;
}
Program: 95722
Project: 95722
Buggy source:
/** 
 * @return the IMenuAdapter.
 * @throws StepExecutionException if the active window has no menu bar.
 */
protected IMenuComponent getAndCheckMenu() throws StepExecutionException {
  Object menu=getMenuAdapter().getRealComponent();
  if (menu == null) {
    throw new StepExecutionException(I18n.getString(TestErrorEvent.NO_MENU_BAR),EventFactory.createActionError(TestErrorEvent.NO_MENU_BAR));
  }
  return getMenuAdapter();
}

Fixed version (ground truth):
/** 
 * @return the IMenuAdapter.
 * @throws StepExecutionException if the active window has no menu bar.
 */
protected IMenuComponent getAndCheckMenu() throws StepExecutionException {
  IMenuComponent menuAdapter=getMenuAdapter();
  if (menuAdapter == null || menuAdapter.getRealComponent() == null) {
    throw new StepExecutionException(I18n.getString(TestErrorEvent.NO_MENU_BAR),EventFactory.createActionError(TestErrorEvent.NO_MENU_BAR));
  }
  return menuAdapter;
}
Program: 95723
Project: 95723
Buggy source:
/** 
 * implementation for "wait for component"
 * @param timeout the maximum amount of time to wait for the component
 * @param delay the time to wait after the component is found
 */
public void waitForComponent(int timeout,int delay){
  if (getComponent().getRealComponent() == null) {
    long start=System.currentTimeMillis();
    do {
      RobotTiming.sleepWaitForComponentPollingDelay();
    }
 while (System.currentTimeMillis() - start < timeout && getComponent().getRealComponent() == null);
    if (getComponent().getRealComponent() == null) {
      throw new StepExecutionException("String_Node_Str",EventFactory.createComponentNotFoundErrorEvent());
    }
  }
  TimeUtil.delay(delay);
}

Fixed version (ground truth):
/** 
 * implementation for "wait for component"
 * @param timeout the maximum amount of time to wait for the component
 * @param delay the time to wait after the component is found
 */
public void waitForComponent(int timeout,int delay){
  IComponent component=getComponent();
  if (component == null || component.getRealComponent() == null) {
    long start=System.currentTimeMillis();
    do {
      RobotTiming.sleepWaitForComponentPollingDelay();
      component=getComponent();
    }
 while (System.currentTimeMillis() - start < timeout && (component == null || component.getRealComponent() == null));
    if (component == null || component.getRealComponent() == null) {
      throw new StepExecutionException("String_Node_Str",EventFactory.createComponentNotFoundErrorEvent());
    }
  }
  TimeUtil.delay(delay);
}
Program: 95724
Project: 95724
Buggy source:
/** 
 * Looks for the bundle with the given ID and the highest Version. This search  also includes non active bundles.
 * @param bundleId the bundle ID to look for
 * @return the bundle
 */
private static Bundle bundleLookupWithInactive(String bundleId){
  Bundle[] bundles=EclipseStarter.getSystemBundleContext().getBundles();
  Bundle result=null;
  Version currVersion=Version.emptyVersion;
  for (  Bundle bundle : bundles) {
    if (bundle.getSymbolicName().contains(bundleId) && bundle.getVersion().compareTo(currVersion) > 0) {
      result=bundle;
      currVersion=bundle.getVersion();
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Looks for the bundle with the given ID and the highest Version. This search  also includes non active bundles.
 * @param bundleId the bundle ID to look for
 * @return the bundle
 */
private static Bundle bundleLookupWithInactive(String bundleId){
  Bundle[] bundles=EclipseStarter.getSystemBundleContext().getBundles();
  Bundle result=null;
  Version currVersion=Version.emptyVersion;
  for (  Bundle bundle : bundles) {
    if (bundle.getSymbolicName().equals(bundleId) && bundle.getVersion().compareTo(currVersion) > 0) {
      result=bundle;
      currVersion=bundle.getVersion();
    }
  }
  return result;
}
Program: 95725
Project: 95725
Buggy source:
@Override protected Cell getCellAtMousePosition() throws StepExecutionException {
  final Point p=getRobot().getCurrentMousePosition();
  Cell result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Cell>(){
    @Override public Cell call() throws Exception {
      TableView<?> table=(TableView<?>)getRealComponent();
      table.layout();
      List<? extends TableCell> tCells=ComponentHandler.getAssignableFrom(TableCell.class);
      for (      TableCell<?,?> cell : tCells) {
        if (NodeBounds.getAbsoluteBounds(cell).contains(p) && cell.getTableView().equals(table)) {
          TableColumn cellColumn=cell.getTableColumn();
          int col=table.getVisibleLeafIndex(cellColumn);
          return new Cell(cell.getIndex(),col);
        }
      }
      return null;
    }
  }
);
  return result;
}

Fixed version (ground truth):
@Override protected Cell getCellAtMousePosition() throws StepExecutionException {
  final Point p=getRobot().getCurrentMousePosition();
  Cell result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Cell>(){
    @Override public Cell call() throws Exception {
      TableView<?> table=(TableView<?>)getRealComponent();
      table.layout();
      List<? extends TableCell> tCells=ComponentHandler.getAssignableFrom(TableCell.class);
      for (      TableCell<?,?> cell : tCells) {
        if (NodeBounds.checkIfContains(new Point2D(p.x,p.y),cell) && cell.getTableView().equals(table)) {
          TableColumn cellColumn=cell.getTableColumn();
          int col=table.getVisibleLeafIndex(cellColumn);
          return new Cell(cell.getIndex(),col);
        }
      }
      return null;
    }
  }
);
  return result;
}
Program: 95728
Project: 95728
Buggy source:
/** 
 * {@inheritDoc}
 */
public boolean isFallBackEventMatching(List eventObjects,Object comp){
  return false;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public boolean isFallBackEventMatching(List eventObjects,Object comp){
  if (comp instanceof CCombo) {
    CCombo combo=(CCombo)comp;
    for (    Object o : eventObjects) {
      Event e=(Event)o;
      Widget w=e.widget;
      if (w instanceof Control) {
        final Control c=(Control)w;
        Composite parent=(Composite)new EventThreadQueuerSwtImpl().invokeAndWait("String_Node_Str",new IRunnable(){
          public Object run(){
            return c.getParent();
          }
        }
);
        if (parent == combo && isMatching(e)) {
          return true;
        }
      }
    }
  }
  return false;
}
Program: 95730
Project: 95730
Buggy source:
/** 
 * Returns the node under the given point
 * @param pos the point
 * @return the component
 */
public static Node getComponentByPos(Point2D pos){
  List<? extends Window> comps=getAssignableFrom(Window.class);
  List<Node> matches=new ArrayList<Node>();
  for (  Window window : comps) {
    if (window.isFocused() && window.isShowing()) {
      Parent root=window.getScene().getRoot();
      matches=getAllNodesforPos(root,pos,matches);
    }
  }
  List<Node> result=new ArrayList<Node>();
  for (  Node n : matches) {
    if (n.getScene() == null || !isSupported(n.getClass()) || !n.isVisible()) {
      continue;
    }
    boolean add=true;
    Parent parent=n.getParent();
    while (parent != null) {
      if (parent instanceof Skinnable) {
        if (isContentNode(n,parent)) {
          break;
        }
        Skin<?> skin=((Skinnable)parent).getSkin();
        if (skin instanceof SkinBase) {
          if (isSkinNode(n,(SkinBase<?>)skin)) {
            add=false;
            break;
          }
        }
 else {
          parent=parent.getParent();
        }
      }
 else {
        parent=parent.getParent();
      }
    }
    if (add) {
      result.add(n);
    }
  }
  if (result.size() == 0) {
    return null;
  }
  if (result.size() == 1) {
    return result.get(0);
  }
  return filterMatches(result);
}

Fixed version (ground truth):
/** 
 * Returns the node under the given point
 * @param pos the point
 * @return the component
 */
public static Node getComponentByPos(Point2D pos){
  List<? extends Window> comps=getAssignableFrom(Window.class);
  List<Node> matches=new ArrayList<Node>();
  for (  Window window : comps) {
    if (window.isFocused() && window.isShowing()) {
      Parent root=window.getScene().getRoot();
      matches=getAllNodesforPos(root,pos,matches);
    }
  }
  List<Node> result=new ArrayList<Node>();
  for (  Node n : matches) {
    if (n.getScene() == null || !isSupported(n.getClass()) || !n.isVisible()) {
      continue;
    }
    boolean add=true;
    Parent parent=n.getParent();
    while (parent != null) {
      if (parent instanceof Skinnable || isContainer(parent)) {
        if (isContentNode(n,parent)) {
          break;
        }
        Skin<?> skin=((Skinnable)parent).getSkin();
        if (skin instanceof SkinBase) {
          if (isSkinNode(n,(SkinBase<?>)skin)) {
            add=false;
            break;
          }
        }
 else {
          parent=parent.getParent();
        }
      }
 else {
        parent=parent.getParent();
      }
    }
    if (add) {
      result.add(n);
    }
  }
  if (result.size() == 0) {
    return null;
  }
  if (result.size() == 1) {
    return result.get(0);
  }
  return filterMatches(result);
}
Program: 95731
Project: 95731
Buggy source:
@Override public Node[] call() throws Exception {
  if (item.isDisable()) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.MENU_ITEM_NOT_ENABLED));
  }
  Parent p=(Parent)item.getParentPopup().getSkin().getNode();
  List<Node> ctxtMCont=p.getChildrenUnmodifiable();
  VBox mBox=null;
  for (  Node node : ctxtMCont) {
    if (node instanceof VBox) {
      mBox=(VBox)node;
      break;
    }
  }
  int itemIndex=item.getParentPopup().getItems().indexOf(item);
  Node itemNode=mBox.getChildrenUnmodifiable().get(itemIndex);
  Node itemOwner=item.getParentPopup().getOwnerNode();
  return new Node[]{itemNode,itemOwner};
}

Fixed version (ground truth):
@Override public Node[] call() throws Exception {
  if (item.isDisable()) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.MENU_ITEM_NOT_ENABLED));
  }
  Parent p=(Parent)item.getParentPopup().getSkin().getNode();
  List<Node> ctxtMCont=p.getChildrenUnmodifiable();
  VBox mBox=null;
  for (  Node node : ctxtMCont) {
    if (node instanceof VBox) {
      mBox=(VBox)node;
      break;
    }
  }
  if (mBox == null) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.POPUP_NOT_FOUND));
  }
  int itemIndex=item.getParentPopup().getItems().indexOf(item);
  Node itemNode=mBox.getChildrenUnmodifiable().get(itemIndex);
  Node itemOwner=item.getParentPopup().getOwnerNode();
  return new Node[]{itemNode,itemOwner};
}
Program: 95732
Project: 95732
Buggy source:
/** 
 * Clicks on a menu item
 */
protected void clickMenuItem(){
  final IRobot robot=getRobot();
  final MenuItem item=getRealComponent();
  Node[] nodes=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Node[]>(){
    @Override public Node[] call() throws Exception {
      if (item.isDisable()) {
        throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.MENU_ITEM_NOT_ENABLED));
      }
      Parent p=(Parent)item.getParentPopup().getSkin().getNode();
      List<Node> ctxtMCont=p.getChildrenUnmodifiable();
      VBox mBox=null;
      for (      Node node : ctxtMCont) {
        if (node instanceof VBox) {
          mBox=(VBox)node;
          break;
        }
      }
      int itemIndex=item.getParentPopup().getItems().indexOf(item);
      Node itemNode=mBox.getChildrenUnmodifiable().get(itemIndex);
      Node itemOwner=item.getParentPopup().getOwnerNode();
      return new Node[]{itemNode,itemOwner};
    }
  }
);
  if (nodes[1] != null && nodes[1] instanceof MenuButton) {
    robot.click(nodes[0],null,ClickOptions.create().setFirstHorizontal(false));
  }
 else {
    robot.click(nodes[0],null);
  }
}

Fixed version (ground truth):
/** 
 * Clicks on a menu item
 */
protected void clickMenuItem(){
  final IRobot robot=getRobot();
  final MenuItem item=getRealComponent();
  Node[] nodes=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Node[]>(){
    @Override public Node[] call() throws Exception {
      if (item.isDisable()) {
        throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.MENU_ITEM_NOT_ENABLED));
      }
      Parent p=(Parent)item.getParentPopup().getSkin().getNode();
      List<Node> ctxtMCont=p.getChildrenUnmodifiable();
      VBox mBox=null;
      for (      Node node : ctxtMCont) {
        if (node instanceof VBox) {
          mBox=(VBox)node;
          break;
        }
      }
      if (mBox == null) {
        throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.POPUP_NOT_FOUND));
      }
      int itemIndex=item.getParentPopup().getItems().indexOf(item);
      Node itemNode=mBox.getChildrenUnmodifiable().get(itemIndex);
      Node itemOwner=item.getParentPopup().getOwnerNode();
      return new Node[]{itemNode,itemOwner};
    }
  }
);
  if (nodes[1] != null && nodes[1] instanceof MenuButton) {
    robot.click(nodes[0],null,ClickOptions.create().setFirstHorizontal(false));
  }
 else {
    robot.click(nodes[0],null);
  }
}
Program: 95734
Project: 95734
Buggy source:
/** 
 * {@inheritDoc}
 */
public Object execute(ExecutionEvent event) throws ExecutionException {
  ISelection selection=HandlerUtil.getCurrentSelection(event);
  IStructuredSelection structuredSelection=null;
  if (selection instanceof IStructuredSelection) {
    structuredSelection=(IStructuredSelection)selection;
  }
  List<ITestResultSummaryPO> selectedSummaryList=new ArrayList<ITestResultSummaryPO>(structuredSelection.size());
  if (Persistor.instance() != null) {
    List<Number> idsWithDetails=TestResultPM.computeTestresultIdsWithDetails(GeneralStorage.getInstance().getMasterSession());
    for (    Object selectedElement : structuredSelection.toArray()) {
      if (selectedElement instanceof ITestResultSummaryPO && idsWithDetails.contains(((ITestResultSummaryPO)selectedElement).getId())) {
        selectedSummaryList.add((ITestResultSummaryPO)selectedElement);
      }
    }
  }
  final ITestResultSummaryPO[] selectedSummaries=selectedSummaryList.toArray(new ITestResultSummaryPO[selectedSummaryList.size()]);
  if (selectedSummaries.length == 0) {
    MessageDialog.openInformation(HandlerUtil.getActiveShell(event),"String_Node_Str","String_Node_Str");
    return null;
  }
  Job exportJob=new ExportTestResultsJob(selectedSummaries,RWT.getRequest().getContextPath() + RWT.getRequest().getServletPath(),Display.getCurrent(),RWT.getResponse());
  exportJob.setUser(true);
  JobUtils.executeJob(exportJob,HandlerUtil.getActivePart(event));
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public Object execute(ExecutionEvent event) throws ExecutionException {
  ISelection selection=HandlerUtil.getCurrentSelection(event);
  IStructuredSelection structuredSelection=null;
  if (selection instanceof IStructuredSelection) {
    structuredSelection=(IStructuredSelection)selection;
  }
  List<ITestResultSummaryPO> selectedSummaryList=new ArrayList<ITestResultSummaryPO>(structuredSelection.size());
  if (Persistor.instance() != null) {
    for (    Object selectedElement : structuredSelection.toArray()) {
      if (selectedElement instanceof ITestResultSummaryPO) {
        ITestResultSummaryPO summary=(ITestResultSummaryPO)selectedElement;
        if (summary.hasTestResultDetails()) {
          selectedSummaryList.add(summary);
        }
      }
    }
  }
  final ITestResultSummaryPO[] selectedSummaries=selectedSummaryList.toArray(new ITestResultSummaryPO[selectedSummaryList.size()]);
  if (selectedSummaries.length == 0) {
    MessageDialog.openInformation(HandlerUtil.getActiveShell(event),"String_Node_Str","String_Node_Str");
    return null;
  }
  Job exportJob=new ExportTestResultsJob(selectedSummaries,RWT.getRequest().getContextPath() + RWT.getRequest().getServletPath(),Display.getCurrent(),RWT.getResponse());
  exportJob.setUser(true);
  JobUtils.executeJob(exportJob,HandlerUtil.getActivePart(event));
  return null;
}
Program: 95735
Project: 95735
Buggy source:
/** 
 * @return a list of pending summaries
 */
protected List<ITestResultSummaryPO> getPendingSummaries(){
  final List<ITestResultSummaryPO> pendingSummaries=new LinkedList<ITestResultSummaryPO>();
  Iterator<Object> iterator=getSelection().iterator();
  while (iterator.hasNext()) {
    Object o=iterator.next();
    if (o instanceof ITestResultSummaryPO) {
      ITestResultSummaryPO summary=(ITestResultSummaryPO)o;
      if (TestResultPM.hasTestResultDetails(GeneralStorage.getInstance().getMasterSession(),summary.getId()) && AlmReportStatus.NOT_YET_REPORTED.equals(summary.getAlmReportStatus())) {
        pendingSummaries.add(summary);
      }
    }
  }
  return pendingSummaries;
}

Fixed version (ground truth):
/** 
 * @return a list of pending summaries
 */
protected List<ITestResultSummaryPO> getPendingSummaries(){
  final List<ITestResultSummaryPO> pendingSummaries=new LinkedList<ITestResultSummaryPO>();
  Iterator<Object> iterator=getSelection().iterator();
  while (iterator.hasNext()) {
    Object o=iterator.next();
    if (o instanceof ITestResultSummaryPO) {
      ITestResultSummaryPO summary=(ITestResultSummaryPO)o;
      if (summary.hasTestResultDetails() && AlmReportStatus.NOT_YET_REPORTED.equals(summary.getAlmReportStatus())) {
        pendingSummaries.add(summary);
      }
    }
  }
  return pendingSummaries;
}
Program: 95736
Project: 95736
Buggy source:
/** 
 * {@inheritDoc}
 */
public void init(IWorkbench workbench,IStructuredSelection selection){
  setNeedsProgressMonitor(true);
  List<ITestResultSummaryPO> selectedSummaryList=new ArrayList<ITestResultSummaryPO>(selection.size());
  if (Persistor.instance() != null) {
    List<Number> idsWithDetails=TestResultPM.computeTestresultIdsWithDetails(GeneralStorage.getInstance().getMasterSession());
    for (    Object selectedElement : selection.toArray()) {
      if (selectedElement instanceof ITestResultSummaryPO && idsWithDetails.contains(((ITestResultSummaryPO)selectedElement).getId())) {
        selectedSummaryList.add((ITestResultSummaryPO)selectedElement);
      }
    }
  }
  m_selectedSummaries=selectedSummaryList.toArray(new ITestResultSummaryPO[selectedSummaryList.size()]);
  setWindowTitle(NLS.bind(Messages.ExportTestResultDetailsWizardWindowTitle,m_selectedSummaries.length));
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void init(IWorkbench workbench,IStructuredSelection selection){
  setNeedsProgressMonitor(true);
  List<ITestResultSummaryPO> selectedSummaryList=new ArrayList<ITestResultSummaryPO>(selection.size());
  if (Persistor.instance() != null) {
    for (    Object selectedElement : selection.toArray()) {
      if (selectedElement instanceof ITestResultSummaryPO && ((ITestResultSummaryPO)selectedElement).hasTestResultDetails()) {
        selectedSummaryList.add((ITestResultSummaryPO)selectedElement);
      }
    }
  }
  m_selectedSummaries=selectedSummaryList.toArray(new ITestResultSummaryPO[selectedSummaryList.size()]);
  setWindowTitle(NLS.bind(Messages.ExportTestResultDetailsWizardWindowTitle,m_selectedSummaries.length));
}
Program: 95737
Project: 95737
Buggy source:
/** 
 * @param event the execution event
 * @param session the session to use
 * @throws ExecutionException
 * @return the input if found - otherwise null
 */
private IEditorInput getEditorInputFromTestResultSummaryView(ExecutionEvent event,EntityManager session) throws ExecutionException {
  IStructuredSelection structuredSel=getSelection();
  Iterator selectedTestResultSummaries=structuredSel.iterator();
  IEditorInput editorInput=null;
  while (selectedTestResultSummaries.hasNext()) {
    Object firstElement=selectedTestResultSummaries.next();
    if (firstElement instanceof ITestResultSummaryPO) {
      ITestResultSummaryPO result=(ITestResultSummaryPO)firstElement;
      if (TestResultPM.hasTestResultDetails(session,result.getId())) {
        editorInput=new TestResultEditorInput(result);
      }
    }
 else {
      LOG.info(Messages.SelectedElementIsNotTestResultSummary + StringConstants.DOT);
    }
  }
  return editorInput;
}

Fixed version (ground truth):
/** 
 * @param event the execution event
 * @param session the session to use
 * @throws ExecutionException
 * @return the input if found - otherwise null
 */
private IEditorInput getEditorInputFromTestResultSummaryView(ExecutionEvent event,EntityManager session) throws ExecutionException {
  IStructuredSelection structuredSel=getSelection();
  Iterator selectedTestResultSummaries=structuredSel.iterator();
  IEditorInput editorInput=null;
  while (selectedTestResultSummaries.hasNext()) {
    Object firstElement=selectedTestResultSummaries.next();
    if (firstElement instanceof ITestResultSummaryPO) {
      ITestResultSummaryPO result=(ITestResultSummaryPO)firstElement;
      if (result.hasTestResultDetails()) {
        editorInput=new TestResultEditorInput(result);
      }
    }
 else {
      LOG.info(Messages.SelectedElementIsNotTestResultSummary + StringConstants.DOT);
    }
  }
  return editorInput;
}
Program: 95738
Project: 95738
Buggy source:
/** 
 * {@inheritDoc} 
 */
public boolean testImpl(Object receiver,String property,Object[] args){
  final GeneralStorage instance=GeneralStorage.getInstance();
  if (instance != null) {
    final EntityManager masterSession=instance.getMasterSession();
    if (masterSession.isOpen()) {
      ITestResultSummaryPO summary=(ITestResultSummaryPO)receiver;
      if (property.equals(HAS_MONITORING_DATA_PROP)) {
        return summary.isReportWritten();
      }
      if (property.equals(HAS_TEST_RESULT_DETAILS_PROP)) {
        return TestResultPM.hasTestResultDetails(masterSession,summary.getId());
      }
 else       if (property.equals(HAS_PENDING_ALM_REPORT_PROP)) {
        return hasPendingALMReport(summary,masterSession);
      }
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public boolean testImpl(Object receiver,String property,Object[] args){
  ITestResultSummaryPO summary=(ITestResultSummaryPO)receiver;
  if (property.equals(HAS_MONITORING_DATA_PROP)) {
    return summary.isReportWritten();
  }
  if (property.equals(HAS_TEST_RESULT_DETAILS_PROP)) {
    return summary.hasTestResultDetails();
  }
 else   if (property.equals(HAS_PENDING_ALM_REPORT_PROP)) {
    return hasPendingALMReport(summary);
  }
  return false;
}
Program: 95739
Project: 95739
Buggy source:
/** 
 * @param summary the summary to check
 * @param session the session to use
 * @return the pending status
 */
public static boolean hasPendingALMReport(ITestResultSummaryPO summary,final EntityManager session){
  return summary.isTestsuiteRelevant() && TestResultPM.hasTestResultDetails(session,summary.getId()) && summary.getAlmReportStatus() == AlmReportStatus.NOT_YET_REPORTED;
}

Fixed version (ground truth):
/** 
 * @param summary the summary to check
 * @return the pending status
 */
public static boolean hasPendingALMReport(ITestResultSummaryPO summary){
  return summary.isTestsuiteRelevant() && summary.hasTestResultDetails() && summary.getAlmReportStatus() == AlmReportStatus.NOT_YET_REPORTED;
}
Program: 95740
Project: 95740
Buggy source:
/** 
 * @param tableViewer the table viewer
 */
private void addDetailsColumn(TableViewer tableViewer){
  TableViewerColumn column=new TableViewerColumn(tableViewer,SWT.NONE);
  column.getColumn().setWidth(70);
  column.getColumn().setToolTipText(Messages.TestresultSummaryColumnDescriptionDetails);
  column.getColumn().setText(TESTRESULT_SUMMARY_DETAILS_AVAILABLE);
  column.getColumn().setMoveable(true);
  column.setLabelProvider(new TestresultSummaryViewColumnLabelProvider(){
    public Image getImage(    Object element){
      String text=String.valueOf(m_detailedSummaryIds.contains(((ITestResultSummaryPO)element).getId()));
      if (text.equals(Boolean.TRUE.toString())) {
        return IconConstants.TRSV_DETAILS;
      }
      return IconConstants.TRSV_NODETAILS;
    }
    public String getText(    Object element){
      return null;
    }
  }
);
  createMenuItem(m_headerMenu,column.getColumn());
  new ColumnViewerSorter(tableViewer,column){
    @Override protected int doCompare(    Viewer viewer,    Object e1,    Object e2){
      return getCommonsComparator().compare(m_detailedSummaryIds.contains(((ITestResultSummaryPO)e1).getId()),m_detailedSummaryIds.contains(((ITestResultSummaryPO)e2).getId()));
    }
  }
;
}

Fixed version (ground truth):
/** 
 * @param tableViewer the table viewer
 */
private void addDetailsColumn(TableViewer tableViewer){
  TableViewerColumn column=new TableViewerColumn(tableViewer,SWT.NONE);
  column.getColumn().setWidth(70);
  column.getColumn().setToolTipText(Messages.TestresultSummaryColumnDescriptionDetails);
  column.getColumn().setText(TESTRESULT_SUMMARY_DETAILS_AVAILABLE);
  column.getColumn().setMoveable(true);
  column.setLabelProvider(new TestresultSummaryViewColumnLabelProvider(){
    public Image getImage(    Object element){
      if (((ITestResultSummaryPO)element).hasTestResultDetails()) {
        return IconConstants.TRSV_DETAILS;
      }
      return IconConstants.TRSV_NODETAILS;
    }
    public String getText(    Object element){
      return null;
    }
  }
);
  createMenuItem(m_headerMenu,column.getColumn());
  new ColumnViewerSorter(tableViewer,column){
    @Override protected int doCompare(    Viewer viewer,    Object e1,    Object e2){
      return getCommonsComparator().compare(((ITestResultSummaryPO)e1).hasTestResultDetails(),((ITestResultSummaryPO)e2).hasTestResultDetails());
    }
  }
;
}
Program: 95741
Project: 95741
Buggy source:
/** 
 * refresh view
 */
public void loadViewInput(){
  m_tableViewer.getControl().getDisplay().asyncExec(new Runnable(){
    public void run(){
      List<ITestResultSummaryPO> metaList;
      try {
        int maxNoOfDays=Plugin.getDefault().getPreferenceStore().getInt(Constants.MAX_NUMBER_OF_DAYS_KEY);
        Date startTime=DateUtils.addDays(new Date(),maxNoOfDays * -1);
        metaList=TestResultSummaryPM.findAllTestResultSummaries(startTime);
        if (Persistor.instance() != null) {
          m_detailedSummaryIds=TestResultPM.computeTestresultIdsWithDetails(GeneralStorage.getInstance().getMasterSession());
        }
        if (metaList != null) {
          m_tableViewer.setInput(metaList.toArray());
        }
      }
 catch (      JBException e) {
        String msg=Messages.CantLoadMetadataFromDatabase;
        log.error(msg,e);
        showErrorDialog(msg);
      }
      ISelection s=m_tableViewer.getSelection();
      m_tableViewer.setSelection(null);
      m_tableViewer.setSelection(s);
    }
  }
);
}

Fixed version (ground truth):
/** 
 * refresh view
 */
public void loadViewInput(){
  m_tableViewer.getControl().getDisplay().asyncExec(new Runnable(){
    public void run(){
      List<ITestResultSummaryPO> metaList;
      try {
        int maxNoOfDays=Plugin.getDefault().getPreferenceStore().getInt(Constants.MAX_NUMBER_OF_DAYS_KEY);
        Date startTime=DateUtils.addDays(new Date(),maxNoOfDays * -1);
        metaList=TestResultSummaryPM.findAllTestResultSummaries(startTime);
        if (metaList != null) {
          m_tableViewer.setInput(metaList.toArray());
        }
      }
 catch (      JBException e) {
        String msg=Messages.CantLoadMetadataFromDatabase;
        log.error(msg,e);
        showErrorDialog(msg);
      }
      ISelection s=m_tableViewer.getSelection();
      m_tableViewer.setSelection(null);
      m_tableViewer.setSelection(s);
    }
  }
);
}
Program: 95748
Project: 95748
Buggy source:
/** 
 * @param noRunMode String noRun option mode
 * @param step current step of noRun execution
 * @return true is no run execution must be finishedreturn false if test run without no-run option or the last step of no run execution is not jet reached
 */
public static boolean shouldExecutionStop(String noRunMode,TestExecutionConstants.runSteps step){
  if (StringUtils.isEmpty(noRunMode)) {
    return false;
  }
  return noRunMode.equals(step.getStepValue());
}

Fixed version (ground truth):
/** 
 * @param noRunMode String noRun option mode
 * @param step current step of noRun execution
 * @return true is no run execution must be finishedreturn false if test run without no-run option or the last step of no run execution is not jet reached
 */
public static boolean shouldExecutionStop(String noRunMode,TestExecutionConstants.RunSteps step){
  if (StringUtils.isEmpty(noRunMode)) {
    return false;
  }
  return noRunMode.equals(step.getStepValue());
}
Program: 95751
Project: 95751
Buggy source:
/** 
 * gets the default no run mode
 * @return the default no run mode
 */
private static String getDefaultNoRunMode(){
  final runSteps defaultMode=TestExecutionConstants.runSteps.CC;
  return defaultMode.getStepValue();
}

Fixed version (ground truth):
/** 
 * gets the default no run mode
 * @return the default no run mode
 */
private static String getDefaultNoRunMode(){
  final RunSteps defaultMode=TestExecutionConstants.RunSteps.CC;
  return defaultMode.getStepValue();
}