Program: 138737
Project: 138737
Buggy source:
@Test public void testLogilcalDelElements() throws Exception {
  IFolder folder=ResourceManager.getAnalysisFolder();
  IResource res[]=folder.members();
  IDeletionHandle handle=null;
  for (  IResource re : res) {
    if (re instanceof IFile) {
      IFile file=(IFile)re;
      if (file.exists() && FactoriesUtil.isEmfFile(file.getFileExtension())) {
        Property property=PropertyHelper.getProperty(file);
        handle=ActionHandleFactory.createDeletionHandle(property);
        boolean runStatus=handle.delete();
        if (runStatus) {
          System.out.println("String_Node_Str" + file.getName() + "String_Node_Str");
        }
      }
    }
 else     if (re instanceof IFolder) {
      IFolder subfolder=(IFolder)re;
      List<IFile> filsLs=new ArrayList<IFile>();
      getAllSubFiles(subfolder,filsLs);
      boolean hasDelFailing=false;
      for (      IFile file : filsLs) {
        if (file.exists() && FactoriesUtil.isEmfFile(file.getFileExtension())) {
          Property property=PropertyHelper.getProperty(file);
          handle=ActionHandleFactory.createDeletionHandle(property);
          List<ModelElement> dependencies=handle.getDependencies();
          if (dependencies != null && !dependencies.isEmpty()) {
            hasDelFailing=true;
            break;
          }
          if (handle.delete()) {
            System.out.println("String_Node_Str" + file.getName() + "String_Node_Str");
          }
 else {
            hasDelFailing=true;
          }
        }
      }
      if (!hasDelFailing) {
        LogicalDeleteFileHandle.replaceInFile(LogicalDeleteFileHandle.folderType + subfolder.getFullPath().toOSString(),PluginConstant.EMPTY_STRING);
        LogicalDeleteFileHandle.saveElement(LogicalDeleteFileHandle.folderType,subfolder.getFullPath().toOSString());
        System.out.println("String_Node_Str" + subfolder.getName() + "String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
@Test public void testLogilcalDelElements() throws Exception {
  IFolder folder=ResourceManager.getAnalysisFolder();
  IResource res[]=folder.members();
  IDeletionHandle handle=null;
  for (  IResource re : res) {
    if (re instanceof IFile) {
      IFile file=(IFile)re;
      if (file.exists() && FactoriesUtil.isEmfFile(file.getFileExtension())) {
        Property property=PropertyHelper.getProperty(file);
        handle=ActionHandleFactory.createDeletionHandle(property);
        boolean runStatus=handle.delete();
        if (runStatus) {
          System.out.println("String_Node_Str" + file.getName() + "String_Node_Str");
        }
      }
    }
 else     if (re instanceof IFolder) {
      IFolder subfolder=(IFolder)re;
      List<IFile> filsLs=new ArrayList<IFile>();
      getAllSubFiles(subfolder,filsLs);
      boolean hasDelFailing=false;
      for (      IFile file : filsLs) {
        if (file.exists() && FactoriesUtil.isEmfFile(file.getFileExtension())) {
          Property property=PropertyHelper.getProperty(file);
          handle=ActionHandleFactory.createDeletionHandle(property);
          List<ModelElement> dependencies=handle.getDependencies();
          if (dependencies != null && !dependencies.isEmpty()) {
            hasDelFailing=true;
            break;
          }
          if (handle.delete()) {
            System.out.println("String_Node_Str" + file.getName() + "String_Node_Str");
          }
 else {
            hasDelFailing=true;
          }
        }
      }
      if (!hasDelFailing) {
        System.out.println("String_Node_Str" + subfolder.getName() + "String_Node_Str");
      }
    }
  }
}