Program: 37524
Project: 37524
Buggy source:
/** 
 * query domain by domain name.
 * @param domainName 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).
 * @return JSON formated result,with HTTP code.
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) @ResponseBody public ResponseEntity searchDomain(@RequestParam(required=false) String name,HttpServletRequest request,HttpServletResponse response){
  String decodeDomain=name;
  String punyDomainName=decodeDomain;
  try {
    decodeDomain=DomainUtil.iso8859Decode(name);
    decodeDomain=DomainUtil.decodeAndTrimAndReplaceAsciiToLowercase(decodeDomain);
  }
 catch (  Exception e) {
    return RestResponseUtil.createResponse400();
  }
  if (StringUtils.isBlank(decodeDomain)) {
    return RestResponseUtil.createResponse400();
  }
  decodeDomain=StringUtil.getNormalization(decodeDomain);
  if (StringUtil.ASTERISK.equals(decodeDomain) || decodeDomain.startsWith(StringUtil.ASTERISK)) {
    return RestResponseUtil.createResponse422();
  }
  decodeDomain=DomainUtil.deleteLastPoint(decodeDomain);
  decodeDomain=StringUtils.lowerCase(decodeDomain);
  DomainSearch domainSearch=searchService.searchDomain(queryParser.parseDomainQueryParam(decodeDomain,punyDomainName));
  if (null != domainSearch) {
    if (domainSearch.getHasNoAuthForAllObjects()) {
      return RestResponseUtil.createResponse403();
    }
    responseDecorator.decorateResponse(domainSearch);
    return RestResponseUtil.createResponse200(domainSearch);
  }
  return RestResponseUtil.createResponse404();
}

Fixed version (ground truth):
/** 
 * query domain by domain name.
 * @param domainName 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).
 * @return JSON formated result,with HTTP code.
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) @ResponseBody public ResponseEntity searchDomain(@RequestParam(required=false) String name,HttpServletRequest request,HttpServletResponse response){
  String decodeDomain=name;
  try {
    decodeDomain=DomainUtil.iso8859Decode(name);
    decodeDomain=DomainUtil.decodeAndTrimAndReplaceAsciiToLowercase(decodeDomain);
  }
 catch (  Exception e) {
    return RestResponseUtil.createResponse400();
  }
  if (StringUtils.isBlank(decodeDomain)) {
    return RestResponseUtil.createResponse400();
  }
  decodeDomain=StringUtil.getNormalization(decodeDomain);
  if (StringUtil.ASTERISK.equals(decodeDomain) || decodeDomain.startsWith(StringUtil.ASTERISK)) {
    return RestResponseUtil.createResponse422();
  }
  decodeDomain=DomainUtil.deleteLastPoint(decodeDomain);
  decodeDomain=StringUtils.lowerCase(decodeDomain);
  DomainSearch domainSearch=searchService.searchDomain(queryParser.parseDomainQueryParam(decodeDomain,decodeDomain));
  if (null != domainSearch) {
    if (domainSearch.getHasNoAuthForAllObjects()) {
      return RestResponseUtil.createResponse403();
    }
    responseDecorator.decorateResponse(domainSearch);
    return RestResponseUtil.createResponse200(domainSearch);
  }
  return RestResponseUtil.createResponse404();
}