Program: 75116
Project: 75116
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
 * @return valid web viewer url
 */
private static String createURL(String servletName,String report,String format,boolean inDesigner,String resourceFolder,String maxrows){
  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;
  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";
  return getBaseURL() + servletName + "String_Node_Str"+ "String_Node_Str"+ encodedReportName+ "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")+ "String_Node_Str"+ encodedResourceFolder;
}

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
 * @return valid web viewer url
 */
private static String createURL(String servletName,String report,String format,boolean inDesigner,String resourceFolder,String maxrows){
  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;
  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 (encodedReportName.endsWith(REPORT_DOCUMENT_FILE))   reportParam="String_Node_Str";
  reportParam+="String_Node_Str" + encodedReportName;
  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")+ "String_Node_Str"+ encodedResourceFolder;
}