Program: 70778
Project: 70778
Buggy source:
private void saveFile(final ModuleHandle moduleHandle,final File file,final IPath oldReportPath,IProgressMonitor monitor){
  IRunnableWithProgress op=new IRunnableWithProgress(){
    public synchronized final void run(    IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
      try {
        IWorkspaceRunnable workspaceRunnable=new IWorkspaceRunnable(){
          public void run(          IProgressMonitor pm) throws CoreException {
            try {
              execute(pm);
            }
 catch (            CoreException e) {
              throw e;
            }
catch (            IOException e) {
              ExceptionHandler.handle(e);
            }
          }
        }
;
        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());
      }
    }
    public void execute(    final IProgressMonitor monitor) throws CoreException, IOException {
      if (file.exists() || file.createNewFile()) {
        FileOutputStream out=new FileOutputStream(file);
        moduleHandle.serialize(out);
        out.close();
        if (oldReportPath != null) {
          copyReportConfigFile(new Path(file.getAbsolutePath()),oldReportPath);
        }
      }
    }
  }
;
  try {
    new ProgressMonitorDialog(UIUtil.getDefaultShell()).run(false,true,op);
  }
 catch (  Exception e) {
    ExceptionHandler.handle(e);
  }
}

Fixed version (ground truth):
private void saveFile(final ModuleHandle moduleHandle,final File file,final IPath oldReportPath,IProgressMonitor monitor){
  if (file.exists() && !file.canWrite()) {
    MessageDialog.openError(UIUtil.getDefaultShell(),Messages.getString("String_Node_Str"),Messages.getFormattedString("String_Node_Str",new Object[]{file.getAbsolutePath()}));
    return;
  }
  IRunnableWithProgress op=new IRunnableWithProgress(){
    public synchronized final void run(    IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
      try {
        IWorkspaceRunnable workspaceRunnable=new IWorkspaceRunnable(){
          public void run(          IProgressMonitor pm) throws CoreException {
            try {
              execute(pm);
            }
 catch (            CoreException e) {
              throw e;
            }
catch (            IOException e) {
              ExceptionHandler.handle(e);
            }
          }
        }
;
        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());
      }
    }
    public void execute(    final IProgressMonitor monitor) throws CoreException, IOException {
      if (file.exists() || file.createNewFile()) {
        FileOutputStream out=new FileOutputStream(file);
        moduleHandle.serialize(out);
        out.close();
        if (oldReportPath != null) {
          copyReportConfigFile(new Path(file.getAbsolutePath()),oldReportPath);
        }
      }
    }
  }
;
  try {
    new ProgressMonitorDialog(UIUtil.getDefaultShell()).run(false,true,op);
  }
 catch (  Exception e) {
    ExceptionHandler.handle(e);
  }
}