Program: 71894
Project: 71894
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 PDFLayoutEmitter(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);
    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);
  }
}