Program: 72635
Project: 72635
Buggy source:
/** 
 * Create PDF render option.
 * @param servletPath
 * @param request
 * @param isDesigner
 * @return the PDF render option
 */
private PDFRenderOption createPDFRenderOption(String servletPath,HttpServletRequest request,boolean isDesigner){
  String baseURL=null;
  if (!isDesigner)   baseURL=ParameterAccessor.getBaseURL();
  if (baseURL == null) {
    if (ParameterAccessor.isOpenAsAttachment(request)) {
      baseURL=request.getScheme() + "String_Node_Str" + request.getServerName()+ "String_Node_Str"+ request.getServerPort();
    }
 else {
      baseURL="String_Node_Str";
    }
  }
  baseURL+=request.getContextPath();
  PDFRenderOption renderOption=new PDFRenderOption();
  if (servletPath != null && servletPath.length() > 0) {
    renderOption.setBaseURL(baseURL + servletPath);
  }
 else {
    renderOption.setBaseURL(baseURL + IBirtConstants.SERVLET_PATH_RUN);
  }
  renderOption.setSupportedImageFormats("String_Node_Str");
switch (ParameterAccessor.getPageOverflow(request)) {
case IBirtConstants.PAGE_OVERFLOW_AUTO:
    renderOption.setOption(PDFRenderOption.PAGE_OVERFLOW,PDFRenderOption.OUTPUT_TO_MULTIPLE_PAGES);
  break;
case IBirtConstants.PAGE_OVERFLOW_ACTUAL:
renderOption.setOption(PDFRenderOption.PAGE_OVERFLOW,PDFRenderOption.ENLARGE_PAGE_SIZE);
break;
case IBirtConstants.PAGE_OVERFLOW_FITTOPAGE:
renderOption.setOption(PDFRenderOption.FIT_TO_PAGE,Boolean.TRUE);
break;
default :
renderOption.setOption(PDFRenderOption.PAGE_OVERFLOW,PDFRenderOption.OUTPUT_TO_MULTIPLE_PAGES);
}
renderOption.setOption(PDFRenderOption.PAGEBREAK_PAGINATION_ONLY,Boolean.TRUE);
return renderOption;
}

Fixed version (ground truth):
/** 
 * Create PDF render option.
 * @param servletPath
 * @param request
 * @param isDesigner
 * @return the PDF render option
 */
private PDFRenderOption createPDFRenderOption(String servletPath,HttpServletRequest request,boolean isDesigner){
  String baseURL=null;
  if (!isDesigner)   baseURL=ParameterAccessor.getBaseURL();
  if (baseURL == null) {
    if (ParameterAccessor.isOpenAsAttachment(request)) {
      baseURL=request.getScheme() + "String_Node_Str" + request.getServerName()+ "String_Node_Str"+ request.getServerPort();
    }
 else {
      baseURL="String_Node_Str";
    }
  }
  baseURL+=request.getContextPath();
  PDFRenderOption renderOption=new PDFRenderOption();
  if (servletPath != null && servletPath.length() > 0) {
    renderOption.setBaseURL(baseURL + servletPath);
  }
 else {
    renderOption.setBaseURL(baseURL + IBirtConstants.SERVLET_PATH_RUN);
  }
  renderOption.setSupportedImageFormats("String_Node_Str");
switch (ParameterAccessor.getPageOverflow(request)) {
case IBirtConstants.PAGE_OVERFLOW_AUTO:
    renderOption.setOption(PDFRenderOption.PAGE_OVERFLOW,new Integer(PDFRenderOption.OUTPUT_TO_MULTIPLE_PAGES));
  break;
case IBirtConstants.PAGE_OVERFLOW_ACTUAL:
renderOption.setOption(PDFRenderOption.PAGE_OVERFLOW,new Integer(PDFRenderOption.ENLARGE_PAGE_SIZE));
break;
case IBirtConstants.PAGE_OVERFLOW_FITTOPAGE:
renderOption.setOption(PDFRenderOption.FIT_TO_PAGE,Boolean.TRUE);
break;
default :
renderOption.setOption(PDFRenderOption.PAGE_OVERFLOW,new Integer(PDFRenderOption.OUTPUT_TO_MULTIPLE_PAGES));
}
renderOption.setOption(PDFRenderOption.PAGEBREAK_PAGINATION_ONLY,Boolean.TRUE);
return renderOption;
}