Program: 139759
Project: 139759
Buggy source:
@Override public boolean performFinish(){
  String targetFile=page.getTargetFile();
  Object[] elements=page.getSelectedPatternsTree().getCheckedElements();
  List<Pattern> seletedPatterns=new ArrayList<Pattern>();
  for (  Object element : elements) {
    if (element instanceof IFile) {
      IFile file=(IFile)element;
      if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.PATTERN)) {
        seletedPatterns.add(PatternResourceFileHelper.getInstance().findPattern(file));
      }
    }
  }
  if ("String_Node_Str".equals(targetFile)) {
    MessageDialog.openError(getShell(),"String_Node_Str","String_Node_Str");
    return false;
  }
 else {
    File resource=new File(targetFile);
    if (isForExchange) {
      if (resource.isDirectory()) {
        ExportFactory.export(resource,folder,seletedPatterns.toArray(new Pattern[seletedPatterns.size()]));
        for (Iterator iterator=seletedPatterns.iterator(); iterator.hasNext(); ) {
          Pattern pattern=(Pattern)iterator.next();
          File patternFile=new File(resource,pattern.getName() + "String_Node_Str");
          if (patternFile.isFile() && patternFile.exists()) {
            try {
              FilesUtils.zip(patternFile,patternFile.getPath() + "String_Node_Str");
              patternFile.delete();
            }
 catch (            Exception e) {
              log.error(e.getMessage(),e);
            }
          }
        }
        return true;
      }
      MessageDialog.openError(getShell(),"String_Node_Str","String_Node_Str");
      return false;
    }
 else {
      if (!resource.getName().endsWith("String_Node_Str")) {
        MessageDialog.openError(getShell(),"String_Node_Str","String_Node_Str");
        return false;
      }
      boolean isContinue=true;
      if (resource.exists()) {
        isContinue=MessageDialogWithToggle.openConfirm(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
      }
      if (isContinue) {
        ExportFactory.export(resource,folder,seletedPatterns.toArray(new Pattern[seletedPatterns.size()]));
        return true;
      }
      return false;
    }
  }
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  String targetFile=page.getTargetFile();
  Object[] elements=page.getSelectedPatternsTree().getCheckedElements();
  List<Pattern> seletedPatterns=new ArrayList<Pattern>();
  for (  Object element : elements) {
    if (element instanceof IFile) {
      IFile file=(IFile)element;
      if (file.getFileExtension().equalsIgnoreCase(FactoriesUtil.PATTERN)) {
        seletedPatterns.add(PatternResourceFileHelper.getInstance().findPattern(file));
      }
    }
  }
  if ("String_Node_Str".equals(targetFile)) {
    MessageDialog.openError(getShell(),"String_Node_Str","String_Node_Str");
    return false;
  }
 else {
    File resource=new File(targetFile);
    if (isForExchange) {
      ExportFactory.export(resource,folder,seletedPatterns.toArray(new Pattern[seletedPatterns.size()]));
      for (Iterator iterator=seletedPatterns.iterator(); iterator.hasNext(); ) {
        Pattern pattern=(Pattern)iterator.next();
        File patternFile=new File(resource,pattern.getName() + "String_Node_Str");
        if (patternFile.isFile() && patternFile.exists()) {
          try {
            FilesUtils.zip(patternFile,patternFile.getPath() + "String_Node_Str");
            patternFile.delete();
          }
 catch (          Exception e) {
            log.error(e.getMessage(),e);
          }
        }
      }
      return true;
    }
 else {
      boolean isContinue=true;
      if (resource.exists()) {
        isContinue=MessageDialogWithToggle.openConfirm(null,DefaultMessagesImpl.getString("String_Node_Str"),DefaultMessagesImpl.getString("String_Node_Str"));
      }
      if (isContinue) {
        ExportFactory.export(resource,folder,seletedPatterns.toArray(new Pattern[seletedPatterns.size()]));
        return true;
      }
      return false;
    }
  }
}