Program: 72918
Project: 72918
Buggy source:
/** 
 * @see org.eclipse.birt.report.service.api.IViewerReportService#runAndRenderReport(org.eclipse.birt.report.service.api.IViewerReportDesignHandle,java.lang.String,org.eclipse.birt.report.service.api.InputOptions,java.util.Map,java.io.OutputStream,java.util.List,java.util.Map)
 */
public void runAndRenderReport(IViewerReportDesignHandle design,String outputDocName,InputOptions options,Map parameters,OutputStream out,List activeIds,Map displayTexts) throws ReportServiceException {
  if (design == null || design.getDesignObject() == null)   throw new ReportServiceException(BirtResources.getMessage(ResourceConstants.GENERAL_EXCEPTION_NO_REPORT_DESIGN));
  HttpServletRequest request=(HttpServletRequest)options.getOption(InputOptions.OPT_REQUEST);
  Locale locale=(Locale)options.getOption(InputOptions.OPT_LOCALE);
  Boolean isMasterPageContent=(Boolean)options.getOption(InputOptions.OPT_IS_MASTER_PAGE_CONTENT);
  Boolean svgFlag=(Boolean)options.getOption(InputOptions.OPT_SVG_FLAG);
  String format=(String)options.getOption(InputOptions.OPT_RENDER_FORMAT);
  Boolean isRtl=(Boolean)options.getOption(InputOptions.OPT_RTL);
  String servletPath=(String)options.getOption(InputOptions.OPT_SERVLET_PATH);
  try {
    ViewerAttributeBean attrBean=(ViewerAttributeBean)request.getAttribute(IBirtConstants.ATTRIBUTE_BEAN);
    String reportTitle=ParameterAccessor.htmlDecode(attrBean.getReportTitle());
    IReportRunnable runnable=(IReportRunnable)design.getDesignObject();
    ReportEngineService.getInstance().runAndRenderReport(request,runnable,out,format,locale,isRtl.booleanValue(),parameters,isMasterPageContent.booleanValue(),svgFlag.booleanValue(),displayTexts,servletPath,reportTitle);
  }
 catch (  RemoteException e) {
    throw new ReportServiceException(e.getLocalizedMessage(),e.getCause());
  }
}

Fixed version (ground truth):
/** 
 * @see org.eclipse.birt.report.service.api.IViewerReportService#runAndRenderReport(org.eclipse.birt.report.service.api.IViewerReportDesignHandle,java.lang.String,org.eclipse.birt.report.service.api.InputOptions,java.util.Map,java.io.OutputStream,java.util.List,java.util.Map)
 */
public void runAndRenderReport(IViewerReportDesignHandle design,String outputDocName,InputOptions options,Map parameters,OutputStream out,List activeIds,Map displayTexts) throws ReportServiceException {
  if (design == null || design.getDesignObject() == null)   throw new ReportServiceException(BirtResources.getMessage(ResourceConstants.GENERAL_EXCEPTION_NO_REPORT_DESIGN));
  HttpServletRequest request=(HttpServletRequest)options.getOption(InputOptions.OPT_REQUEST);
  Locale locale=(Locale)options.getOption(InputOptions.OPT_LOCALE);
  Boolean isMasterPageContent=(Boolean)options.getOption(InputOptions.OPT_IS_MASTER_PAGE_CONTENT);
  Boolean svgFlag=(Boolean)options.getOption(InputOptions.OPT_SVG_FLAG);
  String format=(String)options.getOption(InputOptions.OPT_RENDER_FORMAT);
  Boolean isRtl=(Boolean)options.getOption(InputOptions.OPT_RTL);
  String servletPath=(String)options.getOption(InputOptions.OPT_SERVLET_PATH);
  try {
    ViewerAttributeBean attrBean=(ViewerAttributeBean)request.getAttribute(IBirtConstants.ATTRIBUTE_BEAN);
    String reportTitle=ParameterAccessor.htmlDecode(attrBean.getReportTitle());
    IReportRunnable runnable=(IReportRunnable)design.getDesignObject();
    Integer maxRows=null;
    if (ParameterAccessor.isReportParameterExist(request,ParameterAccessor.PARAM_MAXROWS))     maxRows=new Integer(ParameterAccessor.getMaxRows(request));
    ReportEngineService.getInstance().runAndRenderReport(request,runnable,out,format,locale,isRtl.booleanValue(),parameters,isMasterPageContent.booleanValue(),svgFlag.booleanValue(),displayTexts,servletPath,reportTitle,maxRows);
  }
 catch (  RemoteException e) {
    throw new ReportServiceException(e.getLocalizedMessage(),e.getCause());
  }
}