Program: 71303
Project: 71303
Buggy source:
void doRun() throws EngineException {
  doValidateParameters();
  setupRenderOption();
  updateRtLFlag();
  loadDesign();
  prepareDesign();
  startFactory();
  startRender();
  try {
    IContentEmitter emitter=createContentEmitter();
    IReportExecutor executor=new ReportExecutor(executionContext);
    executor=new SuppressDuplciateReportExecutor(executor);
    executor=new LocalizedReportExecutor(executionContext,executor);
    executionContext.setExecutor(executor);
    if (ExtensionManager.PAPER_SIZE_PAGINATION.equals(pagination)) {
      emitter=new PDFLayoutEmitterProxy(executor,emitter,renderOptions,executionContext.getLocale(),0l);
    }
    initializeContentEmitter(emitter,executor);
    String format=executionContext.getOutputFormat();
    boolean paginate=true;
    if (FORMAT_HTML.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));
      layoutPageHandler.addPageHandler(new LayoutPageHandler());
      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();
  updateRtLFlag();
  loadDesign();
  prepareDesign();
  startFactory();
  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)) {
      PDFLayoutEmitterProxy pdfLayoutEmitter=new PDFLayoutEmitterProxy(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)) {
      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);
  }
}