nus-yam/ex-repair huggingface dataset:
Program: 95659
Project: 95659
Buggy source:
/** 
 * Line-feeds the given String array at \n
 * @param strArray the string to line feed
 * @return the line feeded strings as an array
 */
private static String[] lineFeed(String[] strArray){
  List<String> strList=new ArrayList<String>();
  for (  String str : strArray) {
    StringTokenizer tok=new StringTokenizer(str,StringConstants.NEWLINE);
    while (tok.hasMoreElements()) {
      strList.add(tok.nextToken());
    }
  }
  return strList.toArray(new String[strList.size()]);
}

Fixed version (ground truth):
/** 
 * Line-feeds the given String array at \n
 * @param strArray the string to line feed
 * @return the line feeded strings as an array
 */
private static String[] lineFeed(String[] strArray){
  List<String> strList=new ArrayList<String>();
  for (  String str : strArray) {
    if (str != null) {
      StringTokenizer tok=new StringTokenizer(str,StringConstants.NEWLINE);
      while (tok.hasMoreElements()) {
        strList.add(tok.nextToken());
      }
    }
  }
  return strList.toArray(new String[strList.size()]);
}
Program: 95660
Project: 95660
Buggy source:
@Override public Rectangle getNodeBounds(final TreeItem<?> node){
  Rectangle result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Rectangle>(){
    @Override public Rectangle call() throws Exception {
      TreeView<?> tree=getTree();
      tree.layout();
      List<? extends TreeCell> tCells=NodeTraverseHelper.getInstancesOf(tree,TreeCell.class);
      for (      TreeCell<?> cell : tCells) {
        TreeItem<?> item=cell.getTreeItem();
        if (NodeTraverseHelper.isVisible(cell) && (item != null && item.equals(node))) {
          Rectangle b=NodeBounds.getAbsoluteBounds(cell);
          Rectangle treeB=NodeBounds.getAbsoluteBounds(tree);
          return new Rectangle(Math.abs(treeB.x - b.x),Math.abs(treeB.y - b.y),Rounding.round(b.getWidth()),Rounding.round(b.getHeight()));
        }
      }
      return null;
    }
  }
);
  if (result == null) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.NOT_VISIBLE));
  }
  return result;
}

Fixed version (ground truth):
@Override public Rectangle getNodeBounds(final TreeItem<?> node){
  Rectangle result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Rectangle>(){
    @Override public Rectangle call() throws Exception {
      TreeView<?> tree=getTree();
      tree.layout();
      List<? extends TreeCell> tCells=NodeTraverseHelper.getInstancesOf(tree,TreeCell.class);
      for (      TreeCell<?> cell : tCells) {
        TreeItem<?> item=cell.getTreeItem();
        if (NodeTraverseHelper.isVisible(cell) && (item != null && item.equals(node))) {
          Rectangle cellBounds=NodeBounds.getAbsoluteBounds(cell);
          Rectangle treeBounds=NodeBounds.getAbsoluteBounds(tree);
          int leftX;
          int cellWidth;
          Node disclosureNode=cell.getDisclosureNode();
          if (disclosureNode != null) {
            Rectangle closureNodeBounds=NodeBounds.getAbsoluteBounds(disclosureNode);
            leftX=((int)closureNodeBounds.getMaxX()) - treeBounds.x;
            cellWidth=(int)(cellBounds.getMaxX() - closureNodeBounds.getMaxX());
          }
 else {
            leftX=cellBounds.x - treeBounds.x;
            cellWidth=cellBounds.width;
          }
          int cellRelativeY=cellBounds.y - treeBounds.y;
          return new Rectangle(leftX,cellRelativeY,cellWidth,cellBounds.height);
        }
      }
      return null;
    }
  }
);
  if (result == null) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.NOT_VISIBLE));
  }
  return result;
}
Program: 95661
Project: 95661
Buggy source:
@Override public void scrollNodeToVisible(final TreeItem<?> node){
  EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Void>(){
    @Override public Void call() throws Exception {
      TreeView<?> tree=getTree();
      int index=((TreeView)tree).getRow(node);
      tree.scrollTo(index);
      tree.layout();
      return null;
    }
  }
);
}

Fixed version (ground truth):
@Override public void scrollNodeToVisible(final TreeItem<?> node){
  EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Void>(){
    @Override public Void call() throws Exception {
      TreeView tree=getTree();
      int index=tree.getRow(node);
      tree.scrollTo(index);
      tree.layout();
      return null;
    }
  }
);
}
Program: 95662
Project: 95662
Buggy source:
@Override public Rectangle getVisibleRowBounds(final Rectangle rowBounds){
  Rectangle result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Rectangle>(){
    @Override public Rectangle call() throws Exception {
      TreeView<?> tree=getTree();
      tree.layout();
      Rectangle visibleTreeBounds=new Rectangle(0,0,Rounding.round(tree.getWidth()),Rounding.round(tree.getHeight()));
      return rowBounds.intersection(visibleTreeBounds);
    }
  }
);
  return result;
}

Fixed version (ground truth):
@Override public Rectangle getVisibleRowBounds(final Rectangle rowBounds){
  Rectangle result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Rectangle>(){
    @Override public Rectangle call() throws Exception {
      TreeView<?> tree=getTree();
      tree.layout();
      Rectangle treeB=NodeBounds.getAbsoluteBounds(tree);
      Rectangle visibleTreeBounds=new Rectangle(0,0,Rounding.round(treeB.getWidth()),Rounding.round(treeB.getHeight()));
      Rectangle intersection=rowBounds.intersection(visibleTreeBounds);
      if (intersection.isEmpty()) {
        throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.NOT_VISIBLE));
      }
      return intersection;
    }
  }
);
  return result;
}
Program: 95663
Project: 95663
Buggy source:
/** 
 * updates the modelString after substitution of guids in references
 */
