Program: 71002
Project: 71002
Buggy source:
/** 
 * Save content to workspace file.
 * @param moduleHandle
 * @param file
 * @param monitor
 */
private void saveFile(final ModuleHandle moduleHandle,final IFile file,final IPath oldReportPath,IProgressMonitor monitor){
  if (file.exists() && file.isReadOnly()) {
    MessageDialog.openError(UIUtil.getDefaultShell(),Messages.getString("String_Node_Str"),Messages.getFormattedString("String_Node_Str",new Object[]{file.getFullPath()}));
    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 {
      ByteArrayOutputStream out=new ByteArrayOutputStream();
      moduleHandle.serialize(out);
      byte[] bytes=out.toByteArray();
      out.close();
      ByteArrayInputStream is=new ByteArrayInputStream(bytes);
      IContainer container=file.getParent();
      if (!container.exists() && container instanceof IFolder) {
        UIUtil.createFolder((IFolder)container,monitor);
      }
      if (file.exists()) {
        file.setContents(is,true,true,monitor);
      }
 else {
        file.create(is,true,monitor);
      }
      if (oldReportPath != null) {
        FileReportProvider.copyReportConfigFile(file.getLocation(),oldReportPath);
      }
    }
  }
;
  try {
    new ProgressMonitorDialog(UIUtil.getDefaultShell()).run(false,true,op);
  }
 catch (  Exception e) {
    ExceptionHandler.handle(e);
  }
  try {
    file.refreshLocal(0,monitor);
  }
 catch (  CoreException e) {
    ExceptionHandler.handle(e);
  }
}

Fixed version (ground truth):
/** 
 * Save content to workspace file.
 * @param moduleHandle
 * @param file
 * @param monitor
 */
private void saveFile(final ModuleHandle moduleHandle,final IFile file,final IPath oldReportPath,IProgressMonitor monitor){
  if (file.exists() && file.isReadOnly()) {
    MessageDialog.openError(UIUtil.getDefaultShell(),Messages.getString("String_Node_Str"),Messages.getFormattedString("String_Node_Str",new Object[]{file.getFullPath()}));
    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 {
      ByteArrayOutputStream out=new ByteArrayOutputStream();
      moduleHandle.serialize(out);
      byte[] bytes=out.toByteArray();
      out.close();
      ByteArrayInputStream is=new ByteArrayInputStream(bytes);
      IContainer container=file.getParent();
      if (!container.exists() && container instanceof IFolder) {
        UIUtil.createFolder((IFolder)container,monitor);
      }
      if (file.exists()) {
        file.setContents(is,true,true,monitor);
      }
 else {
        file.create(is,true,monitor);
      }
      if (oldReportPath != null) {
        FileReportProvider.copyReportConfigFile(file.getLocation(),oldReportPath);
      }
    }
  }
;
  try {
    IRunnableContext runner=getOperationRunner(monitor);
    if (runner != null)     runner.run(false,false,op);
 else     new ProgressMonitorDialog(UIUtil.getDefaultShell()).run(false,true,op);
  }
 catch (  InterruptedException x) {
  }
catch (  Exception e) {
    ExceptionHandler.handle(e);
  }
  try {
    file.refreshLocal(0,monitor);
  }
 catch (  CoreException e) {
    ExceptionHandler.handle(e);
  }
}