Program: 70892
Project: 70892
Buggy source:
/** 
 * Render report content from design file
 * @param out
 * @throws Exception
 */
private void __renderReport(OutputStream out,IViewingSession session) throws Exception {
  HttpServletRequest request=(HttpServletRequest)pageContext.getRequest();
  IReportRunnable runnable=(IReportRunnable)this.reportDesignHandle.getDesignObject();
  String reportTitle=ParameterAccessor.htmlDecode(BirtUtility.getTitleFromDesign(reportDesignHandle));
  Map params=__handleParameters(reportDesignHandle,null);
  Collection parameterDefList=getReportService().getParameterDefinitions(reportDesignHandle,options,false);
  Map displayTexts=BirtUtility.getDisplayTexts(parameterDefList,null,(HttpServletRequest)pageContext.getRequest());
  String realReportletId=viewer.getReportletId();
  if (realReportletId == null) {
    if (viewer.getBookmark() != null && "String_Node_Str".equalsIgnoreCase(viewer.getIsReportlet())) {
      realReportletId=viewer.getBookmark();
    }
  }
  if (realReportletId != null) {
    Locale locale=(Locale)this.options.getOption(InputOptions.OPT_LOCALE);
    TimeZone timeZone=(TimeZone)this.options.getOption(InputOptions.OPT_TIMEZONE);
    String documentName=session.getCachedReportDocument(viewer.getReportDesign(),viewer.getId());
    List<Exception> errors=ReportEngineService.getInstance().runReport(request,runnable,documentName,locale,timeZone,params,displayTexts,new Integer(viewer.getMaxRowsOfRecords()));
    if (errors != null && !errors.isEmpty()) {
      for (Iterator<Exception> i=errors.iterator(); i.hasNext(); ) {
        i.next().printStackTrace();
      }
    }
    IReportDocument doc=ReportEngineService.getInstance().openReportDocument(null,documentName,BirtTagUtil.getModuleOptions(viewer));
    ReportEngineService.getInstance().renderReportlet(out,doc,this.options,realReportletId,null);
  }
 else {
    ReportEngineService.getInstance().runAndRenderReport(runnable,out,this.options,params,Boolean.TRUE,null,null,displayTexts,reportTitle,new Integer(viewer.getMaxRowsOfRecords()));
  }
}

Fixed version (ground truth):
/** 
 * Render report content from design file
 * @param out
 * @throws Exception
 */
private void __renderReport(OutputStream out,IViewingSession session) throws Exception {
  HttpServletRequest request=(HttpServletRequest)pageContext.getRequest();
  IReportRunnable runnable=(IReportRunnable)this.reportDesignHandle.getDesignObject();
  String reportTitle=ParameterAccessor.htmlDecode(BirtUtility.getTitleFromDesign(reportDesignHandle));
  Map params=__handleParameters(reportDesignHandle,null);
  Collection parameterDefList=getReportService().getParameterDefinitions(reportDesignHandle,options,false);
  Map displayTexts=BirtUtility.getDisplayTexts(parameterDefList,null,(HttpServletRequest)pageContext.getRequest());
  String realReportletId=viewer.getReportletId();
  if (realReportletId == null) {
    if (viewer.getBookmark() != null && "String_Node_Str".equalsIgnoreCase(viewer.getIsReportlet())) {
      realReportletId=viewer.getBookmark();
    }
  }
  if (realReportletId != null) {
    Locale locale=(Locale)this.options.getOption(InputOptions.OPT_LOCALE);
    TimeZone timeZone=(TimeZone)this.options.getOption(InputOptions.OPT_TIMEZONE);
    String documentName=session.getCachedReportDocument(viewer.getReportDesign(),viewer.getId());
    List<Exception> errors=ReportEngineService.getInstance().runReport(request,runnable,documentName,locale,timeZone,params,displayTexts,Integer.valueOf(viewer.getMaxRowsOfRecords()));
    if (errors != null && !errors.isEmpty()) {
      for (Iterator<Exception> i=errors.iterator(); i.hasNext(); ) {
        i.next().printStackTrace();
      }
    }
    IReportDocument doc=ReportEngineService.getInstance().openReportDocument(null,documentName,BirtTagUtil.getModuleOptions(viewer));
    ReportEngineService.getInstance().renderReportlet(out,doc,this.options,realReportletId,null);
  }
 else {
    ReportEngineService.getInstance().runAndRenderReport(runnable,out,this.options,params,Boolean.TRUE,null,null,displayTexts,reportTitle,Integer.valueOf(viewer.getMaxRowsOfRecords()));
  }
}