private void updateModelString(){
  StringBuilder builder=new StringBuilder();
  String oldModelString=getModelString();
  for (  IParamValueToken token : getTokens()) {
    builder.append(token.getModelString());
  }
  setModelString(builder.toString());
  for (  IDataSetPO dataSet : getCurrentNode().getDataManager().getDataSets()) {
    for (int i=0; i < dataSet.getColumnCount(); i++) {
      if (dataSet.getValueAt(i).equals(oldModelString)) {
        dataSet.setValueAt(i,getModelString());
        return;
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * updates the modelString after substitution of guids in references
 */
private void updateModelString(){
  StringBuilder builder=new StringBuilder();
  String oldModelString=getModelString();
  for (  IParamValueToken token : getTokens()) {
    builder.append(token.getModelString());
  }
  setModelString(builder.toString());
  for (  IDataSetPO dataSet : getCurrentNode().getDataManager().getDataSets()) {
    for (int i=0; i < dataSet.getColumnCount(); i++) {
      String data=dataSet.getValueAt(i);
      if (data != null && data.equals(oldModelString)) {
        dataSet.setValueAt(i,getModelString());
        return;
      }
    }
  }
}
Program: 95664
Project: 95664
Buggy source:
/** 
 * @return the columns
 */
@ElementCollection(fetch=FetchType.EAGER) @CollectionTable(name="String_Node_Str") @Column(name="String_Node_Str",length=MAX_STRING_LENGTH) @OrderColumn(name="String_Node_Str") @JoinColumn(name="String_Node_Str") @BatchFetch(value=BatchFetchType.JOIN) public List<String> getColumns(){
  return m_columns;
}

Fixed version (ground truth):
/** 
 * @return the columns
 */
@ElementCollection(fetch=FetchType.EAGER) @CollectionTable(name="String_Node_Str") @Column(name="String_Node_Str",length=MAX_STRING_LENGTH) @OrderColumn(name="String_Node_Str") @JoinColumn(name="String_Node_Str") @BatchFetch(value=BatchFetchType.EXISTS) public List<String> getColumns(){
  return m_columns;
}
Program: 95665
Project: 95665
Buggy source:
@Override public Rectangle getNodeBounds(final TreeItem<?> node){
  Rectangle result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Rectangle>(){
    @Override public Rectangle call() throws Exception {
      TreeView<?> tree=getTree();
      tree.layout();
      List<? extends TreeCell> tCells=NodeTraverseHelper.getInstancesOf(tree,TreeCell.class);
      for (      TreeCell<?> cell : tCells) {
        TreeItem<?> item=cell.getTreeItem();
        if (NodeTraverseHelper.isVisible(cell) && (item != null && item.equals(node))) {
          Rectangle b=NodeBounds.getAbsoluteBounds(cell);
          Rectangle treeB=NodeBounds.getAbsoluteBounds(tree);
          return new Rectangle(Math.abs(treeB.x - b.x),Math.abs(treeB.y - b.y),Rounding.round(b.getWidth()),Rounding.round(b.getHeight()));
        }
      }
      return null;
    }
  }
);
  if (result == null) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.NOT_VISIBLE));
  }
  return result;
}

Fixed version (ground truth):
@Override public Rectangle getNodeBounds(final TreeItem<?> node){
  Rectangle result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Rectangle>(){
    @Override public Rectangle call() throws Exception {
      TreeView<?> tree=getTree();
      tree.layout();
      List<? extends TreeCell> tCells=NodeTraverseHelper.getInstancesOf(tree,TreeCell.class);
      for (      TreeCell<?> cell : tCells) {
        TreeItem<?> item=cell.getTreeItem();
        if (NodeTraverseHelper.isVisible(cell) && (item != null && item.equals(node))) {
          Rectangle cellBounds=NodeBounds.getAbsoluteBounds(cell);
          Rectangle treeBounds=NodeBounds.getAbsoluteBounds(tree);
          int leftX;
          int cellWidth;
          Node disclosureNode=cell.getDisclosureNode();
          if (disclosureNode != null) {
            Rectangle closureNodeBounds=NodeBounds.getAbsoluteBounds(disclosureNode);
            leftX=((int)closureNodeBounds.getMaxX()) - treeBounds.x;
            cellWidth=(int)(cellBounds.getMaxX() - closureNodeBounds.getMaxX());
          }
 else {
            leftX=cellBounds.x - treeBounds.x;
            cellWidth=cellBounds.width;
          }
          int cellRelativeY=cellBounds.y - treeBounds.y;
          return new Rectangle(leftX,cellRelativeY,cellWidth,cellBounds.height);
        }
      }
      return null;
    }
  }
);
  if (result == null) {
    throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.NOT_VISIBLE));
  }
  return result;
}
Program: 95666
Project: 95666
Buggy source:
@Override public void scrollNodeToVisible(final TreeItem<?> node){
  EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Void>(){
    @Override public Void call() throws Exception {
      TreeView<?> tree=getTree();
      int index=((TreeView)tree).getRow(node);
      tree.scrollTo(index);
      tree.layout();
      return null;
    }
  }
);
}

Fixed version (ground truth):
@Override public void scrollNodeToVisible(final TreeItem<?> node){
  EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Void>(){
    @Override public Void call() throws Exception {
      TreeView tree=getTree();
      int index=tree.getRow(node);
      tree.scrollTo(index);
      tree.layout();
      return null;
    }
  }
);
}
Program: 95667
Project: 95667
Buggy source:
@Override public Rectangle getVisibleRowBounds(final Rectangle rowBounds){
  Rectangle result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Rectangle>(){
    @Override public Rectangle call() throws Exception {
      TreeView<?> tree=getTree();
      tree.layout();
      Rectangle visibleTreeBounds=new Rectangle(0,0,Rounding.round(tree.getWidth()),Rounding.round(tree.getHeight()));
      return rowBounds.intersection(visibleTreeBounds);
    }
  }
);
  return result;
}

Fixed version (ground truth):
@Override public Rectangle getVisibleRowBounds(final Rectangle rowBounds){
  Rectangle result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Rectangle>(){
    @Override public Rectangle call() throws Exception {
      TreeView<?> tree=getTree();
      tree.layout();
      Rectangle treeB=NodeBounds.getAbsoluteBounds(tree);
      Rectangle visibleTreeBounds=new Rectangle(0,0,Rounding.round(treeB.getWidth()),Rounding.round(treeB.getHeight()));
      Rectangle intersection=rowBounds.intersection(visibleTreeBounds);
      if (intersection.isEmpty()) {
        throw new StepExecutionException("String_Node_Str",EventFactory.createActionError(TestErrorEvent.NOT_VISIBLE));
      }
      return intersection;
    }
  }
);
  return result;
}
Program: 95668
Project: 95668
Buggy source:
@Override protected void startTasks() throws ExceptionInInitializerError, InvocationTargetException, NoSuchMethodException {
  addToolKitEventListenerToAUT();
  invokeAUT();
}

