Program: 74217
Project: 74217
Buggy source:
private void saveFile(final ModuleHandle moduleHandle,final File file,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();
      }
    }
  }
;
  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,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()) {
        String oldConfigName=moduleHandle.getStringProperty(IReportGraphicConstants.REPORT_CONFIG_FILE_NAME);
        String newConfigName=getConfigFileName(file.getAbsolutePath());
        File oldConfigFile=oldConfigName == null ? null : new File(oldConfigName);
        if (newConfigName != null && oldConfigFile != null && oldConfigFile.exists()) {
          copyFile(oldConfigFile,new File(newConfigName));
          try {
            moduleHandle.setStringProperty(IReportGraphicConstants.REPORT_CONFIG_FILE_NAME,newConfigName);
          }
 catch (          SemanticException e) {
            ExceptionHandler.handle(e,true);
          }
        }
        FileOutputStream out=new FileOutputStream(file);
        moduleHandle.serialize(out);
        out.close();
      }
    }
  }
;
  try {
    new ProgressMonitorDialog(UIUtil.getDefaultShell()).run(false,true,op);
  }
 catch (  Exception e) {
    ExceptionHandler.handle(e);
  }
}