nus-yam/ex-repair huggingface dataset:
Program: 95450
Project: 95450
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void rcDropByTextPath(final String pathType,final int preAscend,final String treePath,final String operator,int delayBeforeDrop){
  Event wakeEvent=new Event();
  wakeEvent.type=SWT.MouseMove;
  getTreeTable().getDisplay().post(wakeEvent);
  waitForDisplayUpdate();
  SwtUtils.waitForDisplayIdle(getTreeTable().getDisplay());
  super.rcDropByTextPath(pathType,preAscend,treePath,operator,delayBeforeDrop);
  SwtUtils.waitForDisplayIdle(getTreeTable().getDisplay());
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void rcDropByTextPath(final String pathType,final int preAscend,final String treePath,final String operator,int delayBeforeDrop){
  postMouseMovementEvent();
  super.rcDropByTextPath(pathType,preAscend,treePath,operator,delayBeforeDrop);
  postMouseMovementEvent();
}
Program: 95451
Project: 95451
Buggy source:
/** 
 * @param widget a Widget
 * @return the Shell of the given Widget or null if no Shell was found
 * @see Control#getShell();
 */
public static Shell getShell(Widget widget){
  Widget wdgt=widget;
  while (!(wdgt instanceof Control) && wdgt != null) {
    wdgt=getWidgetParent(wdgt);
  }
  if (wdgt != null) {
    return ((Control)wdgt).getShell();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param widget a Widget
 * @return the Shell of the given Widget or null if no Shell was found
 * @see Control#getShell();
 */
public static Shell getShell(Widget widget){
  Widget wdgt=widget;
  while (!(wdgt instanceof Control) && wdgt != null) {
    wdgt=getWidgetParent(wdgt);
  }
  if (wdgt != null && !wdgt.isDisposed()) {
    return ((Control)wdgt).getShell();
  }
  return null;
}
Program: 95452
Project: 95452
Buggy source:
public Rectangle run() throws StepExecutionException {
  return SwtUtils.getWidgetBounds(component);
}

Fixed version (ground truth):
public Void run() throws StepExecutionException {
  final int mouseShakeOffset=10;
  java.awt.Point origin=AUTServer.getInstance().getRobot().getCurrentMousePosition();
  SwtRobot lowLevelRobot=new SwtRobot(Display.getDefault());
  lowLevelRobot.mouseMove(origin.x + mouseShakeOffset,origin.y + mouseShakeOffset);
  lowLevelRobot.mouseMove(origin.x - mouseShakeOffset,origin.y - mouseShakeOffset);
  lowLevelRobot.mouseMove(origin.x,origin.y);
  if (!EnvironmentUtils.isWindowsOS() && !EnvironmentUtils.isMacOS()) {
    boolean moreEvents=true;
    while (moreEvents) {
      moreEvents=Display.getDefault().readAndDispatch();
    }
  }
  return null;
}
Program: 95453
Project: 95453
Buggy source:
/** 
 * {@inheritDoc}
 */
public void shakeMouse(){
  final int mouseShakeOffset=10;
  java.awt.Point origin=AUTServer.getInstance().getRobot().getCurrentMousePosition();
  SwtRobot lowLevelRobot=new SwtRobot(Display.getDefault());
  lowLevelRobot.mouseMove(origin.x + mouseShakeOffset,origin.y + mouseShakeOffset);
  lowLevelRobot.mouseMove(origin.x - mouseShakeOffset,origin.y - mouseShakeOffset);
  lowLevelRobot.mouseMove(origin.x,origin.y);
  if (!EnvironmentUtils.isWindowsOS() && !EnvironmentUtils.isMacOS()) {
    boolean moreEvents=true;
    while (moreEvents) {
      moreEvents=Display.getDefault().readAndDispatch();
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void shakeMouse(){
  m_queuer.invokeAndWait("String_Node_Str",new IRunnable<Void>(){
    public Void run() throws StepExecutionException {
      final int mouseShakeOffset=10;
      java.awt.Point origin=AUTServer.getInstance().getRobot().getCurrentMousePosition();
      SwtRobot lowLevelRobot=new SwtRobot(Display.getDefault());
      lowLevelRobot.mouseMove(origin.x + mouseShakeOffset,origin.y + mouseShakeOffset);
      lowLevelRobot.mouseMove(origin.x - mouseShakeOffset,origin.y - mouseShakeOffset);
      lowLevelRobot.mouseMove(origin.x,origin.y);
      if (!EnvironmentUtils.isWindowsOS() && !EnvironmentUtils.isMacOS()) {
        boolean moreEvents=true;
        while (moreEvents) {
          moreEvents=Display.getDefault().readAndDispatch();
        }
      }
      return null;
    }
  }
);
}
Program: 95454
Project: 95454
Buggy source:
/** 
 * @param node the currently selected node: we insert below this or at the end of the branch
 * @param exp whether node is expanded
 * @return the position to add
 */
public static NodeTarget getPositionToInsert(INodePO node,boolean exp){
  if (Plugin.getDefault().getPreferenceStore().getBoolean(Constants.NODE_INSERT_KEY)) {
    return NodeTargetCalculator.calcNodeTarget(null,node,ViewerDropAdapter.LOCATION_AFTER,exp);
  }
  if (node instanceof IAbstractContainerPO || node instanceof ISpecTestCasePO) {
    return new NodeTarget(node.getNodeListSize(),node);
  }
  if (node.getParentNode() != null) {
    return new NodeTarget(node.getParentNode().getNodeListSize(),node.getParentNode());
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param node the currently selected node: we insert below this or at the end of the branch
 * @param exp whether node is expanded
 * @return the position to add
 */
public static NodeTarget getPositionToInsert(INodePO node,boolean exp){
  if (Plugin.getDefault().getPreferenceStore().getBoolean(Constants.NODE_INSERT_KEY)) {
    return NodeTargetCalculator.calcNodeTarget(null,node,ViewerDropAdapter.LOCATION_AFTER,exp);
  }
  if (node instanceof IAbstractContainerPO || node instanceof ISpecTestCasePO || node instanceof ITestSuitePO) {
    return new NodeTarget(node.getNodeListSize(),node);
  }
  if (node.getParentNode() != null) {
    return new NodeTarget(node.getParentNode().getNodeListSize(),node.getParentNode());
  }
  return null;
}
Program: 95455
Project: 95455
Buggy source:
/** 
 * {@inheritDoc}
 */
public void startAut(IAUTMainPO aut,IAUTConfigPO conf) throws ToolkitPluginException {
  final String autToolkit=aut.getToolkit();
  if (!ComponentBuilder.getInstance().getLevelToolkitIds().contains(autToolkit) && ToolkitConstants.LEVEL_TOOLKIT.equals(ToolkitSupportBP.getToolkitLevel(autToolkit))) {
    throw new ToolkitPluginException(Messages.ErrorMessageAUT_TOOLKIT_NOT_AVAILABLE);
  }
  try {
    Map<String,String> autConfigMap=createAutConfigMap(conf);
    autConfigMap.put(AutConfigConstants.NAME_TECHNICAL_COMPONENTS,String.valueOf(aut.isGenerateNames()));
    StartAUTServerMessage startAUTServerMessage=new StartAUTServerMessage(autConfigMap,autToolkit);
    AutAgentConnection.getInstance().send(startAUTServerMessage);
    if (log.isDebugEnabled()) {
      log.debug(Messages.StartAUTServerMessageSend);
    }
  }
 catch (  NotConnectedException nce) {
    log.info(nce.getLocalizedMessage(),nce);
  }
catch (  ConnectionException ce) {
    log.info(ce.getLocalizedMessage(),ce);
  }
catch (  CommunicationException cce) {
    log.error(cce.getLocalizedMessage(),cce);
    try {
      closeConnections();
    }
 catch (    ConnectionException ce) {
      log.error(Messages.ClosingTheConnectionsFailed,ce);
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void startAut(IAUTMainPO aut,IAUTConfigPO conf) throws ToolkitPluginException {
  final String autToolkit=aut.getToolkit();
  if (!ComponentBuilder.getInstance().getLevelToolkitIds().contains(autToolkit) && ToolkitConstants.LEVEL_TOOLKIT.equals(ToolkitSupportBP.getToolkitLevel(autToolkit))) {
    throw new ToolkitPluginException(Messages.ErrorMessageAUT_TOOLKIT_NOT_AVAILABLE);
  }
  try {
    Map<String,String> autConfigMap=createAutConfigMap(conf);
    autConfigMap.put(AutConfigConstants.NAME_TECHNICAL_COMPONENTS,String.valueOf(aut.isGenerateNames()));
    if (!aut.getPropertyMap().isEmpty()) {
      String currentEnv=StringUtils.defaultIfEmpty(autConfigMap.get(AutConfigConstants.ENVIRONMENT),StringConstants.EMPTY);
      for (      String autProp : aut.getPropertyMap().keySet()) {
        String property=EnvironmentUtils.toPropertyString(autProp,aut.getPropertyMap().get(autProp));
        currentEnv=currentEnv.concat(System.lineSeparator() + property);
      }
      autConfigMap.put(AutConfigConstants.ENVIRONMENT,currentEnv);
    }
    StartAUTServerMessage startAUTServerMessage=new StartAUTServerMessage(autConfigMap,autToolkit);
    AutAgentConnection.getInstance().send(startAUTServerMessage);
    if (log.isDebugEnabled()) {
      log.debug(Messages.StartAUTServerMessageSend);
    }
  }
 catch (  NotConnectedException nce) {
    log.info(nce.getLocalizedMessage(),nce);
  }
catch (  ConnectionException ce) {
    log.info(ce.getLocalizedMessage(),ce);
  }
catch (  CommunicationException cce) {
    log.error(cce.getLocalizedMessage(),cce);
    try {
      closeConnections();
    }
 catch (    ConnectionException ce) {
      log.error(Messages.ClosingTheConnectionsFailed,ce);
    }
  }
}
Program: 95456
Project: 95456
Buggy source:
/** 
 * Verifies the text of the cell under the mouse
 * @param txt the text
 * @param operator the operator
 */
public void rcVerifyCellTextAtMousePosition(String txt,String operator){
  String result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<String>(){
    @Override public String call() throws Exception {
      TreeTableCell<?,?> cell=(TreeTableCell<?,?>)getNodeAtMousePosition();
      return getContext().getRenderedText(cell);
    }
  }
);
  Verifier.match(result,txt,operator);
}

Fixed version (ground truth):
/** 
 * Verifies the text of the cell under the mouse
 * @param txt the text
 * @param operator the operator
 * @param timeout the timeout for the check
 */
public void rcVerifyCellTextAtMousePosition(String txt,String operator,int timeout){
  invokeAndWait("String_Node_Str",timeout,new Runnable(){
    @Override public void run(){
      TreeTableCell<?,?> cell=(TreeTableCell<?,?>)getNodeAtMousePosition();
      String result=getContext().getRenderedText(cell);
      Verifier.match(result,txt,operator);
    }
  }
);
}
Program: 95457
Project: 95457
Buggy source:
/** 
 * @param object the object to introspect
 * @param propertyName the properties name to retrieve
 * @return the property or <code>null</code> if not found
 * @throws RobotException in case of problems
 */
@SuppressWarnings("String_Node_Str") public static String getPropertyValue(Object object,String propertyName) throws RobotException {
  String propertyValue=StringConstants.EMPTY;
  Validate.notNull(object,"String_Node_Str");
  try {
    ArrayList<String> path=new ArrayList<String>(Arrays.asList(propertyName.split(StringConstants.SLASH)));
    final Object prop;
    if (path.size() > 0) {
      prop=getPropertyByPathOrMethod(object,path,0);
    }
 else {
      prop=null;
    }
    if (prop != null) {
      IPropertyValue propertyValueAdapter=((IPropertyValue)AdapterFactoryRegistry.getInstance().getAdapter(IPropertyValue.class,prop));
      if (propertyValueAdapter != null) {
        propertyValue=propertyValueAdapter.getStringRepresentation(prop);
      }
 else {
        propertyValue=String.valueOf(prop);
      }
    }
  }
 catch (  IllegalAccessException e) {
    throw new RobotException(e);
  }
catch (  InvocationTargetException e) {
    throw new RobotException(e);
  }
catch (  NoSuchMethodException e) {
    throw new RobotException(e);
  }
  if (StringUtils.containsAny(propertyValue,INVALID_XML_CHARS)) {
    for (    Character c : INVALID_XML_CHARS) {
      propertyValue=StringUtils.remove(propertyValue,c);
    }
  }
  return propertyValue;
}

Fixed version (ground truth):
/** 
 * @param object the object to introspect
 * @param propertyName the properties name to retrieve
 * @return the property or <code>null</code> if not found
 * @throws RobotException in case of problems
 */
@SuppressWarnings("String_Node_Str") public static String getPropertyValue(Object object,String propertyName) throws RobotException {
  String propertyValue=StringConstants.EMPTY;
  Validate.notNull(object,"String_Node_Str");
  try {
    ArrayList<String> path=new ArrayList<String>(Arrays.asList(propertyName.split(StringConstants.SLASH)));
    final Object prop;
    if (path.size() > 0) {
      prop=getPropertyByPathOrMethod(object,path,0);
    }
 else {
      prop=null;
    }
    if (prop != null) {
      IPropertyValue propertyValueAdapter=((IPropertyValue)AdapterFactoryRegistry.getInstance().getAdapter(IPropertyValue.class,prop));
      if (propertyValueAdapter != null) {
        propertyValue=propertyValueAdapter.getStringRepresentation(prop);
      }
 else {
        propertyValue=String.valueOf(prop);
      }
    }
 else {
      propertyValue=String.valueOf(prop);
    }
  }
 catch (  IllegalAccessException e) {
    throw new RobotException(e);
  }
catch (  InvocationTargetException e) {
    throw new RobotException(e);
  }
catch (  NoSuchMethodException e) {
    throw new RobotException(e);
  }
  if (StringUtils.containsAny(propertyValue,INVALID_XML_CHARS)) {
    for (    Character c : INVALID_XML_CHARS) {
      propertyValue=StringUtils.remove(propertyValue,c);
    }
  }
  return propertyValue;
}
Program: 95458
Project: 95458
Buggy source:
/** 
 * Verifies the text of the cell under the mouse
 * @param txt the text
 * @param operator the operator
 */
public void rcVerifyCellTextAtMousePosition(String txt,String operator){
  String result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<String>(){
    @Override public String call() throws Exception {
      TreeTableCell<?,?> cell=(TreeTableCell<?,?>)getNodeAtMousePosition();
      return getContext().getRenderedText(cell);
    }
  }
);
  Verifier.match(result,txt,operator);
}

Fixed version (ground truth):
/** 
 * Verifies the text of the cell under the mouse
 * @param txt the text
 * @param operator the operator
 * @param timeout the timeout for the check
 */
public void rcVerifyCellTextAtMousePosition(String txt,String operator,int timeout){
  invokeAndWait("String_Node_Str",timeout,new Runnable(){
    @Override public void run(){
      TreeTableCell<?,?> cell=(TreeTableCell<?,?>)getNodeAtMousePosition();
      String result=getContext().getRenderedText(cell);
      Verifier.match(result,txt,operator);
    }
  }
);
}
Program: 95459
Project: 95459
Buggy source:
/** 
 * {@inheritDoc}
 */
public String getText(){
  String comboBoxText;
  if (isEditable()) {
    comboBoxText=TesterUtil.getRenderedText(getComboBoxEditorComponent(m_comboBox),true);
  }
 else {
    final int selIndex=getSelectedIndex();
    if (selIndex == -1) {
      comboBoxText=getEventThreadQueuer().invokeAndWait("String_Node_Str",new IRunnable<String>(){
        public String run(){
          return String.valueOf(m_comboBox.getSelectedItem());
        }
      }
);
    }
 else {
      final JList jlist=new JList(m_comboBox.getModel());
      String o=getEventThreadQueuer().invokeAndWait("String_Node_Str",new IRunnable<String>(){
        public String run(){
          Component disp=m_comboBox.getRenderer().getListCellRendererComponent(jlist,jlist.getModel().getElementAt(selIndex),selIndex,true,m_comboBox.hasFocus());
          return TesterUtil.getRenderedText(disp,false);
        }
      }
);
      comboBoxText=String.valueOf(o);
    }
  }
  return comboBoxText;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public String getText(){
  String comboBoxText;
  if (isEditable()) {
    comboBoxText=TesterUtil.getRenderedText(getComboBoxEditorComponent(m_comboBox),true);
  }
 else {
    final int selIndex=getSelectedIndex();
    if (selIndex == -1) {
      try {
        comboBoxText=getTextForSelectedItem();
      }
 catch (      Exception e) {
        comboBoxText=getEventThreadQueuer().invokeAndWait("String_Node_Str",new IRunnable<String>(){
          public String run(){
            return String.valueOf(m_comboBox.getSelectedItem());
          }
        }
);
      }
    }
 else {
      final JList jlist=new JList(m_comboBox.getModel());
      String o=getEventThreadQueuer().invokeAndWait("String_Node_Str",new IRunnable<String>(){
        public String run(){
          Component disp=m_comboBox.getRenderer().getListCellRendererComponent(jlist,jlist.getModel().getElementAt(selIndex),selIndex,true,m_comboBox.hasFocus());
          return TesterUtil.getRenderedText(disp,false);
        }
      }
);
      comboBoxText=String.valueOf(o);
    }
  }
  return comboBoxText;
}
Program: 95460
Project: 95460
Buggy source:
/** 
 */
private void initErrorEventPropDescriptor(){
  PropertyDescriptor propDes=new PropertyDescriptor(new PropertyController(){
    public Object getProperty(){
      return I18n.getString(m_node.getEvent().getId());
    }
  }
,P_ELEMENT_DISPLAY_ERRORTYPE);
  propDes.setCategory(P_TESTERROR_CAT);
  addPropertyDescriptor(propDes);
  final TestErrorEvent event=m_node.getEvent();
  if (event.getId().equals(TestErrorEvent.ID.VERIFY_FAILED)) {
    Set keys=event.getProps().keySet();
    for (    final Object key : keys) {
      propDes=new PropertyDescriptor(new PropertyController(){
        public Object getProperty(){
          return event.getProps().get(key);
        }
      }
,I18n.getString((String)key));
      propDes.setCategory(P_TESTERROR_CAT);
      addPropertyDescriptor(propDes);
    }
  }
 else   if (event.getProps().keySet().contains(TestErrorEvent.Property.DESCRIPTION_KEY)) {
    propDes=new PropertyDescriptor(new PropertyController(){
      public Object getProperty(){
        String key=(String)event.getProps().get(TestErrorEvent.Property.DESCRIPTION_KEY);
        Object[] args=(Object[])event.getProps().get(TestErrorEvent.Property.PARAMETER_KEY);
        if (args != null) {
          return I18n.getString(key,args);
        }
        return I18n.getString(key,true);
      }
    }
,I18n.getString(TestErrorEvent.Property.DESCRIPTION_KEY));
    propDes.setCategory(P_TESTERROR_CAT);
    addPropertyDescriptor(propDes);
  }
}

Fixed version (ground truth):
/** 
 */
private void initErrorEventPropDescriptor(){
  PropertyDescriptor propDes=new PropertyDescriptor(new PropertyController(){
    public Object getProperty(){
      return I18n.getString(m_node.getEvent().getId());
    }
  }
,P_ELEMENT_DISPLAY_ERRORTYPE);
  propDes.setCategory(P_TESTERROR_CAT);
  addPropertyDescriptor(propDes);
  final TestErrorEvent event=m_node.getEvent();
  if (event.getId().equals(TestErrorEvent.ID.VERIFY_FAILED)) {
    Set keys=event.getProps().keySet();
    for (    final Object key : keys) {
      propDes=new PropertyDescriptor(new PropertyController(){
        public Object getProperty(){
          return event.getProps().get(key);
        }
      }
,I18n.getString((String)key));
      propDes.setCategory(P_TESTERROR_CAT);
      addPropertyDescriptor(propDes);
    }
  }
 else   if (event.getProps().keySet().contains(TestErrorEvent.Property.DESCRIPTION_KEY)) {
    propDes=new PropertyDescriptor(new PropertyController(){
      public Object getProperty(){
        String key=(String)event.getProps().get(TestErrorEvent.Property.DESCRIPTION_KEY);
        Object[] args=(Object[])event.getProps().get(TestErrorEvent.Property.PARAMETER_KEY);
        if (args != null) {
          return I18n.getStringWithoutErrorReport(key,args);
        }
        return I18n.getStringWithoutErrorReport(key,true);
      }
    }
,I18n.getString(TestErrorEvent.Property.DESCRIPTION_KEY));
    propDes.setCategory(P_TESTERROR_CAT);
    addPropertyDescriptor(propDes);
  }
}
Program: 95467
Project: 95467
Buggy source:
/** 
 * Puts the type into the local and global type maps
 * @param guid the guid
 * @param type the type
 * @param localType the local type map
 */
private void updateType(String guid,String type,Map<String,String> localType){
  if (localType.containsKey(guid)) {
    localType.put(guid,CompNameTypeManager.calcUsageType(localType.get(guid),type));
  }
 else {
    localType.put(guid,type);
  }
  String currentType=m_usageType.get(guid);
  if (currentType == null) {
    m_usageType.put(guid,m_mostAbstract);
    currentType=m_mostAbstract;
  }
  if (currentType.equals(ComponentNamesBP.UNKNOWN_COMPONENT_TYPE)) {
    return;
  }
  String newType=CompNameTypeManager.calcUsageType(currentType,type);
  if (newType.equals(ComponentNamesBP.UNKNOWN_COMPONENT_TYPE)) {
    List<String> info=new ArrayList<String>(2);
    info.add(CompSystemI18n.getString(type));
    info.add(CompSystemI18n.getString(currentType));
    m_problemInfo.put(guid,info);
  }
  m_usageType.put(guid,newType);
}

Fixed version (ground truth):
/** 
 * Puts the type into the local and global type maps
 * @param guid the guid
 * @param type the type
 * @param localType the local type map
 * @param node the node
 */
private void updateType(String guid,String type,Map<String,String> localType,INodePO node){
  if (localType.containsKey(guid)) {
    localType.put(guid,CompNameTypeManager.calcUsageType(localType.get(guid),type));
  }
 else {
    localType.put(guid,type);
  }
  String currentType=m_usageType.get(guid);
  String currentTypeDisp=CompSystemI18n.getString(currentType);
  String typeDisp=CompSystemI18n.getString(type);
  if (currentType == null) {
    m_usageType.put(guid,m_mostAbstract);
    currentType=m_mostAbstract;
  }
  if (currentType.equals(ComponentNamesBP.UNKNOWN_COMPONENT_TYPE)) {
    return;
  }
  String newType=CompNameTypeManager.calcUsageType(currentType,type);
  if (newType.equals(ComponentNamesBP.UNKNOWN_COMPONENT_TYPE)) {
    List<String> info=new ArrayList<String>(2);
    info.add(typeDisp);
    info.add(currentTypeDisp);
    info.add(m_lastTypeChange.get(guid));
    info.add(node.getGuid());
    m_problemInfo.put(guid,info);
  }
 else   if (!StringUtils.equals(currentTypeDisp,CompSystemI18n.getString(newType))) {
    m_lastTypeChange.put(guid,node.getGuid());
  }
  m_usageType.put(guid,newType);
}
Program: 95468
Project: 95468
Buggy source:
/** 
 * Recalculates all CN types
 */
public void recalculateTypes(){
  long start=System.currentTimeMillis();
  String mostAbstract=CompNameTypeManager.getMostAbstractType();
  for (  IComponentNamePO cN : CompNameManager.getInstance().getAllCompNamePOs()) {
    if (GeneralStorage.getInstance().getProject().getId().equals(cN.getParentProjectId())) {
      cN.setComponentType(mostAbstract);
    }
  }
  CalcTypes calc=new CalcTypes(CompNameManager.getInstance(),null);
  calc.setWriteTypes(true);
  calc.calculateTypes();
  CompNameManager.getInstance().setTypeProblems(calc);
  System.out.println("String_Node_Str" + (System.currentTimeMillis() - start) + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Recalculates all CN types
 */
public void recalculateTypes(){
  String mostAbstract=CompNameTypeManager.getMostAbstractType();
  for (  IComponentNamePO cN : CompNameManager.getInstance().getAllCompNamePOs()) {
    if (GeneralStorage.getInstance().getProject().getId().equals(cN.getParentProjectId())) {
      cN.setComponentType(mostAbstract);
      cN.setTypeProblem(null);
    }
  }
  CalcTypes calc=new CalcTypes(CompNameManager.getInstance(),null);
  calc.setWriteTypes(true);
  calc.calculateTypes();
  CompNameManager.getInstance().setTypeProblems(calc);
}
Program: 95469
Project: 95469
Buggy source:
/** 
 * Adds all propagated component name pairs of the test execution node to the map <code>pairs</code>.
 * @param pairs The map
 * @param execNode The test execution node
 */
private void addPropagatedPairs(Map<String,ICompNamesPairPO> pairs,IExecTestCasePO execNode){
  for (  ICompNamesPairPO pair : execNode.getCompNamesPairs()) {
    if (pair.isPropagated()) {
      String name=pair.getSecondName();
      if (!pairs.containsKey(name)) {
        String type=(pair.getType() == null || pair.getType().equals(StringConstants.EMPTY)) ? StringConstants.EMPTY : pair.getType();
        if (pair.getType() == null) {
          for (          Object o : execNode.getSpecTestCase().getUnmodifiableNodeList()) {
            INodePO node=(INodePO)o;
            if (node instanceof ICapPO) {
              ICapPO cap=(ICapPO)node;
              if (cap.getComponentName().equals(pair.getName())) {
                type=cap.getComponentType();
                pair.setType(type);
                break;
              }
            }
          }
        }
        pairs.put(name,PoMaker.createCompNamesPairPO(name,type));
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Adds all propagated component name pairs of the test execution node to the map <code>pairs</code>.
 * @param pairs The map
 * @param execNode The test execution node
 */
private void addPropagatedPairs(Map<String,ICompNamesPairPO> pairs,IExecTestCasePO execNode){
  for (  ICompNamesPairPO pair : execNode.getCompNamesPairs()) {
    if (pair.isPropagated()) {
      String name=pair.getSecondName();
      if (!pairs.containsKey(name)) {
        pairs.put(name,PoMaker.createCompNamesPairPO(name,StringConstants.EMPTY));
      }
    }
  }
}
Program: 95470
Project: 95470
Buggy source:
/** 
 * Creates an incompatible type Problem
 * @param cN the Component Name
 * @param type the Problem Type
 * @return the Problem
 */
public static IProblem createIncompatibleTypeProblem(IComponentNamePO cN,ProblemType type){
  if (type.equals(ProblemType.REASON_INCOMPATIBLE_MAP_TYPE)) {
    return new Problem(NLS.bind(Messages.ProblemIncompatibleMapTypeMarkerText,cN.getName()),new Status(IStatus.ERROR,Activator.PLUGIN_ID,NLS.bind(Messages.ProblemIncompatibleMapTypeMarkerText,cN.getName())),cN.getName(),type);
  }
  return new Problem(NLS.bind(Messages.ProblemIncompatibleUsageTypeMarkerText,cN.getName()),new Status(IStatus.ERROR,Activator.PLUGIN_ID,NLS.bind(Messages.ProblemIncompatibleUsageTypeMarkerText,cN.getName())),cN.getName(),type);
}

Fixed version (ground truth):
/** 
 * Creates an incompatible type Problem
 * @param cN the Component Name
 * @param type the Problem Type
 * @return the Problem
 */
public static IProblem createIncompatibleTypeProblem(IComponentNamePO cN,ProblemType type){
  if (type.equals(ProblemType.REASON_INCOMPATIBLE_MAP_TYPE)) {
    return new Problem(NLS.bind(Messages.ProblemIncompatibleMapTypeMarkerText,cN.getName()),new Status(IStatus.ERROR,Activator.PLUGIN_ID,NLS.bind(Messages.ProblemIncompatibleMapTypeMarkerText,cN.getName())),cN,type);
  }
  return new Problem(NLS.bind(Messages.ProblemIncompatibleUsageTypeMarkerText,cN.getName()),new Status(IStatus.ERROR,Activator.PLUGIN_ID,NLS.bind(Messages.ProblemIncompatibleUsageTypeMarkerText,cN.getName())),cN,type);
}
Program: 95473
Project: 95473
Buggy source:
/** 
 * Refreshes objects of the master session
 * @param op the objects - these don't need to be managed
 */
private static void refreshMasterSession(ITransaction op) throws PMRefreshFailedException {
  if (op.getToRefresh() == null || op.getToRefresh().isEmpty()) {
    return;
  }
  try {
    EntityManager master=GeneralStorage.getInstance().getMasterSession();
    for (    IPersistentObject po : op.getToRefresh()) {
      po=master.find(po.getClass(),po.getId());
      if (po != null) {
        master.refresh(po);
      }
      if (po instanceof INodePO) {
        ((INodePO)po).getUnmodifiableNodeList();
      }
    }
  }
 catch (  Exception e) {
    throw new PMRefreshFailedException(e);
  }
}

Fixed version (ground truth):
/** 
 * Refreshes objects of the master session
 * @param op the objects - these don't need to be managed
 */
private static void refreshMasterSession(ITransaction op) throws PMRefreshFailedException {
  Collection<? extends IPersistentObject> toRefresh=op.getToRefresh();
  if (toRefresh == null || toRefresh.isEmpty()) {
    return;
  }
  try {
    EntityManager master=GeneralStorage.getInstance().getMasterSession();
    for (    IPersistentObject po : toRefresh) {
      po=master.find(po.getClass(),po.getId());
      if (po != null) {
        master.refresh(po);
      }
      if (po instanceof INodePO) {
        ((INodePO)po).getUnmodifiableNodeList();
      }
    }
  }
 catch (  Exception e) {
    throw new PMRefreshFailedException(e);
  }
}
Program: 95475
Project: 95475
Buggy source:
/** 
 * {@inheritDoc} 
 */
public Collection<? extends IPersistentObject> getToRefresh(){
  return toLock;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public Collection<? extends IPersistentObject> getToRefresh(){
  List<IPersistentObject> toRefr=new ArrayList<>(toLock);
  toRefr.addAll(lol[0].getSpecTestCase().getUnmodifiableNodeList());
  return toRefr;
}
Program: 95476
Project: 95476
Buggy source:
/** 
 * @param node the currently selected node: we insert below this or at the end of the SpecTC
 * @param exp whether node is expanded
 * @return the position to add
 */
public static NodeTarget getPositionToInsert(INodePO node,boolean exp){
  if (Plugin.getDefault().getPreferenceStore().getBoolean(Constants.NODE_INSERT_KEY)) {
    INodePO top=node;
    while (top != null && !(top instanceof ISpecTestCasePO)) {
      top=top.getParentNode();
    }
    return new NodeTarget(top.getNodeListSize(),top);
  }
  return NodeTargetCalculator.calcNodeTarget(null,node,ViewerDropAdapter.LOCATION_AFTER,exp);
}

Fixed version (ground truth):
/** 
 * @param node the currently selected node: we insert below this or at the end of the SpecTC
 * @param exp whether node is expanded
 * @return the position to add
 */
public static NodeTarget getPositionToInsert(INodePO node,boolean exp){
  if (Plugin.getDefault().getPreferenceStore().getBoolean(Constants.NODE_INSERT_KEY)) {
    INodePO top=node.getSpecAncestor();
    if (top == null) {
      return null;
    }
    return new NodeTarget(top.getNodeListSize(),top);
  }
  return NodeTargetCalculator.calcNodeTarget(null,node,ViewerDropAdapter.LOCATION_AFTER,exp);
}
Program: 95477
Project: 95477
Buggy source:
/** 
 * @param node TestResultNode
 * @param parameterInterface Source for Parameter information.
 * @param keyword ITestResultPO
 * @return result with parameter
 */
private ITestResultPO addParameterListToResult(ITestResultPO keyword,TestResultNode node,IParameterInterfacePO parameterInterface){
  for (  TestResultParameter param : node.getParameters()) {
    IParameterDetailsPO parameter=PoMaker.createParameterDetailsPO();
    parameter.setParameterName(param.getName());
    parameter.setParameterType(param.getType());
    parameter.setParameterValue(param.getValue());
    keyword.addParameter(parameter);
  }
  return keyword;
}

Fixed version (ground truth):
/** 
 * @param node TestResultNode
 * @param parameterInterface Source for Parameter information.
 * @param keyword ITestResultPO
 * @return result with parameter
 */
private ITestResultPO addParameterListToResult(ITestResultPO keyword,TestResultNode node,IParameterInterfacePO parameterInterface){
  for (  TestResultParameter param : node.getParameters()) {
    IParameterDetailsPO parameter=PoMaker.createParameterDetailsPO();
    parameter.setParameterName(param.getName());
    parameter.setParameterType(param.getType());
    String value=param.getValue();
    if (value.length() >= 3500) {
      log.warn("String_Node_Str" + value);
      value=StringUtils.substring(value,0,3500);
    }
    parameter.setParameterValue(value);
    keyword.addParameter(parameter);
  }
  return keyword;
}
Program: 95478
Project: 95478
Buggy source:
/** 
 * @param s session
 * @param tx transaction
 * @throws PMReadException {@inheritDoc}
 * @throws PMAlreadyLockedException {@inheritDoc}
 * @throws PMDirtyVersionException {@inheritDoc}
 * @throws PMException {@inheritDoc}
 * @throws ProjectDeletedException if the project was deleted in another instance
 */
public void commitTransaction(EntityManager s,EntityTransaction tx) throws PMReadException, PMAlreadyLockedException, PMDirtyVersionException, PMException, ProjectDeletedException {
  Validate.notNull(s);
  Validate.notNull(tx);
  Validate.isTrue(tx.equals(s.getTransaction()),Messages.SessionAndTransactionDontMatch);
  try {
    tx.commit();
  }
 catch (  PersistenceException e) {
    if (s != null && s.equals(GeneralStorage.getInstance().getMasterSession())) {
      PersistenceManager.handleDBExceptionForMasterSession(null,e);
    }
 else {
      PersistenceManager.handleDBExceptionForAnySession(null,e,s);
    }
  }
 finally {
    removeLocks(s);
  }
}

Fixed version (ground truth):
/** 
 * @param s session
 * @param tx transaction
 * @throws PMReadException {@inheritDoc}
 * @throws PMAlreadyLockedException {@inheritDoc}
 * @throws PMDirtyVersionException {@inheritDoc}
 * @throws PMException {@inheritDoc}
 * @throws ProjectDeletedException if the project was deleted in another instance
 */
public void commitTransaction(EntityManager s,EntityTransaction tx) throws PMReadException, PMAlreadyLockedException, PMDirtyVersionException, PMException, ProjectDeletedException {
  Validate.notNull(s);
  Validate.notNull(tx);
  Validate.isTrue(tx.equals(s.getTransaction()),Messages.SessionAndTransactionDontMatch);
  try {
    tx.commit();
  }
 catch (  PersistenceException e) {
    log.error("String_Node_Str",e);
    if (s != null && s.equals(GeneralStorage.getInstance().getMasterSession())) {
      PersistenceManager.handleDBExceptionForMasterSession(null,e);
    }
 else {
      PersistenceManager.handleDBExceptionForAnySession(null,e,s);
    }
  }
 finally {
    removeLocks(s);
  }
}
Program: 95480
Project: 95480
Buggy source:
@Override public void rcDragIndex(int mouseButton,String modifier,int index){
  final DragAndDropHelper dndHelper=DragAndDropHelper.getInstance();
  dndHelper.setModifier(modifier);
  dndHelper.setMouseButton(mouseButton);
  rcSelectIndex(String.valueOf(index),BinaryChoice.no.rcValue(),mouseButton,0);
  pressOrReleaseModifiers(modifier,true);
  getRobot().mousePress(null,null,mouseButton);
}

Fixed version (ground truth):
@Override public void rcDragIndex(int mouseButton,String modifier,int index){
  final DragAndDropHelper dndHelper=DragAndDropHelper.getInstance();
  dndHelper.setModifier(modifier);
  dndHelper.setMouseButton(mouseButton);
  rcSelectIndex(String.valueOf(index),BinaryChoice.no.rcValue(),mouseButton,0);
  pressOrReleaseModifiers(modifier,true);
  getRobot().mousePress(null,null,mouseButton);
  Node listView=((Node)getRealComponent());
  listView.addEventFilter(ScrollToEvent.ANY,m_scrollConsumer);
  dndHelper.setDragMode(true);
}
Program: 95481
Project: 95481
Buggy source:
@Override public void rcDragValue(int mouseButton,String modifier,String value,String operator,String searchType){
  final DragAndDropHelper dndHelper=DragAndDropHelper.getInstance();
  dndHelper.setModifier(modifier);
  dndHelper.setMouseButton(mouseButton);
  rcSelectValue(value,operator,searchType,BinaryChoice.no.rcValue(),mouseButton,0);
  pressOrReleaseModifiers(modifier,true);
  getRobot().mousePress(null,null,mouseButton);
}

Fixed version (ground truth):
@Override public void rcDragValue(int mouseButton,String modifier,String value,String operator,String searchType){
  final DragAndDropHelper dndHelper=DragAndDropHelper.getInstance();
  dndHelper.setModifier(modifier);
  dndHelper.setMouseButton(mouseButton);
  rcSelectValue(value,operator,searchType,BinaryChoice.no.rcValue(),mouseButton,0);
  pressOrReleaseModifiers(modifier,true);
  getRobot().mousePress(null,null,mouseButton);
  Node listView=((Node)getRealComponent());
  listView.addEventFilter(ScrollToEvent.ANY,m_scrollConsumer);
  dndHelper.setDragMode(true);
}
Program: 95482
Project: 95482
Buggy source:
@Override public void rcDropValue(String value,String operator,String searchType,int delayBeforeDrop){
  final DragAndDropHelper dndHelper=DragAndDropHelper.getInstance();
  try {
    rcSelectValue(value,operator,searchType,BinaryChoice.no.rcValue(),dndHelper.getMouseButton(),0);
    waitBeforeDrop(delayBeforeDrop);
    ((RobotJavaFXImpl)getRobot()).shakeMouse();
  }
  finally {
    getRobot().mouseRelease(null,null,dndHelper.getMouseButton());
    pressOrReleaseModifiers(dndHelper.getModifier(),false);
  }
}

Fixed version (ground truth):
@Override public void rcDropValue(String value,String operator,String searchType,int delayBeforeDrop){
  final DragAndDropHelper dndHelper=DragAndDropHelper.getInstance();
  try {
    ListCell<?> targetCell=((ListViewAdapter<ListView<?>>)getComponent()).getCell(value);
    if (targetCell == null) {
      throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.NOT_VISIBLE));
    }
    rcSelectValue(value,operator,searchType,BinaryChoice.no.rcValue(),dndHelper.getMouseButton(),0);
    waitBeforeDrop(delayBeforeDrop);
  }
  finally {
    getRobot().mouseRelease(null,null,dndHelper.getMouseButton());
    pressOrReleaseModifiers(dndHelper.getModifier(),false);
    Node listView=((Node)getRealComponent());
    listView.removeEventFilter(ScrollToEvent.ANY,m_scrollConsumer);
    dndHelper.setDragMode(false);
  }
}
Program: 95483
Project: 95483
Buggy source:
@Override public void rcDropIndex(int index,int delayBeforeDrop){
  final DragAndDropHelper dndHelper=DragAndDropHelper.getInstance();
  try {
    rcSelectIndex(String.valueOf(index),BinaryChoice.no.rcValue(),dndHelper.getMouseButton(),0);
    waitBeforeDrop(delayBeforeDrop);
    ((RobotJavaFXImpl)getRobot()).shakeMouse();
  }
  finally {
    getRobot().mouseRelease(null,null,dndHelper.getMouseButton());
    pressOrReleaseModifiers(dndHelper.getModifier(),false);
  }
}

Fixed version (ground truth):
@Override public void rcDropIndex(int index,int delayBeforeDrop){
  final DragAndDropHelper dndHelper=DragAndDropHelper.getInstance();
  try {
    ListCell<?> targetCell=((ListViewAdapter<ListView<?>>)getComponent()).getCell(index);
    if (targetCell == null) {
      throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.NOT_VISIBLE));
    }
    rcSelectIndex(String.valueOf(index),BinaryChoice.no.rcValue(),dndHelper.getMouseButton(),0);
    waitBeforeDrop(delayBeforeDrop);
  }
  finally {
    getRobot().mouseRelease(null,null,dndHelper.getMouseButton());
    pressOrReleaseModifiers(dndHelper.getModifier(),false);
    Node listView=((Node)getRealComponent());
    listView.removeEventFilter(ScrollToEvent.ANY,m_scrollConsumer);
    dndHelper.setDragMode(false);
  }
}
Program: 95484
Project: 95484
Buggy source:
/** 
 * run a test job
 */
private void doTestJob(){
  String tjName=m_job.getTestJob().getName();
  sysOut(NLS.bind(Messages.ExecutionControllerTestJobBegin,tjName));
  sysOut(NLS.bind(Messages.ExecutionControllerTestJobExpectedTestSuites,new Object[]{tjName,m_job.getTestJob().getNodeListSize()}));
  List<INodePO> executedTestSuites=ClientTest.instance().startTestJob(m_job.getTestJob(),m_job.isAutoScreenshot(),m_job.getNoRunOptMode());
  sysOut(NLS.bind(Messages.ExecutionControllerTestJobExecutedTestSuites,new Object[]{tjName,executedTestSuites.size()}));
  Iterator<INodePO> tsIterator=m_job.getTestJob().getNodeListIterator();
  waitForReportingToFinish(TimeoutConstants.CLIENT_REPORTING_AFTER_FAILURE_TIMEOUT);
  while (tsIterator.hasNext()) {
    INodePO testsuite=tsIterator.next();
    if (!executedTestSuites.contains(testsuite)) {
      sysErr(NLS.bind(Messages.ExecutionControllerTestJobUnsuccessfulTestSuites,new Object[]{tjName,testsuite.getName()}));
    }
  }
}

Fixed version (ground truth):
/** 
 * run a test job
 */
private void doTestJob(){
  String tjName=m_job.getTestJob().getName();
  sysOut(NLS.bind(Messages.ExecutionControllerTestJobBegin,tjName));
  sysOut(NLS.bind(Messages.ExecutionControllerTestJobExpectedTestSuites,new Object[]{tjName,m_job.getTestJob().getNodeListSize()}));
  List<INodePO> executedTestSuites=ClientTest.instance().startTestJob(m_job.getTestJob(),m_job.isAutoScreenshot(),m_job.getIterMax(),m_job.getNoRunOptMode());
  sysOut(NLS.bind(Messages.ExecutionControllerTestJobExecutedTestSuites,new Object[]{tjName,executedTestSuites.size()}));
  Iterator<INodePO> tsIterator=m_job.getTestJob().getNodeListIterator();
  waitForReportingToFinish(TimeoutConstants.CLIENT_REPORTING_AFTER_FAILURE_TIMEOUT);
  while (tsIterator.hasNext()) {
    INodePO testsuite=tsIterator.next();
    if (!executedTestSuites.contains(testsuite)) {
      sysErr(NLS.bind(Messages.ExecutionControllerTestJobUnsuccessfulTestSuites,new Object[]{tjName,testsuite.getName()}));
    }
  }
}
Program: 95485
Project: 95485
Buggy source:
/** 
 * execute a test suite
 */
private void doTestSuite(){
  while (m_job.getActualTestSuite() != null && !m_stopProcessing) {
    while (m_idle && !m_stopProcessing) {
      TimeUtil.delay(50);
    }
    if (m_job.getActualTestSuite() != null && !m_stopProcessing && !m_idle && !m_isFirstAutStart) {
      ITestSuitePO ts=m_job.getActualTestSuite();
      m_idle=true;
      sysOut(StringConstants.TAB + NLS.bind(Messages.ExecutionControllerTestSuiteBegin,ts.getName()));
      ClientTest.instance().startTestSuite(ts,m_startedAutId != null ? m_startedAutId : m_job.getAutId(),m_job.isAutoScreenshot(),null,m_job.getNoRunOptMode(),null);
    }
  }
  waitForReportingToFinish(TimeoutConstants.CLIENT_REPORTING_AFTER_FAILURE_TIMEOUT);
}

Fixed version (ground truth):
/** 
 * execute a test suite
 */
private void doTestSuite(){
  while (m_job.getActualTestSuite() != null && !m_stopProcessing) {
    while (m_idle && !m_stopProcessing) {
      TimeUtil.delay(50);
    }
    if (m_job.getActualTestSuite() != null && !m_stopProcessing && !m_idle && !m_isFirstAutStart) {
      ITestSuitePO ts=m_job.getActualTestSuite();
      m_idle=true;
      sysOut(StringConstants.TAB + NLS.bind(Messages.ExecutionControllerTestSuiteBegin,ts.getName()));
      ClientTest.instance().startTestSuite(ts,m_startedAutId != null ? m_startedAutId : m_job.getAutId(),m_job.isAutoScreenshot(),m_job.getIterMax(),null,m_job.getNoRunOptMode(),null);
    }
  }
  waitForReportingToFinish(TimeoutConstants.CLIENT_REPORTING_AFTER_FAILURE_TIMEOUT);
}
Program: 95486
Project: 95486
Buggy source:
/** 
 * {@inheritDoc}
 */
public void stackIncremented(INodePO node){
  String nodeType=StringConstants.EMPTY;
  String name=String.valueOf(node.getName());
  if (node instanceof IEventExecTestCasePO) {
    IEventExecTestCasePO evPo=(IEventExecTestCasePO)node;
    if (evPo.getReentryProp() != ReentryProperty.RETRY) {
      setNoErrorWhileExecution(false);
    }
    nodeType=Messages.EventHandler;
  }
 else   if (node instanceof IRefTestSuitePO) {
    nodeType=Messages.TestSuite;
    name=NodeNameUtil.getText((IRefTestSuitePO)node);
  }
 else   if (node instanceof IExecTestCasePO) {
    nodeType=Messages.TestCase;
    name=NodeNameUtil.getText((IExecTestCasePO)node,false);
  }
  StringBuilder sb=new StringBuilder(nodeType);
  sb.append(StringConstants.COLON);
  sb.append(StringConstants.SPACE);
  sb.append(name);
  sysOut(sb.toString());
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void stackIncremented(INodePO node){
  String nodeType=StringConstants.EMPTY;
  String name=String.valueOf(node.getName());
  if (node instanceof IEventExecTestCasePO) {
    IEventExecTestCasePO evPo=(IEventExecTestCasePO)node;
    if (evPo.getReentryProp() != ReentryProperty.RETRY) {
      setNoErrorWhileExecution(false);
    }
    nodeType=Messages.EventHandler;
  }
 else   if (node instanceof IRefTestSuitePO) {
    nodeType=Messages.TestSuite;
    name=NodeNameUtil.getText((IRefTestSuitePO)node);
  }
 else   if (node instanceof IExecTestCasePO) {
    nodeType=Messages.TestCase;
    name=NodeNameUtil.getText((IExecTestCasePO)node,false);
  }
 else   if (node instanceof IConditionalStatementPO) {
    nodeType=Messages.Conditional;
  }
 else   if (node instanceof IAbstractContainerPO) {
    nodeType=Messages.Container;
  }
 else   if (node instanceof IDoWhilePO) {
    nodeType=Messages.DoWhile;
  }
 else   if (node instanceof IWhileDoPO) {
    nodeType=Messages.WhileDo;
  }
 else   if (node instanceof IIteratePO) {
    nodeType=Messages.Iterate;
  }
  StringBuilder sb=new StringBuilder(nodeType);
  sb.append(StringConstants.COLON);
  sb.append(StringConstants.SPACE);
  sb.append(name);
  sysOut(sb.toString());
}
Program: 95489
Project: 95489
Buggy source:
/** 
 * Verifies whether the checkbox in the row of the selected cell  is checked
 * @param checked true if checkbox in cell should be selected, false otherwise
 * @throws StepExecutionException If no cell is selected or the verification fails.
 */
public void rcVerifyCheckboxInSelectedRow(boolean checked) throws StepExecutionException {
  int row=((ITableComponent)getComponent()).getSelectedCell().getRow();
  verifyCheckboxInRow(checked,row);
}

Fixed version (ground truth):
/** 
 * Verifies whether the checkbox in the row of the selected cell  is checked
 * @param checked true if checkbox in cell should be selected, false otherwise
 * @param timeout the maximum amount of time to wait to verify whether thecheckbox in the row is checked
 * @throws StepExecutionException If no cell is selected or the verification fails.
 */
public void rcVerifyCheckboxInSelectedRow(final boolean checked,int timeout) throws StepExecutionException {
  invokeAndWait("String_Node_Str",timeout,new Runnable(){
    public void run(){
      int row=((ITableComponent)getComponent()).getSelectedCell().getRow();
      verifyCheckboxInRow(checked,row);
    }
  }
);
}
Program: 95490
Project: 95490
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 IExecTestCasePO performExtraction(final String newTcName,final INodePO node,final IStructuredSelection selection){
  final List<INodePO> modNodes=new ArrayList<INodePO>(selection.size());
  Iterator it=selection.iterator();
  while (it.hasNext()) {
    Object next=it.next();
    if (next instanceof INodePO) {
      modNodes.add((INodePO)next);
    }
  }
  if (modNodes.isEmpty()) {
    return null;
  }
  IExecTestCasePO exec=persistExtraction(node,newTcName,modNodes);
  DataEventDispatcher.getInstance().fireDataChangedListener(node,DataState.StructureModified,UpdateState.all);
  DataEventDispatcher.getInstance().fireDataChangedListener(exec,DataState.Added,UpdateState.all);
  final ISpecTestCasePO newSpecTc=exec.getSpecTestCase();
  DataEventDispatcher.getInstance().fireDataChangedListener(newSpecTc,DataState.Added,UpdateState.all);
  TestCaseBrowser tcb=MultipleTCBTracker.getInstance().getMainTCB();
  if (tcb != null) {
    tcb.getTreeViewer().setSelection(new StructuredSelection(exec),true);
  }
  return exec;
}

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 IExecTestCasePO performExtraction(final String newTcName,final INodePO node,final IStructuredSelection selection){
  final List<INodePO> modNodes=new ArrayList<INodePO>(selection.size());
  Iterator it=selection.iterator();
  while (it.hasNext()) {
    Object next=it.next();
    if (next instanceof INodePO) {
      modNodes.add((INodePO)next);
    }
  }
  if (modNodes.isEmpty()) {
    return null;
  }
  IExecTestCasePO exec=persistExtraction(node,newTcName,modNodes);
  DataEventDispatcher.getInstance().fireDataChangedListener(node,DataState.StructureModified,UpdateState.all);
  DataEventDispatcher.getInstance().fireDataChangedListener(exec,DataState.Added,UpdateState.all);
  ISpecTestCasePO newSpecTC=exec.getSpecTestCase();
  newSpecTC=GeneralStorage.getInstance().getMasterSession().find(newSpecTC.getClass(),newSpecTC.getId());
  DataEventDispatcher.getInstance().fireDataChangedListener(newSpecTC,DataState.Added,UpdateState.all);
  TestCaseBrowser tcb=MultipleTCBTracker.getInstance().getMainTCB();
  if (tcb != null) {
    tcb.getTreeViewer().setSelection(new StructuredSelection(newSpecTC),true);
  }
  return exec;
}