Fixed version (ground truth):
@Override protected void startTasks() throws ExceptionInInitializerError, InvocationTargetException, NoSuchMethodException {
  addToolKitEventListenerToAUT();
  invokeAUT();
  long start=System.currentTimeMillis();
  while (!checkInitialization() || ((System.currentTimeMillis() - start) < TOOLKIT_INITIALIZED_TIMEOUT)) {
    try {
      Thread.sleep(50);
    }
 catch (    InterruptedException e) {
    }
  }
}
Program: 95669
Project: 95669
Buggy source:
/** 
 * Looks through the Hierarchy for a Stage with a given Title.
 * @param title the Title of the Stage to look for
 * @param operator the operator
 * @return the Stage or null
 */
private Stage getStageByTitle(final String title,final String operator){
  Stage result=null;
  try {
    result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Stage>(){
      @Override public Stage call() throws Exception {
        List<? extends Stage> stages=ComponentHandler.getAssignableFrom(Stage.class);
        for (        final Stage stage : stages) {
          if (MatchUtil.getInstance().match(stage.getTitle(),title,operator)) {
            return stage;
          }
        }
        return null;
      }
    }
);
  }
 catch (  IllegalStateException e) {
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Looks through the Hierarchy for a Stage with a given Title.
 * @param title the Title of the Stage to look for
 * @param operator the operator
 * @return the Stage or null
 */
private Stage getStageByTitle(final String title,final String operator){
  Stage result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Stage>(){
    @Override public Stage call() throws Exception {
      List<? extends Stage> stages=ComponentHandler.getAssignableFrom(Stage.class);
      for (      final Stage stage : stages) {
        if (MatchUtil.getInstance().match(stage.getTitle(),title,operator)) {
          return stage;
        }
      }
      return null;
    }
  }
);
  return result;
}
Program: 95671
Project: 95671
Buggy source:
@Override protected void startTasks() throws ExceptionInInitializerError, InvocationTargetException, NoSuchMethodException {
  addToolKitEventListenerToAUT();
  invokeAUT();
  long start=System.currentTimeMillis();
  while (!checkInitialization() || ((System.currentTimeMillis() - start) < TOOLKIT_INITIALIZED_TIMEOUT)) {
    try {
      Thread.sleep(50);
    }
 catch (    InterruptedException e) {
    }
  }
}

Fixed version (ground truth):
@Override protected void startTasks() throws ExceptionInInitializerError, InvocationTargetException, NoSuchMethodException {
  addToolKitEventListenerToAUT();
  invokeAUT();
}
Program: 95672
Project: 95672
Buggy source:
/** 
 * Looks through the Hierarchy for a Stage with a given Title.
 * @param title the Title of the Stage to look for
 * @param operator the operator
 * @return the Stage or null
 */
private Stage getStageByTitle(final String title,final String operator){
  Stage result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Stage>(){
    @Override public Stage call() throws Exception {
      List<? extends Stage> stages=ComponentHandler.getAssignableFrom(Stage.class);
      for (      final Stage stage : stages) {
        if (MatchUtil.getInstance().match(stage.getTitle(),title,operator)) {
          return stage;
        }
      }
      return null;
    }
  }
);
  return result;
}

Fixed version (ground truth):
/** 
 * Looks through the Hierarchy for a Stage with a given Title.
 * @param title the Title of the Stage to look for
 * @param operator the operator
 * @return the Stage or null
 */
private Stage getStageByTitle(final String title,final String operator){
  Stage result=null;
  try {
    result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Stage>(){
      @Override public Stage call() throws Exception {
        List<? extends Stage> stages=ComponentHandler.getAssignableFrom(Stage.class);
        for (        final Stage stage : stages) {
          if (MatchUtil.getInstance().match(stage.getTitle(),title,operator)) {
            return stage;
          }
        }
        return null;
      }
    }
);
  }
 catch (  IllegalStateException e) {
  }
  return result;
}
Program: 95674
Project: 95674
Buggy source:
/** 
 * Looks through the Hierarchy for a Stage with a given Title.
 * @param title the Title of the Stage to look for
 * @param operator the operator
 * @return the Stage or null
 */
private Stage getStageByTitle(final String title,final String operator){
  Stage result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Stage>(){
    @Override public Stage call() throws Exception {
      List<? extends Stage> stages=ComponentHandler.getAssignableFrom(Stage.class);
      for (      final Stage stage : stages) {
        if (MatchUtil.getInstance().match(stage.getTitle(),title,operator)) {
          return stage;
        }
      }
      return null;
    }
  }
);
  return result;
}

Fixed version (ground truth):
/** 
 * Looks through the Hierarchy for a Stage with a given Title.
 * @param title the Title of the Stage to look for
 * @param operator the operator
 * @return the Stage or null
 */
private Stage getStageByTitle(final String title,final String operator){
  Stage result=null;
  try {
    result=EventThreadQueuerJavaFXImpl.invokeAndWait("String_Node_Str",new Callable<Stage>(){
      @Override public Stage call() throws Exception {
        List<? extends Stage> stages=ComponentHandler.getAssignableFrom(Stage.class);
        for (        final Stage stage : stages) {
          if (MatchUtil.getInstance().match(stage.getTitle(),title,operator)) {
            return stage;
          }
        }
        return null;
      }
    }
);
  }
 catch (  IllegalStateException e) {
  }
  return result;
}
Program: 95677
Project: 95677
Buggy source:
/** 
 * @return the columns
 */
@ElementCollection(fetch=FetchType.EAGER) @CollectionTable(name="String_Node_Str") @Column(name="String_Node_Str",length=MAX_STRING_LENGTH) @OrderColumn(name="String_Node_Str") @JoinColumn(name="String_Node_Str") @BatchFetch(value=BatchFetchType.EXISTS) public List<String> getColumns(){
  return m_columns;
}

