Program: 69553
Project: 69553
Buggy source:
void doRun() throws EngineException {
  doValidateParameters();
  setupRenderOption();
  loadDesign();
  prepareDesign();
  startFactory();
  updateRtLFlag();
  startRender();
  try {
    IContentEmitter emitter=createContentEmitter();
    IReportExecutor executor=new ReportExecutor(executionContext);
    executor=new SuppressDuplciateReportExecutor(executor);
    executor=new LocalizedReportExecutor(executionContext,executor);
    executionContext.setExecutor(executor);
    LayoutPageHandler layoutHandler=new LayoutPageHandler();
    if (ExtensionManager.PAPER_SIZE_PAGINATION.equals(pagination)) {
      LayoutEngine pdfLayoutEmitter=new LayoutEngine(executor,emitter,renderOptions,executionContext.getLocale(),0l);
      pdfLayoutEmitter.setPageHandler(layoutHandler);
      emitter=pdfLayoutEmitter;
    }
    initializeContentEmitter(emitter,executor);
    String format=executionContext.getOutputFormat();
    boolean paginate=true;
    if (ExtensionManager.PAGE_BREAK_PAGINATION.equalsIgnoreCase(pagination)) {
      HTMLRenderOption htmlOption=new HTMLRenderOption(renderOptions);
      paginate=htmlOption.getHtmlPagination();
    }
    if (ExtensionManager.NO_PAGINATION.equals(pagination)) {
      paginate=false;
    }
synchronized (this) {
      if (!executionContext.isCanceled()) {
        layoutEngine=createReportLayoutEngine(pagination,renderOptions);
      }
    }
    if (layoutEngine != null) {
      layoutEngine.setLocale(executionContext.getLocale());
      CompositeLayoutPageHandler layoutPageHandler=new CompositeLayoutPageHandler();
      OnPageBreakLayoutPageHandle handle=new OnPageBreakLayoutPageHandle(executionContext);
      layoutPageHandler.addPageHandler(handle);
      layoutPageHandler.addPageHandler(new ContextPageBreakHandler(executionContext));
      if (!ExtensionManager.PAPER_SIZE_PAGINATION.equals(pagination)) {
        layoutPageHandler.addPageHandler(layoutHandler);
      }
      layoutEngine.setPageHandler(layoutPageHandler);
      CompositeContentEmitter outputEmitters=new CompositeContentEmitter(format);
      outputEmitters.addEmitter(emitter);
      outputEmitters.addEmitter(handle.getEmitter());
      IReportContent report=executor.execute();
      outputEmitters.start(report);
      layoutEngine.layout(executor,report,outputEmitters,paginate);
      layoutEngine.close();
      outputEmitters.end(report);
    }
    closeRender();
    executionContext.closeDataEngine();
    closeFactory();
  }
 catch (  EngineException e) {
    throw e;
  }
catch (  Exception ex) {
    log.log(Level.SEVERE,"String_Node_Str",ex);
    throw new EngineException(MessageConstants.REPORT_RUN_ERROR,ex);
  }
catch (  OutOfMemoryError err) {
    log.log(Level.SEVERE,"String_Node_Str");
    throw err;
  }
catch (  Throwable t) {
    log.log(Level.SEVERE,"String_Node_Str",t);
    throw new EngineException(MessageConstants.REPORT_RUN_ERROR,t);
  }
}

Fixed version (ground truth):
void doRun() throws EngineException {
  doValidateParameters();
  setupRenderOption();
  loadDesign();
  prepareDesign();
  startFactory();
  updateRtLFlag();
  startRender();
  try {
    IContentEmitter emitter=createContentEmitter();
    IReportExecutor executor=new ReportExecutor(executionContext);
    executor=new SuppressDuplciateReportExecutor(executor);
    executor=new LocalizedReportExecutor(executionContext,executor);
    executionContext.setExecutor(executor);
    LayoutPageHandler layoutHandler=new LayoutPageHandler();
    if (ExtensionManager.PAPER_SIZE_PAGINATION.equals(pagination)) {
      LayoutEngine pdfLayoutEmitter=new LayoutEngine(executor,emitter,renderOptions,executionContext.getLocale(),0l);
      pdfLayoutEmitter.setPageHandler(layoutHandler);
      emitter=pdfLayoutEmitter;
    }
    initializeContentEmitter(emitter,executor);
    String format=executionContext.getOutputFormat();
    boolean paginate=true;
    if (FORMAT_HTML.equalsIgnoreCase(format) || FORMAT_XHTML.equalsIgnoreCase(format)) {
      HTMLRenderOption htmlOption=new HTMLRenderOption(renderOptions);
      paginate=htmlOption.getHtmlPagination();
    }
    if (ExtensionManager.NO_PAGINATION.equals(pagination)) {
      paginate=false;
    }
synchronized (this) {
      if (!executionContext.isCanceled()) {
        layoutEngine=createReportLayoutEngine(pagination,renderOptions);
      }
    }
    if (layoutEngine != null) {
      layoutEngine.setLocale(executionContext.getLocale());
      CompositeLayoutPageHandler layoutPageHandler=new CompositeLayoutPageHandler();
      OnPageBreakLayoutPageHandle handle=new OnPageBreakLayoutPageHandle(executionContext);
      layoutPageHandler.addPageHandler(handle);
      layoutPageHandler.addPageHandler(new ContextPageBreakHandler(executionContext));
      if (!ExtensionManager.PAPER_SIZE_PAGINATION.equals(pagination)) {
        layoutPageHandler.addPageHandler(layoutHandler);
      }
      layoutEngine.setPageHandler(layoutPageHandler);
      CompositeContentEmitter outputEmitters=new CompositeContentEmitter(format);
      outputEmitters.addEmitter(emitter);
      outputEmitters.addEmitter(handle.getEmitter());
      IReportContent report=executor.execute();
      outputEmitters.start(report);
      layoutEngine.layout(executor,report,outputEmitters,paginate);
      layoutEngine.close();
      outputEmitters.end(report);
    }
    closeRender();
    executionContext.closeDataEngine();
    closeFactory();
  }
 catch (  EngineException e) {
    throw e;
  }
catch (  Exception ex) {
    log.log(Level.SEVERE,"String_Node_Str",ex);
    throw new EngineException(MessageConstants.REPORT_RUN_ERROR,ex);
  }
catch (  OutOfMemoryError err) {
    log.log(Level.SEVERE,"String_Node_Str");
    throw err;
  }
catch (  Throwable t) {
    log.log(Level.SEVERE,"String_Node_Str",t);
    throw new EngineException(MessageConstants.REPORT_RUN_ERROR,t);
  }
}