Program: 138325
Project: 138325
Buggy source:
@Override protected void performSaveAs(IProgressMonitor progressMonitor){
  Shell shell=getSite().getShell();
  final IEditorInput input=getEditorInput();
  IDocumentProvider provider=getDocumentProvider();
  IEditorInput newInput;
  if (input instanceof IURIEditorInput && !(input instanceof IFileEditorInput)) {
    super.performSaveAs(progressMonitor);
    return;
  }
  IProject rootProject=SQLExplorerPlugin.getDefault().getRootProject();
  final IFolder defaultValidFolder=rootProject.getFolder("String_Node_Str").getFolder("String_Node_Str");
  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(rootProject);
  dialog.addFilter(new ViewerFilter(){
    @Override public boolean select(    Viewer viewer,    Object parentElement,    Object element){
      if (element instanceof IFolder) {
        IFolder folder=(IFolder)element;
        if ("String_Node_Str".equals(folder.getName()) || "String_Node_Str".equals(folder.getName())) {
          return true;
        }
 else {
          return defaultValidFolder.getFullPath().isPrefixOf(folder.getFullPath()) && !folder.getName().endsWith(SVN_FOLDER_NAME);
        }
      }
      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];
  String fileName=getValidFileName(dialog.getFileName());
  IResource elem=(IResource)elements;
  if (elem instanceof IFolder) {
    IPath filePath=((IFolder)elem).getFullPath();
    filePath=filePath.append(fileName);
    if (filePath == null) {
      if (progressMonitor != null)       progressMonitor.setCanceled(true);
      return;
    }
    IWorkspace workspace=ResourcesPlugin.getWorkspace();
    IFile file=workspace.getRoot().getFile(filePath);
    while (fileExist(file)) {
      InputDialog inputDialog=new InputDialog(getSite().getShell(),"String_Node_Str","String_Node_Str",filePath.lastSegment(),null);
      if (inputDialog.open() == InputDialog.CANCEL) {
        return;
      }
 else {
        IPath lseg=filePath.removeLastSegments(1);
        IPath append=lseg.append(inputDialog.getValue());
        file=workspace.getRoot().getFile(append);
      }
    }
    newInput=new FileEditorInput(file);
    if (provider == null) {
      return;
    }
    boolean success=false;
    try {
      provider.aboutToChange(newInput);
      file=createIFile(progressMonitor,file,getViewer().getDocument().get());
      newInput=new FileEditorInput(file);
      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();
  IEditorInput newInput;
  if (input instanceof IURIEditorInput && !(input instanceof IFileEditorInput)) {
    super.performSaveAs(progressMonitor);
    return;
  }
  IProject rootProject=SQLExplorerPlugin.getDefault().getRootProject();
  final IFolder defaultValidFolder=rootProject.getFolder("String_Node_Str").getFolder("String_Node_Str");
  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(rootProject);
  dialog.addFilter(new ViewerFilter(){
    @Override public boolean select(    Viewer viewer,    Object parentElement,    Object element){
      if (element instanceof IFolder) {
        IFolder folder=(IFolder)element;
        if ("String_Node_Str".equals(folder.getName()) || "String_Node_Str".equals(folder.getName())) {
          return true;
        }
 else {
          return defaultValidFolder.getFullPath().isPrefixOf(folder.getFullPath()) && !folder.getName().endsWith(SVN_FOLDER_NAME);
        }
      }
      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];
  String fileName=getValidFileName(dialog.getFileName());
  IResource elem=(IResource)elements;
  if (elem instanceof IFolder) {
    IPath filePath=((IFolder)elem).getFullPath();
    filePath=filePath.append(fileName);
    if (filePath == null) {
      if (progressMonitor != null)       progressMonitor.setCanceled(true);
      return;
    }
    IWorkspace workspace=ResourcesPlugin.getWorkspace();
    IFile file=workspace.getRoot().getFile(filePath);
    while (fileExist(file)) {
      InputDialog inputDialog=new InputDialog(getSite().getShell(),"String_Node_Str","String_Node_Str",filePath.lastSegment(),null);
      if (inputDialog.open() == InputDialog.CANCEL) {
        return;
      }
 else {
        IPath lseg=filePath.removeLastSegments(1);
        IPath append=lseg.append(inputDialog.getValue());
        file=workspace.getRoot().getFile(append);
      }
    }
    newInput=new FileEditorInput(file);
    if (provider == null) {
      return;
    }
    boolean success=false;
    try {
      provider.aboutToChange(newInput);
      file=createIFile(file,getViewer().getDocument().get());
      newInput=new FileEditorInput(file);
      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);
  }
}