Program: 140375
Project: 140375
Buggy source:
private boolean checkDeleteContent(IResource[] selectedResources){
  List<ModelElement> modelElementList=new ArrayList<ModelElement>();
  IFile file;
  ModelElement modelElement;
  boolean otherFilesExistFlag=false;
  String otherFileName=null;
  boolean anaMessageFlag=false, repMessageFlag=false;
  String dialogMessage;
  for (  IResource res : selectedResources) {
    if (!(res instanceof IFile)) {
      continue;
    }
 else {
      file=(IFile)res;
    }
    if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.PROV)) {
      TypedReturnCode<TdDataProvider> returnValue=PrvResourceFileHelper.getInstance().getTdProvider(file);
      modelElement=returnValue.getObject();
      modelElementList.add(modelElement);
      anaMessageFlag=true;
    }
 else     if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.ANA)) {
      modelElement=AnaResourceFileHelper.getInstance().findAnalysis(file);
      modelElementList.add(modelElement);
      repMessageFlag=true;
    }
 else     if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.PATTERN)) {
      Pattern pattern=PatternResourceFileHelper.getInstance().findPattern(file);
      modelElementList.add(pattern);
      anaMessageFlag=true;
    }
 else {
      otherFilesExistFlag=true;
      if (res.getFileExtension().equalsIgnoreCase(FactoriesUtil.REP)) {
        TdReport findReport=RepResourceFileHelper.getInstance().findReport(file);
        otherFileName=findReport.getName();
      }
 else {
        otherFileName=file.getName();
      }
    }
  }
  if (modelElementList.size() > 0 && !otherFilesExistFlag) {
    if (anaMessageFlag && repMessageFlag) {
      dialogMessage="String_Node_Str";
    }
 else     if (anaMessageFlag) {
      dialogMessage="String_Node_Str";
    }
 else {
      dialogMessage="String_Node_Str";
    }
    int showDialog=DeleteModelElementConfirmDialog.showDialog(null,modelElementList.toArray(new ModelElement[modelElementList.size()]),dialogMessage);
    isDeleteContent=showDialog == Window.OK;
  }
 else   if (otherFilesExistFlag) {
    isDeleteContent=popConfirmDialog(otherFileName,selectedResources);
  }
  return isDeleteContent;
}

Fixed version (ground truth):
private boolean checkDeleteContent(IResource[] selectedResources){
  List<ModelElement> modelElementList=new ArrayList<ModelElement>();
  IFile file;
  ModelElement modelElement;
  boolean otherFilesExistFlag=false;
  String otherFileName=null;
  boolean anaMessageFlag=false, repMessageFlag=false;
  String dialogMessage;
  for (  IResource res : selectedResources) {
    if (!(res instanceof IFile)) {
      continue;
    }
 else {
      file=(IFile)res;
    }
    if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.PROV)) {
      TypedReturnCode<TdDataProvider> returnValue=PrvResourceFileHelper.getInstance().readFromFile(file);
      modelElement=returnValue.getObject();
      modelElementList.add(modelElement);
      anaMessageFlag=true;
    }
 else     if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.ANA)) {
      modelElement=AnaResourceFileHelper.getInstance().readFromFile(file);
      modelElementList.add(modelElement);
      repMessageFlag=true;
    }
 else     if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.PATTERN)) {
      Pattern pattern=PatternResourceFileHelper.getInstance().findPattern(file);
      modelElementList.add(pattern);
      anaMessageFlag=true;
    }
 else {
      otherFilesExistFlag=true;
      if (res.getFileExtension().equalsIgnoreCase(FactoriesUtil.REP)) {
        TdReport findReport=RepResourceFileHelper.getInstance().findReport(file);
        otherFileName=findReport.getName();
      }
 else {
        otherFileName=file.getName();
      }
    }
  }
  if (modelElementList.size() > 0 && !otherFilesExistFlag) {
    if (anaMessageFlag && repMessageFlag) {
      dialogMessage="String_Node_Str";
    }
 else     if (anaMessageFlag) {
      dialogMessage="String_Node_Str";
    }
 else {
      dialogMessage="String_Node_Str";
    }
    int showDialog=DeleteModelElementConfirmDialog.showDialog(null,modelElementList.toArray(new ModelElement[modelElementList.size()]),dialogMessage);
    isDeleteContent=showDialog == Window.OK;
  }
 else   if (otherFilesExistFlag) {
    isDeleteContent=popConfirmDialog(otherFileName,selectedResources);
  }
  return isDeleteContent;
}