Program: 37506
Project: 37506
Buggy source:
/** 
 * search nameserver by name.
 * @param name is a fully-qualified (relative to the root) domain name [RFC1594] in either the in-addr.arpa or ip6.arpa zones (for RIRs) or a fully-qualified domain name in a zone administered by the server operator (for DNRs).
 * @param request HttpServletRequest
 * @param response HttpServletResponse
 * @return JSON formated result,with HTTP code.
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) @ResponseBody public ResponseEntity searchNameserver(@RequestParam(required=false) String name,HttpServletRequest request,HttpServletResponse response){
  String decodeNameserver=name;
  try {
    decodeNameserver=DomainUtil.iso8859Decode(name);
    decodeNameserver=DomainUtil.decodeAndTrimAndReplaceAsciiToLowercase(decodeNameserver);
  }
 catch (  Exception e) {
    return RestResponseUtil.createResponse400();
  }
  if (StringUtils.isBlank(decodeNameserver)) {
    return RestResponseUtil.createResponse400();
  }
  decodeNameserver=StringUtil.getNormalization(decodeNameserver);
  if (StringUtil.ASTERISK.equals(decodeNameserver) || decodeNameserver.startsWith(StringUtil.ASTERISK)) {
    return RestResponseUtil.createResponse422();
  }
  decodeNameserver=DomainUtil.deleteLastPoint(decodeNameserver);
  decodeNameserver=StringUtils.lowerCase(decodeNameserver);
  NameserverSearch nsSearch=searchService.searchNameserver(queryParser.parseNameserverQueryParam(decodeNameserver,decodeNameserver));
  if (null != nsSearch) {
    if (nsSearch.getHasNoAuthForAllObjects()) {
      return RestResponseUtil.createResponse403();
    }
    responseDecorator.decorateResponse(nsSearch);
    return RestResponseUtil.createResponse200(nsSearch);
  }
  return RestResponseUtil.createResponse404();
}

Fixed version (ground truth):
/** 
 * search nameserver by name.
 * @param name is a fully-qualified (relative to the root) domain name [RFC1594] in either the in-addr.arpa or ip6.arpa zones (for RIRs) or a fully-qualified domain name in a zone administered by the server operator (for DNRs).
 * @param request HttpServletRequest
 * @param response HttpServletResponse
 * @return JSON formated result,with HTTP code.
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) @ResponseBody public ResponseEntity searchNameserver(@RequestParam(required=false) String name,HttpServletRequest request,HttpServletResponse response){
  name=queryParser.getParameter(request,"String_Node_Str");
  String decodeNameserver=name;
  try {
    decodeNameserver=DomainUtil.iso8859Decode(name);
    decodeNameserver=DomainUtil.decodeAndTrimAndReplaceAsciiToLowercase(decodeNameserver);
  }
 catch (  Exception e) {
    return RestResponseUtil.createResponse400();
  }
  if (StringUtils.isBlank(decodeNameserver)) {
    return RestResponseUtil.createResponse400();
  }
  decodeNameserver=StringUtil.getNormalization(decodeNameserver);
  if (StringUtil.ASTERISK.equals(decodeNameserver) || decodeNameserver.startsWith(StringUtil.ASTERISK)) {
    return RestResponseUtil.createResponse422();
  }
  decodeNameserver=DomainUtil.deleteLastPoint(decodeNameserver);
  decodeNameserver=StringUtils.lowerCase(decodeNameserver);
  NameserverSearch nsSearch=searchService.searchNameserver(queryParser.parseNameserverQueryParam(decodeNameserver,decodeNameserver));
  if (null != nsSearch) {
    if (nsSearch.getHasNoAuthForAllObjects()) {
      return RestResponseUtil.createResponse403();
    }
    responseDecorator.decorateResponse(nsSearch);
    return RestResponseUtil.createResponse200(nsSearch);
  }
  return RestResponseUtil.createResponse404();
}