Program: 74047
Project: 74047
Buggy source:
public void doSaveAs(){
  final IReportProvider provider=getProvider();
  if (provider != null) {
    IPath path=provider.getSaveAsPath(getEditorInput());
    if (path == null) {
      return;
    }
    final IEditorInput input=provider.createNewEditorInput(path);
    setInput(input);
    IRunnableWithProgress op=new IRunnableWithProgress(){
      public synchronized final void run(      IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
        final InvocationTargetException[] iteHolder=new InvocationTargetException[1];
        try {
          IWorkspaceRunnable workspaceRunnable=new IWorkspaceRunnable(){
            public void run(            IProgressMonitor pm) throws CoreException {
              try {
                execute(pm);
              }
 catch (              InvocationTargetException e) {
                iteHolder[0]=e;
              }
catch (              InterruptedException e) {
                throw new OperationCanceledException(e.getMessage());
              }
            }
          }
;
          ResourcesPlugin.getWorkspace().run(workspaceRunnable,ResourcesPlugin.getWorkspace().getRoot(),IResource.NONE,monitor);
        }
 catch (        CoreException e) {
          throw new InvocationTargetException(e);
        }
catch (        OperationCanceledException e) {
          throw new InterruptedException(e.getMessage());
        }
        if (iteHolder[0] != null) {
          throw iteHolder[0];
        }
      }
      public void execute(      final IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
        try {
          if (!input.exists()) {
          }
          doSave(monitor);
        }
 catch (        Exception e) {
          ExceptionHandler.handle(e);
        }
      }
    }
;
    try {
      new ProgressMonitorDialog(getSite().getWorkbenchWindow().getShell()).run(false,true,op);
    }
 catch (    Exception e) {
      ExceptionHandler.handle(e);
    }
  }
}

Fixed version (ground truth):
public void doSaveAs(){
  final IReportProvider provider=getProvider();
  if (provider != null) {
    IPath path=provider.getSaveAsPath(getEditorInput());
    if (path == null) {
      return;
    }
    final IPath origReportPath=provider.getInputPath(getEditorInput());
    final IEditorInput input=provider.createNewEditorInput(path);
    setInput(input);
    IRunnableWithProgress op=new IRunnableWithProgress(){
      public synchronized final void run(      IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
        final InvocationTargetException[] iteHolder=new InvocationTargetException[1];
        try {
          IWorkspaceRunnable workspaceRunnable=new IWorkspaceRunnable(){
            public void run(            IProgressMonitor pm) throws CoreException {
              try {
                execute(pm);
              }
 catch (              InvocationTargetException e) {
                iteHolder[0]=e;
              }
catch (              InterruptedException e) {
                throw new OperationCanceledException(e.getMessage());
              }
            }
          }
;
          ResourcesPlugin.getWorkspace().run(workspaceRunnable,ResourcesPlugin.getWorkspace().getRoot(),IResource.NONE,monitor);
        }
 catch (        CoreException e) {
          throw new InvocationTargetException(e);
        }
catch (        OperationCanceledException e) {
          throw new InterruptedException(e.getMessage());
        }
        if (iteHolder[0] != null) {
          throw iteHolder[0];
        }
      }
      public void execute(      final IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
        try {
          if (!input.exists()) {
          }
          IReportProvider provider=getProvider();
          if (provider != null) {
            provider.saveReport(getModel(),getEditorInput(),origReportPath,monitor);
            firePropertyChange(PROP_DIRTY);
          }
        }
 catch (        Exception e) {
          ExceptionHandler.handle(e);
        }
      }
    }
;
    try {
      new ProgressMonitorDialog(getSite().getWorkbenchWindow().getShell()).run(false,true,op);
    }
 catch (    Exception e) {
      ExceptionHandler.handle(e);
    }
  }
}