Program: 74216
Project: 74216
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();
  ModuleHandle model=getModel();
  if (provider != null && model != null) {
    if (model.getUserPropertyDefnHandle(IReportGraphicConstants.REPORT_CONFIG_FILE_NAME) == null) {
      UserPropertyDefn uDefn=new UserPropertyDefn();
      uDefn.setName(IReportGraphicConstants.REPORT_CONFIG_FILE_NAME);
      try {
        model.addUserPropertyDefn(uDefn);
      }
 catch (      UserPropertyException e) {
        if (!UserPropertyException.DESIGN_EXCEPTION_DUPLICATE_NAME.equals(e.getPropertyName())) {
          ExceptionHandler.handle(e);
        }
      }
    }
    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);
    }
  }
}