Program: 72936
Project: 72936
Buggy source:
/** 
 * Create web viewer url to run the report.
 * @param servletName servlet name to viewer report
 * @param report report file name
 * @param format report format
 * @param resourceFolder the resource folder
 * @param maxrows max rows limited
 * @param maxlevels max level member limited
 * @return valid web viewer url
 */
private static String createURL(String servletName,String report,String format,boolean inDesigner,String resourceFolder,String maxrows,String maxrowlevels,String maxcolumnlevels){
  String encodedReportName=null;
  try {
    encodedReportName=URLEncoder.encode(report,"String_Node_Str");
  }
 catch (  UnsupportedEncodingException e) {
  }
  String locale=ViewerPlugin.getDefault().getPluginPreferences().getString(USER_LOCALE);
  String svgFlag=ViewerPlugin.getDefault().getPluginPreferences().getString(SVG_FLAG);
  boolean bSVGFlag=false;
  String cubeMemorySize=ViewerPlugin.getDefault().getPluginPreferences().getString(PREVIEW_MAXINMEMORYCUBESIZE);
  boolean rtl=false;
  String eclipseCommands=System.getProperty("String_Node_Str");
  if (eclipseCommands != null) {
    String[] options=eclipseCommands.split("String_Node_Str");
    String regex="String_Node_Str";
    Pattern pattern=Pattern.compile(regex);
    for (int i=0; i < options.length; i++) {
      String option=options[i];
      if (pattern.matcher(option).matches()) {
        rtl=true;
        break;
      }
    }
  }
  if ("String_Node_Str".equalsIgnoreCase(svgFlag)) {
    bSVGFlag=true;
  }
  String masterPageContent=ViewerPlugin.getDefault().getPluginPreferences().getString(MASTER_PAGE_CONTENT);
  boolean bMasterPageContent=true;
  if ("String_Node_Str".equalsIgnoreCase(masterPageContent)) {
    bMasterPageContent=false;
  }
  String encodedResourceFolder=null;
  try {
    if (resourceFolder != null)     encodedResourceFolder=URLEncoder.encode(resourceFolder,"String_Node_Str");
  }
 catch (  UnsupportedEncodingException e) {
  }
  if (encodedResourceFolder == null)   encodedResourceFolder="String_Node_Str";
  String reportParam="String_Node_Str";
  if (isReportDocument(encodedReportName))   reportParam="String_Node_Str";
  reportParam+="String_Node_Str" + encodedReportName;
  String asattachment=null;
  if (POSTSCRIPT.equalsIgnoreCase(format))   asattachment="String_Node_Str";
  int dpi=Toolkit.getDefaultToolkit().getScreenResolution();
  return getBaseURL() + servletName + "String_Node_Str"+ reportParam+ "String_Node_Str"+ format+ "String_Node_Str"+ String.valueOf(bSVGFlag)+ (LocaleTable.containsKey(locale) ? "String_Node_Str" + LocaleTable.get(locale) : "String_Node_Str")+ "String_Node_Str"+ String.valueOf(inDesigner)+ "String_Node_Str"+ String.valueOf(bMasterPageContent)+ "String_Node_Str"+ String.valueOf(rtl)+ (maxrows != null && maxrows.trim().length() > 0 ? "String_Node_Str" + maxrows : "String_Node_Str")+ (maxrowlevels != null && maxrowlevels.trim().length() > 0 ? "String_Node_Str" + maxrowlevels : "String_Node_Str")+ (maxcolumnlevels != null && maxcolumnlevels.trim().length() > 0 ? "String_Node_Str" + maxcolumnlevels : "String_Node_Str")+ (cubeMemorySize != null && cubeMemorySize.trim().length() > 0 ? "String_Node_Str" + cubeMemorySize : "String_Node_Str")+ "String_Node_Str"+ encodedResourceFolder+ (asattachment != null ? asattachment : "String_Node_Str")+ "String_Node_Str"+ dpi;
}

