Program: 11272
Project: 11272
Buggy source:
private void fillinSearchResult(HttpServletRequest aRequest,HttpServletResponse aResponse) throws ServletException, IOException {
  URLCodec theURLCodec=new URLCodec();
  String theQueryString=aRequest.getParameter("String_Node_Str");
  String theBasePath=basePath;
  String theBackLink=basePath;
  if (!StringUtils.isEmpty(theQueryString)) {
    try {
      theBasePath=theBasePath + "String_Node_Str" + theURLCodec.encode(theQueryString);
      theBackLink=theBackLink + "String_Node_Str" + theURLCodec.encode(theQueryString);
    }
 catch (    EncoderException e) {
      e.printStackTrace();
    }
  }
  Map<String,String> theDrilldownDimensions=new HashMap<>();
  String thePathInfo=aRequest.getPathInfo();
  if (!StringUtils.isEmpty(thePathInfo)) {
    String theWorkingPathInfo=thePathInfo;
    if (theWorkingPathInfo.startsWith("String_Node_Str")) {
      theWorkingPathInfo=theWorkingPathInfo.substring(1);
    }
    String[] thePaths=StringUtils.split(theWorkingPathInfo,"String_Node_Str");
    for (int i=0; i < thePaths.length; i++) {
      try {
        theBasePath=theBasePath + "String_Node_Str" + thePaths[i];
        if (i < thePaths.length - 1) {
          theBackLink=theBackLink + "String_Node_Str" + thePaths[i];
        }
        String theDecodedValue=theURLCodec.decode(thePaths[i]);
        if (i == 0) {
          theQueryString=theDecodedValue;
        }
 else {
          FacetSearchUtils.addToMap(theDecodedValue,theDrilldownDimensions);
        }
      }
 catch (      DecoderException e) {
        LOGGER.error("String_Node_Str" + aRequest.getPathInfo(),e);
      }
    }
    if (basePath.equals(theBackLink)) {
      theBackLink=null;
    }
  }
 else {
    theBackLink=null;
  }
  if (!StringUtils.isEmpty(theQueryString)) {
    aRequest.setAttribute("String_Node_Str",theQueryString);
    try {
      aRequest.setAttribute("String_Node_Str",backend.performQuery(theQueryString,theBackLink,theBasePath,theDrilldownDimensions));
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else {
    aRequest.setAttribute("String_Node_Str","String_Node_Str");
  }
  aRequest.setAttribute("String_Node_Str",serverBase);
  aRequest.getRequestDispatcher("String_Node_Str").forward(aRequest,aResponse);
}

Fixed version (ground truth):
private void fillinSearchResult(HttpServletRequest aRequest,HttpServletResponse aResponse) throws ServletException, IOException {
  URLCodec theURLCodec=new URLCodec();
  String theQueryString=aRequest.getParameter("String_Node_Str");
  String theBasePath=basePath;
  String theBackLink=basePath;
  if (!StringUtils.isEmpty(theQueryString)) {
    try {
      theBasePath=theBasePath + "String_Node_Str" + theURLCodec.encode(theQueryString);
      theBackLink=theBackLink + "String_Node_Str" + theURLCodec.encode(theQueryString);
    }
 catch (    EncoderException e) {
      e.printStackTrace();
    }
  }
  Map<String,String> theDrilldownDimensions=new HashMap<>();
  String thePathInfo=aRequest.getPathInfo();
  if (!StringUtils.isEmpty(thePathInfo)) {
    String theWorkingPathInfo=thePathInfo;
    if (theWorkingPathInfo.startsWith("String_Node_Str")) {
      theWorkingPathInfo=theWorkingPathInfo.substring(1);
    }
    String[] thePaths=StringUtils.split(theWorkingPathInfo,"String_Node_Str");
    for (int i=0; i < thePaths.length; i++) {
      try {
        String theDecodedValue=theURLCodec.decode(thePaths[i]);
        String theEncodedValue=theURLCodec.encode(theDecodedValue);
        theBasePath=theBasePath + "String_Node_Str" + theEncodedValue;
        if (i < thePaths.length - 1) {
          theBackLink=theBackLink + "String_Node_Str" + theEncodedValue;
        }
        if (i == 0) {
          theQueryString=theDecodedValue;
        }
 else {
          FacetSearchUtils.addToMap(theDecodedValue,theDrilldownDimensions);
        }
      }
 catch (      EncoderException|DecoderException e) {
        LOGGER.error("String_Node_Str" + aRequest.getPathInfo(),e);
      }
    }
    if (basePath.equals(theBackLink)) {
      theBackLink=null;
    }
  }
 else {
    theBackLink=null;
  }
  if (!StringUtils.isEmpty(theQueryString)) {
    aRequest.setAttribute("String_Node_Str",theQueryString);
    try {
      aRequest.setAttribute("String_Node_Str",backend.performQuery(theQueryString,theBackLink,theBasePath,theDrilldownDimensions));
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else {
    aRequest.setAttribute("String_Node_Str","String_Node_Str");
  }
  aRequest.setAttribute("String_Node_Str",serverBase);
  aRequest.getRequestDispatcher("String_Node_Str").forward(aRequest,aResponse);
}