Program: 69881
Project: 69881
Buggy source:
private void doFinish(IPath locationPath,String fileName,String sourceFileName,IProgressMonitor monitor){
  monitor.beginTask(CREATING + fileName,2);
  File container=null;
  try {
    container=new File(locationPath.toString());
    if (!container.exists()) {
      container.mkdirs();
    }
  }
 catch (  Exception e) {
    ExceptionHandler.handle(e);
  }
  if (container == null) {
    return;
  }
  final File file=new File(locationPath.toString(),fileName);
  try {
    ModuleHandle handle=SessionHandleAdapter.getInstance().getSessionHandle().openLibrary(sourceFileName);
    if (ReportPlugin.getDefault().getEnableCommentPreference()) {
      handle.setStringProperty(ModuleHandle.COMMENTS_PROP,ReportPlugin.getDefault().getCommentPreference());
    }
    if (ReportPlugin.getDefault().getDefaultUnitPreference() != null) {
      handle.setStringProperty(ModuleHandle.UNITS_PROP,ReportPlugin.getDefault().getDefaultUnitPreference());
    }
    if (inPredifinedTemplateFolder(sourceFileName)) {
      String description=handle.getDescription();
      if (description != null && description.trim().length() > 0) {
        handle.setDescription(Messages.getString(description));
      }
    }
    handle.saveAs(file.getAbsolutePath());
    handle.close();
  }
 catch (  Exception e) {
  }
  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 {
        page.openEditor(new ReportEditorInput(file),IReportEditorContants.LIBRARY_EDITOR_ID,true);
      }
 catch (      Exception e) {
        ExceptionHandler.handle(e);
      }
    }
  }
);
  monitor.worked(1);
  fireLibraryChanged(fileName);
}

Fixed version (ground truth):
private void doFinish(IPath locationPath,String fileName,String sourceFileName,IProgressMonitor monitor){
  monitor.beginTask(CREATING + fileName,2);
  File container=null;
  try {
    container=new File(locationPath.toString());
    if (!container.exists()) {
      container.mkdirs();
    }
  }
 catch (  Exception e) {
    ExceptionHandler.handle(e);
  }
  if (container == null) {
    return;
  }
  final File file=new File(locationPath.toString(),fileName);
  try {
    ModuleHandle handle=SessionHandleAdapter.getInstance().getSessionHandle().createLibraryFromTemplate(sourceFileName);
    if (ReportPlugin.getDefault().getEnableCommentPreference()) {
      handle.setStringProperty(ModuleHandle.COMMENTS_PROP,ReportPlugin.getDefault().getCommentPreference());
    }
    if (ReportPlugin.getDefault().getDefaultUnitPreference() != null) {
      handle.setStringProperty(ModuleHandle.UNITS_PROP,ReportPlugin.getDefault().getDefaultUnitPreference());
    }
    if (inPredifinedTemplateFolder(sourceFileName)) {
      String description=handle.getDescription();
      if (description != null && description.trim().length() > 0) {
        handle.setDescription(Messages.getString(description));
      }
    }
    handle.saveAs(file.getAbsolutePath());
    handle.close();
  }
 catch (  Exception e) {
  }
  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 {
        page.openEditor(new ReportEditorInput(file),IReportEditorContants.LIBRARY_EDITOR_ID,true);
      }
 catch (      Exception e) {
        ExceptionHandler.handle(e);
      }
    }
  }
);
  monitor.worked(1);
  fireLibraryChanged(fileName);
}