Program: 69252
Project: 69252
Buggy source:
private void doFinish(IPath containerName,String fileName,String sourceFileName,IProgressMonitor monitor) throws CoreException {
  monitor.beginTask(CREATING + fileName,2);
  IResource resource=ResourcesPlugin.getWorkspace().getRoot().findMember(containerName);
  IContainer container=null;
  if (resource == null || !resource.exists() || !(resource instanceof IContainer)) {
    IFolder folder=createFolderHandle(containerName);
    UIUtil.createFolder(folder,monitor);
    container=folder;
  }
 else {
    container=(IContainer)resource;
  }
  final IFile file=container.getFile(new Path(fileName));
  try {
    ModuleHandle handle=SessionHandleAdapter.getInstance().getSessionHandle().createLibraryFromTemplate(sourceFileName);
    if (ReportPlugin.getDefault().getEnableCommentPreference(file.getProject())) {
      handle.setStringProperty(ModuleHandle.COMMENTS_PROP,ReportPlugin.getDefault().getCommentPreference(file.getProject()));
    }
    if (ReportPlugin.getDefault().getDefaultUnitPreference(file.getProject()) != null) {
      handle.setStringProperty(ModuleHandle.UNITS_PROP,ReportPlugin.getDefault().getDefaultUnitPreference(file.getProject()));
    }
    if (inPredifinedTemplateFolder(sourceFileName)) {
      String description=handle.getDescription();
      if (description != null && description.trim().length() > 0) {
        handle.setDescription(Messages.getString(description));
      }
    }
    handle.saveAs(file.getLocation().toOSString());
    handle.close();
  }
 catch (  Exception e) {
  }
  container.refreshLocal(IResource.DEPTH_INFINITE,monitor);
  monitor.worked(1);
  monitor.setTaskName(OPENING_FILE_FOR_EDITING);
  getShell().getDisplay().asyncExec(new Runnable(){
    public void run(){
      IWorkbench workbench=PlatformUI.getWorkbench();
      IWorkbenchWindow window=workbench.getActiveWorkbenchWindow();
      IWorkbenchPage page=window.getActivePage();
      try {
        IDE.openEditor(page,file,true);
      }
 catch (      Exception e) {
        ExceptionHandler.handle(e);
      }
    }
  }
);
  monitor.worked(1);
  fireLibraryChanged(fileName);
}

Fixed version (ground truth):
private void doFinish(IPath containerName,String fileName,String sourceFileName,IProgressMonitor monitor) throws CoreException {
  monitor.beginTask(CREATING + fileName,2);
  IResource resource=ResourcesPlugin.getWorkspace().getRoot().findMember(containerName);
  IContainer container=null;
  if (resource == null || !resource.exists() || !(resource instanceof IContainer)) {
    IFolder folder=createFolderHandle(containerName);
    UIUtil.createFolder(folder,monitor);
    container=folder;
  }
 else {
    container=(IContainer)resource;
  }
  final IFile file=container.getFile(new Path(fileName));
  try {
    ModuleHandle handle=SessionHandleAdapter.getInstance().getSessionHandle().createLibraryFromTemplate(sourceFileName);
    if (ReportPlugin.getDefault().getEnableCommentPreference(file.getProject())) {
      handle.setStringProperty(ModuleHandle.COMMENTS_PROP,ReportPlugin.getDefault().getCommentPreference(file.getProject()));
    }
    if (ReportPlugin.getDefault().getDefaultUnitPreference(file.getProject()) != null) {
      handle.setStringProperty(ModuleHandle.UNITS_PROP,ReportPlugin.getDefault().getDefaultUnitPreference(file.getProject()));
    }
    if (inPredifinedTemplateFolder(sourceFileName)) {
      String description=handle.getDescription();
      if (description != null && description.trim().length() > 0) {
        handle.setDescription(Messages.getString(description));
      }
    }
    UIUtil.addCreateBy(handle);
    handle.saveAs(file.getLocation().toOSString());
    handle.close();
  }
 catch (  Exception e) {
  }
  container.refreshLocal(IResource.DEPTH_INFINITE,monitor);
  monitor.worked(1);
  monitor.setTaskName(OPENING_FILE_FOR_EDITING);
  getShell().getDisplay().asyncExec(new Runnable(){
    public void run(){
      IWorkbench workbench=PlatformUI.getWorkbench();
      IWorkbenchWindow window=workbench.getActiveWorkbenchWindow();
      IWorkbenchPage page=window.getActivePage();
      try {
        IDE.openEditor(page,file,true);
      }
 catch (      Exception e) {
        ExceptionHandler.handle(e);
      }
    }
  }
);
  monitor.worked(1);
  fireLibraryChanged(fileName);
}