Program: 139830
Project: 139830
Buggy source:
private void delRelatedResource(boolean isDeleteContent,IResource[] selectedResources){
  if (!isDeleteContent) {
    return;
  }
  for (  IResource selectedResource : selectedResources) {
    if (selectedResource.getType() != IResource.FILE) {
      continue;
    }
    String folderName=null;
    if (PluginConstant.HTML_SUFFIX.equalsIgnoreCase(selectedResource.getFileExtension())) {
      folderName=selectedResource.getFullPath().lastSegment() + "String_Node_Str";
    }
 else     if (FactoriesUtil.REP.equalsIgnoreCase(selectedResource.getFileExtension())) {
      folderName="String_Node_Str" + selectedResource.getFullPath().removeFileExtension().lastSegment();
    }
 else     if (FactoriesUtil.PROV.equalsIgnoreCase(selectedResource.getFileExtension())) {
      TypedReturnCode<TdDataProvider> findProvider=PrvResourceFileHelper.getInstance().findProvider((IFile)selectedResource);
      TdSoftwareSystem softwareSystem=DataProviderHelper.getSoftwareSystem(findProvider.getObject());
      EMFSharedResources.getInstance().getSoftwareDeploymentResource().getContents().remove(softwareSystem);
      EMFSharedResources.getInstance().saveSoftwareDeploymentResource();
      continue;
    }
 else {
      continue;
    }
    IFolder folder=((IFolder)selectedResource.getParent()).getFolder(folderName);
    if (folder.exists()) {
      try {
        folder.delete(true,null);
      }
 catch (      CoreException e) {
        Log.warn("String_Node_Str" + folder.getLocationURI().toString(),e);
      }
    }
  }
}

Fixed version (ground truth):
private void delRelatedResource(boolean isDeleteContent,IResource[] selectedResources){
  if (!isDeleteContent) {
    return;
  }
  for (  IResource selectedResource : selectedResources) {
    if (selectedResource.getType() != IResource.FILE) {
      continue;
    }
    String folderName=null;
    if (PluginConstant.HTML_SUFFIX.equalsIgnoreCase(selectedResource.getFileExtension())) {
      folderName=selectedResource.getFullPath().lastSegment() + "String_Node_Str";
    }
 else     if (FactoriesUtil.REP.equalsIgnoreCase(selectedResource.getFileExtension())) {
      folderName="String_Node_Str" + selectedResource.getFullPath().removeFileExtension().lastSegment();
    }
 else     if (FactoriesUtil.PROV.equalsIgnoreCase(selectedResource.getFileExtension())) {
      TypedReturnCode<TdDataProvider> findProvider=PrvResourceFileHelper.getInstance().findProvider((IFile)selectedResource);
      TdSoftwareSystem softwareSystem=DataProviderHelper.getSoftwareSystem(findProvider.getObject());
      EMFSharedResources.getInstance().getSoftwareDeploymentResource().getContents().remove(softwareSystem);
      EMFSharedResources.getInstance().saveSoftwareDeploymentResource();
      CorePlugin.getDefault().removeConnetionAliasFromSQLPlugin(findProvider.getObject());
      continue;
    }
 else {
      continue;
    }
    IFolder folder=((IFolder)selectedResource.getParent()).getFolder(folderName);
    if (folder.exists()) {
      try {
        folder.delete(true,null);
      }
 catch (      CoreException e) {
        Log.warn("String_Node_Str" + folder.getLocationURI().toString(),e);
      }
    }
  }
}