Program: 140723
Project: 140723
Buggy source:
@Override protected void performSaveAs(IProgressMonitor progressMonitor){
  Shell shell=getSite().getShell();
  final IEditorInput input=getEditorInput();
  IDocumentProvider provider=getDocumentProvider();
  final IEditorInput newInput;
  if (input instanceof IURIEditorInput && !(input instanceof IFileEditorInput)) {
    super.performSaveAs(progressMonitor);
    return;
  }
  IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
  ILabelProvider lp=new WorkbenchLabelProvider();
  ITreeContentProvider cp=new WorkbenchContentProvider();
  FolderSelectionDialog dialog=new FolderSelectionDialog(shell,lp,cp);
  dialog.setTitle("String_Node_Str");
  dialog.setMessage("String_Node_Str");
  dialog.setInput(root);
  dialog.addFilter(new ViewerFilter(){
    @Override public boolean select(    Viewer viewer,    Object parentElement,    Object element){
      if (IProject.class.isInstance(element)) {
        return "String_Node_Str".equals(((IProject)element).getName());
      }
 else       if (IFolder.class.isInstance(element)) {
        return "String_Node_Str".equals(((IFolder)element).getName());
      }
      return false;
    }
  }
);
  dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
  if (dialog.open() == Window.CANCEL) {
    if (progressMonitor != null)     progressMonitor.setCanceled(true);
    return;
  }
  Object elements=dialog.getResult()[0];
  IResource elem=(IResource)elements;
  if (elem instanceof IFolder) {
    IPath filePath=((IFolder)elem).getFullPath();
    filePath=filePath.append(getTitle());
    if (filePath == null) {
      if (progressMonitor != null)       progressMonitor.setCanceled(true);
      return;
    }
    IWorkspace workspace=ResourcesPlugin.getWorkspace();
    IFile file=workspace.getRoot().getFile(filePath);
    newInput=new FileEditorInput(file);
    if (provider == null) {
      return;
    }
    boolean success=false;
    try {
      provider.aboutToChange(newInput);
      createIFile(progressMonitor,file,getViewer().getDocument().get());
      success=true;
    }
 catch (    CoreException x) {
      final IStatus status=x.getStatus();
      if (status == null || status.getSeverity() != IStatus.CANCEL) {
        String title="String_Node_Str";
        String msg="String_Node_Str";
        MessageDialog.openError(shell,title,msg);
      }
    }
 finally {
      provider.changed(newInput);
      if (success)       setInput(newInput);
    }
    if (progressMonitor != null)     progressMonitor.setCanceled(!success);
  }
}

Fixed version (ground truth):
@Override protected void performSaveAs(IProgressMonitor progressMonitor){
  Shell shell=getSite().getShell();
  final IEditorInput input=getEditorInput();
  IDocumentProvider provider=getDocumentProvider();
  final IEditorInput newInput;
  if (input instanceof IURIEditorInput && !(input instanceof IFileEditorInput)) {
    super.performSaveAs(progressMonitor);
    return;
  }
  IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
  ILabelProvider lp=new WorkbenchLabelProvider();
  ITreeContentProvider cp=new WorkbenchContentProvider();
  FolderSelectionDialog dialog=new FolderSelectionDialog(shell,lp,cp);
  dialog.setTitle("String_Node_Str");
  dialog.setMessage("String_Node_Str");
  dialog.setInput(root);
  dialog.addFilter(new ViewerFilter(){
    @Override public boolean select(    Viewer viewer,    Object parentElement,    Object element){
      if (IProject.class.isInstance(element)) {
        return "String_Node_Str".equals(((IProject)element).getName());
      }
 else       if (IFolder.class.isInstance(element)) {
        IPath path=new Path("String_Node_Str");
        IPath projectRelativePath=((IFolder)element).getProjectRelativePath();
        return path.isPrefixOf(projectRelativePath);
      }
      return false;
    }
  }
);
  dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
  if (dialog.open() == Window.CANCEL) {
    if (progressMonitor != null)     progressMonitor.setCanceled(true);
    return;
  }
  Object elements=dialog.getResult()[0];
  IResource elem=(IResource)elements;
  if (elem instanceof IFolder) {
    IPath filePath=((IFolder)elem).getFullPath();
    filePath=filePath.append(getTitle());
    if (filePath == null) {
      if (progressMonitor != null)       progressMonitor.setCanceled(true);
      return;
    }
    IWorkspace workspace=ResourcesPlugin.getWorkspace();
    IFile file=workspace.getRoot().getFile(filePath);
    newInput=new FileEditorInput(file);
    if (provider == null) {
      return;
    }
    boolean success=false;
    try {
      provider.aboutToChange(newInput);
      createIFile(progressMonitor,file,getViewer().getDocument().get());
      success=true;
    }
 catch (    CoreException x) {
      final IStatus status=x.getStatus();
      if (status == null || status.getSeverity() != IStatus.CANCEL) {
        String title="String_Node_Str";
        String msg="String_Node_Str";
        MessageDialog.openError(shell,title,msg);
      }
    }
 finally {
      provider.changed(newInput);
      if (success)       setInput(newInput);
    }
    if (progressMonitor != null)     progressMonitor.setCanceled(!success);
  }
}