Fixed version (ground truth):
/** 
 * Create web viewer url to run the report.
 * @param servletName servlet name to viewer report
 * @param report report file name
 * @param format report format
 * @param resourceFolder the resource folder
 * @param maxrows max rows limited
 * @param maxlevels max level member limited
 * @return valid web viewer url
 */
private static String createURL(String servletName,String report,String format,boolean inDesigner,String resourceFolder,String maxrows,String maxrowlevels,String maxcolumnlevels){
  String encodedReportName=null;
  try {
    encodedReportName=URLEncoder.encode(report,"String_Node_Str");
  }
 catch (  UnsupportedEncodingException e) {
    LogUtil.logWarning(e.getLocalizedMessage(),e);
  }
  String locale=ViewerPlugin.getDefault().getPluginPreferences().getString(USER_LOCALE);
  String svgFlag=ViewerPlugin.getDefault().getPluginPreferences().getString(SVG_FLAG);
  boolean bSVGFlag=false;
  String cubeMemorySize=ViewerPlugin.getDefault().getPluginPreferences().getString(PREVIEW_MAXINMEMORYCUBESIZE);
  boolean rtl=false;
  String eclipseCommands=System.getProperty("String_Node_Str");
  if (eclipseCommands != null) {
    String[] options=eclipseCommands.split("String_Node_Str");
    String regex="String_Node_Str";
    Pattern pattern=Pattern.compile(regex);
    for (int i=0; i < options.length; i++) {
      String option=options[i];
      if (pattern.matcher(option).matches()) {
        rtl=true;
        break;
      }
    }
  }
  if ("String_Node_Str".equalsIgnoreCase(svgFlag)) {
    bSVGFlag=true;
  }
  String masterPageContent=ViewerPlugin.getDefault().getPluginPreferences().getString(MASTER_PAGE_CONTENT);
  boolean bMasterPageContent=true;
  if ("String_Node_Str".equalsIgnoreCase(masterPageContent)) {
    bMasterPageContent=false;
  }
  String encodedResourceFolder=null;
  try {
    if (resourceFolder != null)     encodedResourceFolder=URLEncoder.encode(resourceFolder,"String_Node_Str");
  }
 catch (  UnsupportedEncodingException e) {
    LogUtil.logWarning(e.getLocalizedMessage(),e);
  }
  if (encodedResourceFolder == null)   encodedResourceFolder="String_Node_Str";
  String reportParam="String_Node_Str";
  if (isReportDocument(encodedReportName))   reportParam="String_Node_Str";
  reportParam+="String_Node_Str" + encodedReportName;
  String asattachment=null;
  if (POSTSCRIPT.equalsIgnoreCase(format))   asattachment="String_Node_Str";
  int dpi=Toolkit.getDefaultToolkit().getScreenResolution();
  return getBaseURL() + servletName + "String_Node_Str"+ reportParam+ "String_Node_Str"+ format+ "String_Node_Str"+ String.valueOf(bSVGFlag)+ (LocaleTable.containsKey(locale) ? "String_Node_Str" + LocaleTable.get(locale) : "String_Node_Str")+ "String_Node_Str"+ String.valueOf(inDesigner)+ "String_Node_Str"+ String.valueOf(bMasterPageContent)+ "String_Node_Str"+ String.valueOf(rtl)+ (maxrows != null && maxrows.trim().length() > 0 ? "String_Node_Str" + maxrows : "String_Node_Str")+ (maxrowlevels != null && maxrowlevels.trim().length() > 0 ? "String_Node_Str" + maxrowlevels : "String_Node_Str")+ (maxcolumnlevels != null && maxcolumnlevels.trim().length() > 0 ? "String_Node_Str" + maxcolumnlevels : "String_Node_Str")+ (cubeMemorySize != null && cubeMemorySize.trim().length() > 0 ? "String_Node_Str" + cubeMemorySize : "String_Node_Str")+ "String_Node_Str"+ encodedResourceFolder+ (asattachment != null ? asattachment : "String_Node_Str")+ "String_Node_Str"+ dpi;
}