Program: 137532
Project: 137532
Buggy source:
/** 
 * physical Delete all selected nodes, if the node has dependency, will popup a confirm dialog with lists of dependencies
 * @param deleteNodes
 * @param shownNodes
 * @param findAllRecycleBinNodes
 * @param isStateDeleted
 */
private void physicalDelete(List deleteNodes,List<IRepositoryNode> shownNodes,List<IRepositoryNode> findAllRecycleBinNodes){
  confirmFromDialog=true;
  List<IRepositoryNode> folderNodeWhichChildHadDepend=null;
  for (int i=selectedNodes.size() - 1; i >= 0; i--) {
    if (selectedNodes.size() == 0) {
      break;
    }
    RepositoryNode node=selectedNodes.get(i);
    RepositoryNode parent=node.getParent();
    if (DQRepositoryNode.isOnFilterring()) {
      for (      IRepositoryNode iRepositoryNode : findAllRecycleBinNodes) {
        if (node.equals(iRepositoryNode)) {
          node=(RepositoryNode)iRepositoryNode;
          shownNodes=RepositoryNodeHelper.findAllChildrenNodes(deleteNodes);
          break;
        }
      }
      if (!RepositoryNodeHelper.isEmptyRecycleBin(findAllRecycleBinNodes,shownNodes)) {
        break;
      }
    }
    if (node.getType() == ENodeType.SIMPLE_FOLDER || node.getType() == ENodeType.SYSTEM_FOLDER) {
      List<IRepositoryNode> newLs=RepositoryNodeHelper.getRepositoryElementFromFolder(node,true);
      boolean haveSubNode=false;
      for (      IRepositoryNode subNode : newLs) {
        if (!hasDependencyClients(subNode)) {
          excuteSuperRun((RepositoryNode)subNode,node);
        }
 else {
          haveSubNode=true;
          if (folderNodeWhichChildHadDepend == null) {
            folderNodeWhichChildHadDepend=new ArrayList<IRepositoryNode>();
          }
          folderNodeWhichChildHadDepend.add(node);
        }
      }
      if (!haveSubNode) {
        excuteSuperRun(node,parent);
      }
    }
 else {
      if (!hasDependencyClients(node)) {
        excuteSuperRun(node,parent);
      }
    }
  }
  boolean forceDelete=false;
  if (nodeWithDependsMap.size() > 0) {
    forceDelete=DeleteModelElementConfirmDialog.showDialog(nodeWithDependsMap,DefaultMessagesImpl.getString("String_Node_Str"),true);
    if (forceDelete) {
      Iterator iter=nodeWithDependsMap.entrySet().iterator();
      while (iter.hasNext()) {
        Map.Entry<IRepositoryNode,List<ModelElement>> entry=(Map.Entry<IRepositoryNode,List<ModelElement>>)iter.next();
        IRepositoryNode node=entry.getKey();
        List<ModelElement> dependencies=entry.getValue();
        excuteSuperRun((RepositoryNode)node,node.getParent());
        physicalDeleteDependencies(dependencies);
      }
    }
  }
  nodeWithDependsMap.clear();
  if (folderNodeWhichChildHadDepend != null && folderNodeWhichChildHadDepend.size() > 0) {
    if (forceDelete) {
      for (      IRepositoryNode folder : folderNodeWhichChildHadDepend) {
        excuteSuperRun((RepositoryNode)folder,folder.getParent());
      }
    }
  }
  confirmFromDialog=false;
}

Fixed version (ground truth):
/** 
 * physical Delete all selected nodes, if the node has dependency, will popup a confirm dialog with lists of dependencies
 * @param deleteNodes
 * @param shownNodes
 * @param findAllRecycleBinNodes
 * @param isStateDeleted
 */
private void physicalDelete(List deleteNodes,List<IRepositoryNode> shownNodes,List<IRepositoryNode> findAllRecycleBinNodes){
  confirmForDQ=true;
  List<IRepositoryNode> folderNodeWhichChildHadDepend=null;
  for (int i=selectedNodes.size() - 1; i >= 0; i--) {
    if (selectedNodes.size() == 0) {
      break;
    }
    RepositoryNode node=selectedNodes.get(i);
    RepositoryNode parent=node.getParent();
    if (DQRepositoryNode.isOnFilterring()) {
      for (      IRepositoryNode iRepositoryNode : findAllRecycleBinNodes) {
        if (node.equals(iRepositoryNode)) {
          node=(RepositoryNode)iRepositoryNode;
          shownNodes=RepositoryNodeHelper.findAllChildrenNodes(deleteNodes);
          break;
        }
      }
      if (!RepositoryNodeHelper.isEmptyRecycleBin(findAllRecycleBinNodes,shownNodes)) {
        break;
      }
    }
    if (node.getType() == ENodeType.SIMPLE_FOLDER || node.getType() == ENodeType.SYSTEM_FOLDER) {
      List<IRepositoryNode> newLs=RepositoryNodeHelper.getRepositoryElementFromFolder(node,true);
      boolean haveSubNode=false;
      for (      IRepositoryNode subNode : newLs) {
        if (!hasDependencyClients(subNode)) {
          excuteSuperRun((RepositoryNode)subNode,node);
        }
 else {
          haveSubNode=true;
          if (folderNodeWhichChildHadDepend == null) {
            folderNodeWhichChildHadDepend=new ArrayList<IRepositoryNode>();
          }
          folderNodeWhichChildHadDepend.add(node);
        }
      }
      if (!haveSubNode) {
        excuteSuperRun(node,parent);
      }
    }
 else {
      if (!hasDependencyClients(node)) {
        excuteSuperRun(node,parent);
      }
    }
  }
  boolean forceDelete=false;
  if (nodeWithDependsMap.size() > 0) {
    forceDelete=DeleteModelElementConfirmDialog.showDialog(nodeWithDependsMap,DefaultMessagesImpl.getString("String_Node_Str"),true);
    if (forceDelete) {
      Iterator iter=nodeWithDependsMap.entrySet().iterator();
      while (iter.hasNext()) {
        Map.Entry<IRepositoryNode,List<ModelElement>> entry=(Map.Entry<IRepositoryNode,List<ModelElement>>)iter.next();
        IRepositoryNode node=entry.getKey();
        List<ModelElement> dependencies=entry.getValue();
        excuteSuperRun((RepositoryNode)node,node.getParent());
        physicalDeleteDependencies(dependencies);
      }
    }
  }
  nodeWithDependsMap.clear();
  if (folderNodeWhichChildHadDepend != null && folderNodeWhichChildHadDepend.size() > 0) {
    if (forceDelete) {
      for (      IRepositoryNode folder : folderNodeWhichChildHadDepend) {
        excuteSuperRun((RepositoryNode)folder,folder.getParent());
      }
    }
  }
  confirmForDQ=false;
}