Fixed version (ground truth):
/** 
 * @return the columns
 */
@ElementCollection(fetch=FetchType.EAGER) @CollectionTable(name="String_Node_Str") @Column(name="String_Node_Str",length=MAX_STRING_LENGTH) @OrderColumn(name="String_Node_Str") @JoinColumn(name="String_Node_Str") @BatchFetch(value=BatchFetchType.JOIN) public List<String> getColumns(){
  return m_columns;
}
Program: 95678
Project: 95678
Buggy source:
/** 
 * Invokes the specified Method
 * @param variableName name of the variable of the cap. This isn't used.
 * @param fqcn Fully qualified class name
 * @param name name of the Method
 * @param timeout the timeout
 * @return returns the string representation of the return value of theinvoked method
 */
public String rcInvokeMethodStoreReturn(final String variableName,final String fqcn,final String name,int timeout){
  try {
    Object result=m_threadQueuer.invokeAndWait("String_Node_Str",createCallable(fqcn,name),timeout);
    return result.toString();
  }
 catch (  TimeoutException e) {
    throw new StepExecutionException(e.toString(),EventFactory.createActionError(TestErrorEvent.CONFIRMATION_TIMEOUT));
  }
}

Fixed version (ground truth):
/** 
 * Invokes the specified Method
 * @param variableName name of the variable of the cap. This isn't used.
 * @param fqcn Fully qualified class name
 * @param name name of the Method
 * @param timeout the timeout
 * @return returns the string representation of the return value of theinvoked method
 */
public String rcInvokeMethodStoreReturn(final String variableName,final String fqcn,final String name,int timeout){
  try {
    Object result=m_threadQueuer.invokeAndWait("String_Node_Str",createCallable(fqcn,name),timeout);
    return result == null ? StringConstants.NULL : result.toString();
  }
 catch (  TimeoutException e) {
    throw new StepExecutionException(e.toString(),EventFactory.createActionError(TestErrorEvent.CONFIRMATION_TIMEOUT));
  }
}
Program: 95679
Project: 95679
Buggy source:
/** 
 * Invokes the specified Method
 * @param variableName name of the variable of the cap. This isn't used.
 * @param fqcn Fully qualified class name
 * @param name name of the Method
 * @param timeout the timeout
 * @return returns the string representation of the return value of theinvoked method
 */
public String rcInvokeMethodStoreReturn(final String variableName,final String fqcn,final String name,int timeout){
  IRobotFactory factory=getComponent().getRobotFactory();
  IEventThreadQueuer queuer=factory.getEventThreadQueuer();
  try {
    Object result=queuer.invokeAndWait("String_Node_Str",createCallable(fqcn,name),timeout);
    return result.toString();
  }
 catch (  TimeoutException e) {
    throw new StepExecutionException(e.toString(),EventFactory.createActionError(TestErrorEvent.CONFIRMATION_TIMEOUT));
  }
}

Fixed version (ground truth):
/** 
 * Invokes the specified Method
 * @param variableName name of the variable of the cap. This isn't used.
 * @param fqcn Fully qualified class name
 * @param name name of the Method
 * @param timeout the timeout
 * @return returns the string representation of the return value of theinvoked method
 */
public String rcInvokeMethodStoreReturn(final String variableName,final String fqcn,final String name,int timeout){
  IRobotFactory factory=getComponent().getRobotFactory();
  IEventThreadQueuer queuer=factory.getEventThreadQueuer();
  try {
    Object result=queuer.invokeAndWait("String_Node_Str",createCallable(fqcn,name),timeout);
    return result == null ? StringConstants.NULL : result.toString();
  }
 catch (  TimeoutException e) {
    throw new StepExecutionException(e.toString(),EventFactory.createActionError(TestErrorEvent.CONFIRMATION_TIMEOUT));
  }
}
Program: 95680
Project: 95680
Buggy source:
/** 
 * Throws the appropriate StepExecutionException for a given exception which occurred during the method invocation
 * @param e the occurred exception
 */
public static void handleException(Throwable e){
  if (e instanceof InvocationTargetException) {
    Throwable cause=e.getCause();
    if (cause instanceof IllegalStateException) {
      throw new StepExecutionException(e.toString(),EventFactory.createVerifyFailed("String_Node_Str",cause.toString()));
    }
    throw new StepExecutionException(cause.toString(),EventFactory.createActionError(TestErrorEvent.EXECUTION_ERROR,new String[]{cause.toString()}));
  }
  throw new StepExecutionException(e.toString(),EventFactory.createActionError(TestErrorEvent.EXECUTION_ERROR,new String[]{e.toString()}));
}

Fixed version (ground truth):
/** 
 * Throws the appropriate StepExecutionException for a given exception which occurred during the method invocation
 * @param e the occurred exception
 */
public static void handleException(Throwable e){
  if (e instanceof InvocationTargetException) {
    Throwable cause=e.getCause();
    if (cause instanceof IllegalStateException) {
      throw new StepExecutionException(e.toString(),EventFactory.createVerifyFailed("String_Node_Str",cause.toString()));
    }
    throw new StepExecutionException(cause.toString(),EventFactory.createActionError(TestErrorEvent.EXECUTION_ERROR,new String[]{cause.toString()}));
  }
  if (e instanceof NullPointerException) {
    log.warn("String_Node_Str",e);
    throw new StepExecutionException(e.toString(),EventFactory.createActionError(TestErrorEvent.EXECUTION_ERROR,new String[]{"String_Node_Str"}));
  }
  throw new StepExecutionException(e.toString(),EventFactory.createActionError(TestErrorEvent.EXECUTION_ERROR,new String[]{e.toString()}));
}
Program: 95681
Project: 95681
Buggy source:
/** 
 * updates the modelString after substitution of guids in references
 */
private void updateModelString(){
  StringBuilder builder=new StringBuilder();
  for (  IParamValueToken token : getTokens()) {
    builder.append(token.getModelString());
  }
  setModelString(builder.toString());
}

Fixed version (ground truth):
/** 
 * updates the modelString after substitution of guids in references
 */
