Program: 136276
Project: 136276
Buggy source:
/** 
 * Guide the user through deleting the list of nodes. Inform them of which ones will not be deleted. Ask them to confirm deleting the rest. Use node to actually delete the nodes.
 * @param deleteList
 */
public void deleteNodes(final List<Node> deleteList){
  if (deleteList == null || deleteList.isEmpty())   return;
  final List<Node> toDelete=new ArrayList<Node>();
  final StringBuilder doNotDelete=new StringBuilder();
  int i=0;
  for (  final Node n : deleteList) {
    if (n.isDeleteable()) {
      toDelete.add(n);
    }
 else {
      if (i++ > 0)       doNotDelete.append("String_Node_Str");
      doNotDelete.append(n.getName());
    }
  }
  if (i > 0)   DialogUserNotifier.openWarning("String_Node_Str","String_Node_Str" + doNotDelete);
  if (toDelete.size() > 0) {
    final String listing=Messages.getString("String_Node_Str");
    final StringBuilder sb=new StringBuilder();
    i=0;
    for (    final INode n : toDelete) {
      if (i++ > 0)       sb.append("String_Node_Str");
      sb.append(n.getName());
    }
    final boolean ans=DialogUserNotifier.openConfirm(Messages.getString("String_Node_Str"),listing + sb.toString());
    if (ans) {
      Node currentNode=((Node)mc.getCurrentNode_TypeView());
      Node focusNode=null;
      if (currentNode != null) {
        focusNode=currentNode.getOwningComponent();
        while (toDelete.contains(focusNode)) {
          focusNode=focusNode.getParent();
        }
      }
      for (      final INode n : toDelete)       n.delete();
      mc.refresh(focusNode);
      mc.selectNavigatorNodeAndRefresh(focusNode);
    }
  }
}

Fixed version (ground truth):
/** 
 * Guide the user through deleting the list of nodes. Inform them of which ones will not be deleted. Ask them to confirm deleting the rest. Use node to actually delete the nodes.
 * @param deleteList
 */
public void deleteNodes(final List<Node> deleteList){
  if (deleteList == null || deleteList.isEmpty())   return;
  final List<Node> toDelete=new ArrayList<Node>();
  final StringBuilder doNotDelete=new StringBuilder();
  int i=0;
  for (  final Node n : deleteList) {
    if (n.isDeleteable()) {
      toDelete.add(n);
    }
 else {
      if (i++ > 0)       doNotDelete.append("String_Node_Str");
      doNotDelete.append(n.getName());
    }
  }
  if (i > 0)   DialogUserNotifier.openWarning("String_Node_Str","String_Node_Str" + doNotDelete);
  if (toDelete.size() > 0) {
    final String listing=Messages.getString("String_Node_Str");
    final StringBuilder sb=new StringBuilder();
    i=0;
    for (    final INode n : toDelete) {
      if (i++ > 0)       sb.append("String_Node_Str");
      sb.append(n.getName());
    }
    if (DialogUserNotifier.openConfirm(Messages.getString("String_Node_Str"),listing + sb.toString())) {
      Node currentNode=((Node)mc.getCurrentNode_TypeView());
      Node focusNode=null;
      if (currentNode != null) {
        focusNode=currentNode.getOwningComponent();
        while (toDelete.contains(focusNode)) {
          focusNode=focusNode.getParent();
        }
        if (focusNode instanceof VersionNode)         focusNode=focusNode.getParent();
      }
      for (      final INode n : toDelete)       n.delete();
      mc.refresh(focusNode);
      mc.selectNavigatorNodeAndRefresh(focusNode);
    }
  }
}