Program: 37377
Project: 37377
Buggy source:
/** 
 * do pre process url.
 * @param request request.
 * @param response response.
 * @throws Exception Exception.
 * @return true if success processed,and can do service operation; false ifnot.
 */
@Override public boolean preProcess(HttpServletRequest request,HttpServletResponse response) throws Exception {
  decodeServletPathForSpringUrlMapping(request);
  String path=request.getRequestURI();
  if (StringUtils.isBlank(path)) {
    writeError400Response(response);
    return false;
  }
  String decodeUri=StringUtils.EMPTY;
  String uri=path.substring(request.getContextPath().length());
  if (StringUtils.isBlank(uri)) {
    writeError400Response(response);
    return false;
  }
  try {
    decodeUri=urlDecode(uri);
  }
 catch (  Exception e) {
    writeError400Response(response);
    return false;
  }
  if (decodeUri.contains("String_Node_Str")) {
    writeError400Response(response);
    return false;
  }
  if (decodeUri.contains("String_Node_Str")) {
    writeError400Response(response);
    return false;
  }
  if (containInvalidSpace(decodeUri)) {
    writeError400Response(response);
    return false;
  }
  if (!"String_Node_Str".equals(decodeUri)) {
    String uriWithoutPrefixSlash=decodeUri.substring(1,decodeUri.length());
    if (!uriWithoutPrefixSlash.startsWith(RDAP_URL_PREFIX)) {
      writeError400Response(response);
      return false;
    }
 else     if (!uriWithoutPrefixSlash.equals(RDAP_URL_PREFIX + "String_Node_Str") && decodeUri.endsWith("String_Node_Str")) {
      writeError400Response(response);
      return false;
    }
 else     if (uriWithoutPrefixSlash.endsWith("String_Node_Str")) {
      writeError400Response(response);
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * do pre process url.
 * @param request request.
 * @param response response.
 * @throws Exception Exception.
 * @return true if success processed,and can do service operation; false ifnot.
 */
@Override public boolean preProcess(HttpServletRequest request,HttpServletResponse response) throws Exception {
  decodeServletPathForSpringUrlMapping(request);
  String path=request.getRequestURI();
  if (StringUtils.isBlank(path)) {
    writeError400Response(response);
    return false;
  }
  String decodeUri=StringUtils.EMPTY;
  String uri=path.substring(request.getContextPath().length());
  if (StringUtils.isBlank(uri)) {
    writeError400Response(response);
    return false;
  }
  try {
    decodeUri=urlDecode(uri);
  }
 catch (  Exception e) {
    writeError400Response(response);
    return false;
  }
  if (decodeUri.contains("String_Node_Str")) {
    writeError400Response(response);
    return false;
  }
  if (decodeUri.contains("String_Node_Str")) {
    writeError400Response(response);
    return false;
  }
  if (containInvalidSpace(decodeUri)) {
    writeError400Response(response);
    return false;
  }
  if (pathContainInvalidChar(decodeUri)) {
    writeError400Response(response);
    return false;
  }
  if (!"String_Node_Str".equals(decodeUri)) {
    String uriWithoutPrefixSlash=decodeUri.substring(1,decodeUri.length());
    if (!uriWithoutPrefixSlash.startsWith(RDAP_URL_PREFIX + "String_Node_Str")) {
      LOGGER.debug("String_Node_Str",uriWithoutPrefixSlash,RDAP_URL_PREFIX);
      writeError400Response(response);
      return false;
    }
 else     if (!uriWithoutPrefixSlash.equals(RDAP_URL_PREFIX + "String_Node_Str") && decodeUri.endsWith("String_Node_Str")) {
      writeError400Response(response);
      return false;
    }
 else     if (uriWithoutPrefixSlash.endsWith("String_Node_Str")) {
      writeError400Response(response);
      return false;
    }
  }
  return true;
}