private void updateModelString(){
  StringBuilder builder=new StringBuilder();
  String oldModelString=getModelString();
  for (  IParamValueToken token : getTokens()) {
    builder.append(token.getModelString());
  }
  setModelString(builder.toString());
  for (  IDataSetPO dataSet : getCurrentNode().getDataManager().getDataSets()) {
    for (int i=0; i < dataSet.getColumnCount(); i++) {
      if (dataSet.getValueAt(i).equals(oldModelString)) {
        dataSet.setValueAt(i,getModelString());
        return;
      }
    }
  }
}
Program: 95682
Project: 95682
Buggy source:
/** 
 * Creates a Checkbox for the given monitoring composite,  which was specified in the extension point.     * 
 * @param composite The composite to add the widget on
 * @param att The current attribute
 */
private void createMonitoringCheckBoxWidget(Composite composite,final MonitoringAttribute att){
  final String autId=getConfigValue(AutConfigConstants.AUT_ID);
  final Button b=UIComponentHelper.createToggleButton(composite,1);
  b.setData(MonitoringConstants.MONITORING_KEY,att.getId());
  b.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      showMonitoringInfoDialog(autId);
      putConfigValue(att.getId(),String.valueOf(b.getSelection()));
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Creates a Checkbox for the given monitoring composite,  which was specified in the extension point.     * 
 * @param composite The composite to add the widget on
 * @param att The current attribute
 */
private void createMonitoringCheckBoxWidget(Composite composite,final MonitoringAttribute att){
  final String autId=getConfigValue(AutConfigConstants.AUT_ID);
  final Button b=UIComponentHelper.createToggleButton(composite,1);
  b.setData(MonitoringConstants.MONITORING_KEY,att.getId());
  if (Boolean.parseBoolean(getConfigValue(att.getId()))) {
    b.setSelection(true);
  }
  b.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent event){
      showMonitoringInfoDialog(autId);
      putConfigValue(att.getId(),String.valueOf(b.getSelection()));
    }
  }
);
}
Program: 95683
Project: 95683
Buggy source:
/** 
 * Returns the components with the specified typeName.
 * @param typeName Name of the specified component.
 * @return the specified Components.
 */
public List<ConcreteComponent> findComponents(String typeName){
  Validate.notNull(typeName);
  List<ConcreteComponent> list=getComponents();
  List<ConcreteComponent> comps=new LinkedList<ConcreteComponent>();
  for (  ConcreteComponent cc : list) {
    if (cc.getComponentClass() != null && cc.getComponentClass().getName().equals(typeName)) {
      comps.add(cc);
    }
  }
  if (!(comps.isEmpty())) {
    return comps;
  }
  String message="String_Node_Str" + typeName + "String_Node_Str";
  log.error(message);
  throw new ConfigXmlException(message,MessageIDs.E_NO_COMPONENT);
}

Fixed version (ground truth):
/** 
 * Returns the components with the specified typeName.
 * @param typeName Name of the specified component.
 * @return the specified Components.
 */
public List<ConcreteComponent> findComponents(String typeName){
  Validate.notNull(typeName);
  Set<ConcreteComponent> list=getComponents();
  List<ConcreteComponent> comps=new LinkedList<ConcreteComponent>();
  for (  ConcreteComponent cc : list) {
    if (cc.getComponentClass() != null && cc.getComponentClass().getName().equals(typeName)) {
      comps.add(cc);
    }
  }
  if (!(comps.isEmpty())) {
    return comps;
  }
  String message="String_Node_Str" + typeName + "String_Node_Str";
  log.error(message);
  throw new ConfigXmlException(message,MessageIDs.E_NO_COMPONENT);
}
Program: 95684
Project: 95684
Buggy source:
/** 
 * Returns the component with the specified typeName.
 * @param typeName Name of the specified component.
 * @return the specified Component.
 */
public Component findComponent(String typeName){
  Validate.notNull(typeName);
  List<ConcreteComponent> list=getComponents();
  for (  ConcreteComponent cc : list) {
    if (cc.getComponentClass() != null && cc.getComponentClass().getName().equals(typeName)) {
      return cc;
    }
  }
  String message="String_Node_Str" + typeName + "String_Node_Str";
  log.error(message);
  throw new ConfigXmlException(message,MessageIDs.E_NO_COMPONENT);
}

Fixed version (ground truth):
/** 
 * Returns the component with the specified typeName.
 * @param typeName Name of the specified component.
 * @return the specified Component.
 */
public Component findComponent(String typeName){
  Validate.notNull(typeName);
  Set<ConcreteComponent> list=getComponents();
  for (  ConcreteComponent cc : list) {
    if (cc.getComponentClass() != null && cc.getComponentClass().getName().equals(typeName)) {
      return cc;
    }
  }
  String message="String_Node_Str" + typeName + "String_Node_Str";
  log.error(message);
  throw new ConfigXmlException(message,MessageIDs.E_NO_COMPONENT);
}
Program: 95685
Project: 95685
Buggy source:
/** 
 * @return Returns the components.
 */
public List<ConcreteComponent> getComponents(){
  return m_components;
}

Fixed version (ground truth):
/** 
 * @return Returns the components.
 */
public Set<ConcreteComponent> getComponents(){
  return m_components;
}
Program: 95686
Project: 95686
Buggy source:
/** 
 * private constructor (singleton) <br> initializes the cache 
 */
private AUTServerConfiguration(){
  m_implClassNames=new HashMap<String,String>();
  m_implClassCache=new HashMap();
  m_components=new ArrayList<ConcreteComponent>();
}

Fixed version (ground truth):
/** 
 * private constructor (singleton) <br> initializes the cache 
 */
private AUTServerConfiguration(){
  m_implClassNames=new HashMap<String,String>();
  m_implClassCache=new HashMap();
  m_components=new HashSet<ConcreteComponent>();
}
Program: 95687
Project: 95687
Buggy source:
/** 
 * @return a set of supported type identifier
 */
public Set<ComponentClass> getSupportedTypes(){
  if (m_supportedComponentTypes != null) {
    return m_supportedComponentTypes;
  }
  m_supportedComponentTypes=new HashSet<ComponentClass>();
  List<ConcreteComponent> supportedComponents=AUTServerConfiguration.getInstance().getComponents();
  Iterator<ConcreteComponent> iterator=supportedComponents.iterator();
  while (iterator.hasNext()) {
    ConcreteComponent c=iterator.next();
    if (!c.hasDefaultMapping()) {
      List ccl=c.getCompClass();
      Iterator compClassIterator=ccl.iterator();
      while (compClassIterator.hasNext()) {
        ComponentClass cc=(ComponentClass)compClassIterator.next();
        m_supportedComponentTypes.add(cc);
      }
    }
  }
  return m_supportedComponentTypes;
}

Fixed version (ground truth):
/** 
 * @return a set of supported type identifier
 */
public Set<ComponentClass> getSupportedTypes(){
  if (m_supportedComponentTypes != null) {
    return m_supportedComponentTypes;
  }
  m_supportedComponentTypes=new HashSet<ComponentClass>();
  Set<ConcreteComponent> supportedComponents=AUTServerConfiguration.getInstance().getComponents();
  Iterator<ConcreteComponent> iterator=supportedComponents.iterator();
  while (iterator.hasNext()) {
    ConcreteComponent c=iterator.next();
    if (!c.hasDefaultMapping()) {
      List ccl=c.getCompClass();
      Iterator compClassIterator=ccl.iterator();
      while (compClassIterator.hasNext()) {
        ComponentClass cc=(ComponentClass)compClassIterator.next();
        m_supportedComponentTypes.add(cc);
      }
    }
  }
  return m_supportedComponentTypes;
}
Program: 95689
Project: 95689
Buggy source:
/** 
 * execute delete-test-result of summary without commit
 * @param session Session
 * @param resultId id of testresult-summary-entry, or <code>null</code> if all test results should be deleted.
 */
public static final void executeDeleteTestresultOfSummary(EntityManager session,Long resultId){
  boolean isDeleteAll=resultId == null;
  String paramQueryBaseString="String_Node_Str";
  if (isDeleteAll) {
    session.createNativeQuery(paramQueryBaseString).executeUpdate();
  }
 else {
    Query paramQuery=session.createNativeQuery(paramQueryBaseString + "String_Node_Str");
    paramQuery.setParameter("String_Node_Str",resultId);
    paramQuery.executeUpdate();
  }
  StringBuilder resultQueryBuilder=new StringBuilder();
  resultQueryBuilder.append("String_Node_Str");
  if (!isDeleteAll) {
    resultQueryBuilder.append("String_Node_Str");
  }
  Query resultQuery=session.createQuery(resultQueryBuilder.toString());
  if (!isDeleteAll) {
    resultQuery.setParameter("String_Node_Str",resultId);
  }
  resultQuery.executeUpdate();
}

Fixed version (ground truth):
/** 
 * execute delete-test-result of summary without commit
 * @param session Session
 * @param resultId id of testresult-summary-entry, or <code>null</code> if all test results should be deleted.
 */
public static final void executeDeleteTestresultOfSummary(EntityManager session,Long resultId){
  boolean isDeleteAll=resultId == null;
  String paramQueryBaseString="String_Node_Str";
  String queryExtension="String_Node_Str";
  if (isDeleteAll) {
    session.createNativeQuery(paramQueryBaseString).executeUpdate();
  }
 else {
    Query paramQuery=session.createNativeQuery(paramQueryBaseString + queryExtension);
    paramQuery.setParameter("String_Node_Str",resultId);
    paramQuery.executeUpdate();
  }
  String additionsQueryBaseString="String_Node_Str";
  if (isDeleteAll) {
    session.createNativeQuery(additionsQueryBaseString).executeUpdate();
  }
 else {
    Query commentQuery=session.createNativeQuery(additionsQueryBaseString + queryExtension);
    commentQuery.setParameter("String_Node_Str",resultId);
    commentQuery.executeUpdate();
  }
  StringBuilder resultQueryBuilder=new StringBuilder();
  resultQueryBuilder.append("String_Node_Str");
  if (!isDeleteAll) {
    resultQueryBuilder.append("String_Node_Str");
  }
  Query resultQuery=session.createQuery(resultQueryBuilder.toString());
  if (!isDeleteAll) {
    resultQuery.setParameter("String_Node_Str",resultId);
  }
  resultQuery.executeUpdate();
}
Program: 95690
Project: 95690
Buggy source:
/** 
 * gets an array of connections which target the   {@link GraphicalEditPart}
 * @param editPart the edit part
 * @return the connections which are going to another edit part
 */
private ConnectionEditPart[] getTargetConnectionEditParts(GraphicalEditPart editPart){
  List<?> targetConnectionList=editPart.getSourceConnections();
  ConnectionEditPart[] targetConnections=targetConnectionList.toArray(new ConnectionEditPart[targetConnectionList.size()]);
  return targetConnections;
}

Fixed version (ground truth):
/** 
 * gets an array of connections which target the   {@link GraphicalEditPart}
 * @param editPart the edit part
 * @return the connections which are going to another edit part
 */
private ConnectionEditPart[] getTargetConnectionEditParts(GraphicalEditPart editPart){
  List<?> targetConnectionList=editPart.getTargetConnections();
  ConnectionEditPart[] targetConnections=targetConnectionList.toArray(new ConnectionEditPart[targetConnectionList.size()]);
  return targetConnections;
}
Program: 95691
Project: 95691
Buggy source:
/** 
 * Finds and clicks the figure for the given path.
 * @param textPath The path to the figure.
 * @param operator The operator used for matching.
 * @param count The number of times to click.
 * @param button The mouse button to use for the click.
 */
public void rcClickFigure(String textPath,String operator,int count,int button){
  IFigure figure=FigureCanvasUtil.findFigure(findEditPart(textPath,operator));
  nullCheckFigure(figure);
  clickFigure(count,button,figure);
}

Fixed version (ground truth):
/** 
 * Finds and clicks the figure for the given path.
 * @param textPath The path to the figure.
 * @param operator The operator used for matching.
 * @param count The number of times to click.
 * @param button The mouse button to use for the click.
 */
public void rcClickFigure(String textPath,String operator,int count,int button){
  IFigure figure=FigureCanvasUtil.findFigure(findEditPart(textPath,operator));
  if (figure == null) {
    getRobot().click(getViewerControl(),getFigureBoundsChecked(textPath,operator),ClickOptions.create().setScrollToVisible(false).setClickCount(count).setMouseButton(button));
    return;
  }
  clickFigure(count,button,figure);
}
Program: 95692
Project: 95692
Buggy source:
/** 
 * {@inheritDoc}
 */
public void handlePropertyChanged(boolean isCompNameChanged){
  super.handlePropertyChanged(isCompNameChanged);
  m_eventHandlerTreeViewer.refresh();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void handlePropertyChanged(boolean isCompNameChanged){
  super.handlePropertyChanged(isCompNameChanged);
  Plugin.getDisplay().syncExec(new Runnable(){
    public void run(){
      getEventHandlerTreeViewer().refresh();
    }
  }
);
}
Program: 95693
Project: 95693
Buggy source:
public void run(){
  if (getEditorHelper().requestEditableState() != JBEditorHelper.EditableState.OK) {
    return;
  }
  if (!hasDefaultMapping) {
    String capComponentName=m_objectMappingManager.addMapping(recordAut,ci,newCap.getComponentName());
    newCap.setComponentName(capComponentName);
  }
  getTreeViewer().refresh(false);
  getTreeViewer().setSelection(new StructuredSelection(newCap),true);
  getEditorHelper().setDirty(true);
}

Fixed version (ground truth):
public void run(){
  getEventHandlerTreeViewer().refresh();
}
Program: 95694
Project: 95694
Buggy source:
@Override public void refresh(){
  super.refresh();
  getEventHandlerTreeViewer().refresh(true);
}

Fixed version (ground truth):
@Override public void refresh(){
  super.refresh();
  Plugin.getDisplay().syncExec(new Runnable(){
    public void run(){
      getEventHandlerTreeViewer().refresh();
    }
  }
);
}
Program: 95695
Project: 95695
Buggy source:
/** 
 * {@inheritDoc}
 */
public void handlePropertyChanged(boolean isCompNameChanged){
  createPartName();
  getTreeViewer().refresh();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public void handlePropertyChanged(boolean isCompNameChanged){
  createPartName();
  Plugin.getDisplay().syncExec(new Runnable(){
    public void run(){
      getTreeViewer().refresh();
    }
  }
);
}
Program: 95696
Project: 95696
Buggy source:
/** 
 * Refreshes the editors viewer
 */
public void refresh(){
  getTreeViewer().refresh(true);
}

Fixed version (ground truth):
/** 
 * Refreshes the editors viewer
 */
public void refresh(){
  Plugin.getDisplay().syncExec(new Runnable(){
    public void run(){
      getTreeViewer().refresh(true);
    }
  }
);
}
Program: 95697
Project: 95697
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void handlePropertyChanged(boolean isCompNameChanged){
  getMainTreeViewer().refresh();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void handlePropertyChanged(boolean isCompNameChanged){
  Plugin.getDisplay().syncExec(new Runnable(){
    public void run(){
      getMainTreeViewer().refresh();
    }
  }
);
}
Program: 95698
Project: 95698
Buggy source:
protected IStatus run(IProgressMonitor monitor){
  monitor.beginTask(jobName,IProgressMonitor.UNKNOWN);
  ActivateInspectorMessage message=new ActivateInspectorMessage();
  try {
    AUTConnection.getInstance().connectToAut(autId,new NullProgressMonitor());
    AUTConnection.getInstance().request(message,new ActivateInspectorResponseCommand(),5000);
  }
 catch (  NotConnectedException nce) {
    ErrorHandlingUtil.createMessageDialog(MessageIDs.E_NO_AUT_CONNECTION_ERROR);
  }
catch (  ConnectionException ce) {
    ErrorHandlingUtil.createMessageDialog(ce,null,null);
  }
catch (  CommunicationException ce) {
    ErrorHandlingUtil.createMessageDialog(ce,null,null);
  }
  monitor.done();
  return Status.OK_STATUS;
}

Fixed version (ground truth):
protected IStatus run(IProgressMonitor monitor){
  monitor.beginTask(jobName,IProgressMonitor.UNKNOWN);
  AutIdentifier autId=null;
  try {
    autId=(AutIdentifier)event.getObjectParameterForExecution(AUT_ID);
    lastAut=autId;
  }
 catch (  ExecutionException e) {
    InspectableAutSourceProvider iasp=new InspectableAutSourceProvider();
    Object inspectableAUTs=iasp.getCurrentState().get(InspectableAutSourceProvider.INSPECTABLE_AUTS);
    if (inspectableAUTs != null && inspectableAUTs instanceof List) {
      List auts=(List)inspectableAUTs;
      if (auts.size() == 1) {
        Object object=auts.get(0);
        autId=object instanceof AutIdentifier ? (AutIdentifier)object : null;
        lastAut=autId;
      }
 else       if (lastAut != null && auts.contains(lastAut)) {
        autId=lastAut;
      }
    }
  }
  if (autId == null) {
    return Status.CANCEL_STATUS;
  }
  ActivateInspectorMessage message=new ActivateInspectorMessage();
  try {
    AUTConnection.getInstance().connectToAut(autId,new NullProgressMonitor());
    AUTConnection.getInstance().request(message,new ActivateInspectorResponseCommand(),5000);
  }
 catch (  NotConnectedException nce) {
    ErrorHandlingUtil.createMessageDialog(MessageIDs.E_NO_AUT_CONNECTION_ERROR);
  }
catch (  ConnectionException ce) {
    ErrorHandlingUtil.createMessageDialog(ce,null,null);
  }
catch (  CommunicationException ce) {
    ErrorHandlingUtil.createMessageDialog(ce,null,null);
  }
  monitor.done();
  return Status.OK_STATUS;
}
Program: 95700
Project: 95700
Buggy source:
/** 
 * Shows the SpecTS in the Test Suite Browser
 * @param node the node to show
 * @param viewPart the view part to show the specification in
 */
protected void showSpecUINode(INodePO node,IViewPart viewPart){
  if (!Utils.openPerspective(Constants.SPEC_PERSPECTIVE)) {
    return;
  }
  if (!PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getPerspective().getId().equals(Constants.SPEC_PERSPECTIVE)) {
    ErrorHandlingUtil.createMessageDialog(MessageIDs.I_NO_PERSPECTIVE_CHANGE);
    return;
  }
  if (viewPart instanceof AbstractJBTreeView) {
    AbstractJBTreeView jbtv=(AbstractJBTreeView)viewPart;
    Plugin.activate(jbtv);
    UINodeBP.selectNodeInTree(node.getId(),jbtv.getTreeViewer(),jbtv.getEntityManager());
  }
}

Fixed version (ground truth):
/** 
 * Shows the node in the specific viewPart if possible
 * @param node the node to show
 * @param viewPartID the view part ID to show the specification in
 */
protected void showSpecUINode(INodePO node,String viewPartID){
  if (!openSpecPerspectiveAndShowError()) {
    return;
  }
  IViewPart viewPart=Plugin.showView(viewPartID);
  activatViewAndSelect(node,viewPart);
}
Program: 95701
Project: 95701
Buggy source:
/** 
 * {@inheritDoc} 
 */
public Object executeImpl(ExecutionEvent event){
  ISpecTestCasePO specTc=UINodeBP.getSpecTC(getSelection());
  if (specTc != null) {
    showSpecUINode(specTc,MultipleTCBTracker.getInstance().getMainTCB());
    return null;
  }
  ITestSuitePO testSuite=UINodeBP.getSpecTS(getSelection());
  if (testSuite != null) {
    IViewPart view=Plugin.showView(Constants.TS_BROWSER_ID);
    showSpecUINode(testSuite,view);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public Object executeImpl(ExecutionEvent event){
  ISpecTestCasePO specTc=UINodeBP.getSpecTC(getSelection());
  if (specTc != null) {
    showSpecUINode(specTc,MultipleTCBTracker.getInstance().getMainTCB());
    return null;
  }
  ITestSuitePO testSuite=UINodeBP.getSpecTS(getSelection());
  if (testSuite != null) {
    showSpecUINode(testSuite,Constants.TS_BROWSER_ID);
  }
  return null;
}
Program: 95702
Project: 95702
Buggy source:
/** 
 * Creates the initial Context of this Editor.<br> Subclasses may override this method. 
 * @param parent Composite
 */
public void createPartControlImpl(Composite parent){
  createSashForm(parent);
  setParentComposite(parent);
  setInitialInput();
  ColumnViewerToolTipSupport.enableFor(getTreeViewer());
  DecoratingCellLabelProvider lp=new DecoratingCellLabelProvider(new TooltipLabelProvider(),Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  getTreeViewer().setLabelProvider(lp);
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  ded.addPropertyChangedListener(this,true);
  addDragAndDropSupport(DND.DROP_MOVE,new Transfer[]{LocalSelectionTransfer.getInstance()});
  getEditorHelper().addListeners();
  setActionHandlers();
  addDoubleClickListener(CommandIDs.OPEN_SPECIFICATION_COMMAND_ID,getMainTreeViewer());
  GuiEventDispatcher.getInstance().addEditorDirtyStateListener(this,true);
  ded.addDataChangedListener(new CentralTestDataUpdateListener(),false);
  ded.addParamChangedListener(this,true);
}

Fixed version (ground truth):
/** 
 * Creates the initial Context of this Editor.<br> Subclasses may override this method. 
 * @param parent Composite
 */
public void createPartControlImpl(Composite parent){
  createSashForm(parent);
  setParentComposite(parent);
  setInitialInput();
  ColumnViewerToolTipSupport.enableFor(getTreeViewer());
  DecoratingCellLabelProvider lp=new DecoratingCellLabelProvider(new TooltipLabelProvider(),Plugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator());
  getTreeViewer().setLabelProvider(lp);
  DataEventDispatcher ded=DataEventDispatcher.getInstance();
  ded.addPropertyChangedListener(this,true);
  addDragAndDropSupport(DND.DROP_MOVE,new Transfer[]{LocalSelectionTransfer.getInstance()});
  getEditorHelper().addListeners();
  setActionHandlers();
  addDoubleClickListener(CommandIDs.OPEN_SPECIFICATION_COMMAND_ID,getMainTreeViewer());
  GuiEventDispatcher.getInstance().addEditorDirtyStateListener(this,true);
  ded.addDataChangedListener(m_ctdUpdateListener,false);
  ded.addParamChangedListener(this,true);
}
Program: 95703
Project: 95703
Buggy source:
/** 
 * Cleanup on closing.
 */
public void dispose(){
  try {
    DataEventDispatcher ded=DataEventDispatcher.getInstance();
    if (CAPRecordedCommand.getRecordListener() == this) {
      CAPRecordedCommand.setRecordListener(null);
      TestExecutionContributor.getInstance().getClientTest().resetToTesting();
    }
    if (getEditorSite() != null && getEditorSite().getPage() != null) {
      ded.fireRecordModeStateChanged(RecordModeState.notRunning);
      removeGlobalActionHandler();
    }
    ded.removeParamChangedListener(this);
  }
  finally {
    super.dispose();
  }
}

Fixed version (ground truth):
/** 
 * Cleanup on closing.
 */
public void dispose(){
  try {
    DataEventDispatcher ded=DataEventDispatcher.getInstance();
    ded.removeParamChangedListener(this);
    ded.removeDataChangedListener(m_ctdUpdateListener);
    if (CAPRecordedCommand.getRecordListener() == this) {
      CAPRecordedCommand.setRecordListener(null);
      TestExecutionContributor.getInstance().getClientTest().resetToTesting();
    }
    if (getEditorSite() != null && getEditorSite().getPage() != null) {
      ded.fireRecordModeStateChanged(RecordModeState.notRunning);
      removeGlobalActionHandler();
    }
  }
  finally {
    super.dispose();
  }
}
Program: 95704
Project: 95704
Buggy source:
/** 
 * Use this method only from the FX-Thread! Removes the Border
 * @param n the Node
 */
public static void removeHighlight(Node n){
  n.setEffect(oldEffects.remove(n));
}

Fixed version (ground truth):
/** 
 * Use this method only from the FX-Thread! Removes the Border
 * @param n the Node
 */
public static void removeHighlight(Node n){
  if (n.effectProperty().isBound()) {
    return;
  }
  n.setEffect(oldEffects.remove(n));
}