nus-yam/ex-repair huggingface dataset:
Program: 37263
Project: 37263
Buggy source:
/** 
 * <pre> Query help. URI:/help. This service is not under permission control. This service is not under policy control. </pre>
 * @param request HttpServletRequest.
 * @param response HttpServletResponse
 * @return JSON formated result,with HTTP code.
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public ResponseEntity queryHelp(HttpServletRequest request,HttpServletResponse response) throws DecodeException {
  String lastSpliInURI=queryParser.getLastSplitInURI(request);
  if (!"String_Node_Str".equals(lastSpliInURI)) {
    return RestResponseUtil.createResponse400();
  }
  Help result=queryService.queryHelp(queryParser.parseQueryParam("String_Node_Str"));
  if (null != result) {
    responseDecorator.decorateResponseForHelp(result);
    return RestResponseUtil.createResponse200(result);
  }
  return RestResponseUtil.createResponse404();
}

Fixed version (ground truth):
/** 
 * <pre> Query help. URI:/help. This service is not under permission control. This service is not under policy control. </pre>
 * @param request HttpServletRequest.
 * @param response HttpServletResponse
 * @return JSON formated result,with HTTP code.
 * @throws DecodeException DecodeException.
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public ResponseEntity queryHelp(HttpServletRequest request,HttpServletResponse response) throws DecodeException {
  String lastSpliInURI=queryParser.getLastSplitInURI(request);
  if (!"String_Node_Str".equals(lastSpliInURI)) {
    return RestResponseUtil.createResponse400();
  }
  Help result=queryService.queryHelp(queryParser.parseQueryParam("String_Node_Str"));
  if (null != result) {
    responseDecorator.decorateResponseForHelp(result);
    return RestResponseUtil.createResponse200(result);
  }
  return RestResponseUtil.createResponse404();
}
Program: 37265
Project: 37265
Buggy source:
/** 
 * <pre> query entity. Uri:/entity/{handle}. This service is under permission control, @see AccessControlManager. This service is under policy control, @see PolicyControlService. </pre>
 * @param handle entity handle.
 * @param request HttpServletRequest.
 * @param response HttpServletResponse
 * @return JSON formated result,with HTTP code.
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public ResponseEntity queryEntity(@PathVariable String handle,HttpServletRequest request,HttpServletResponse response) throws DecodeException {
  LOGGER.debug("String_Node_Str" + handle);
  handle=queryParser.getLastSplitInURI(request);
  handle=StringUtils.trim(handle);
  if (!StringUtil.isValidEntityHandleOrName(handle)) {
    return RestResponseUtil.createResponse400();
  }
  handle=StringUtil.foldCaseAndNormalization(handle);
  Entity result=queryService.queryEntity(queryParser.parseQueryParam(handle));
  if (null != result) {
    if (!accessControlManager.hasPermission(result)) {
      return RestResponseUtil.createResponse403();
    }
    responseDecorator.decorateResponse(result);
    return RestResponseUtil.createResponse200(result);
  }
  return RestResponseUtil.createResponse404();
}

Fixed version (ground truth):
/** 
 * <pre> query entity. Uri:/entity/{handle}. This service is under permission control, @see AccessControlManager. This service is under policy control, @see PolicyControlService. </pre>
 * @param handle entity handle.
 * @param request HttpServletRequest.
 * @param response HttpServletResponse
 * @return JSON formated result,with HTTP code.
 * @throws DecodeException DecodeException.
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public ResponseEntity queryEntity(@PathVariable String handle,HttpServletRequest request,HttpServletResponse response) throws DecodeException {
  LOGGER.debug("String_Node_Str" + handle);
  handle=queryParser.getLastSplitInURI(request);
  handle=StringUtils.trim(handle);
  if (!StringUtil.isValidEntityHandleOrName(handle)) {
    return RestResponseUtil.createResponse400();
  }
  handle=StringUtil.foldCaseAndNormalization(handle);
  Entity result=queryService.queryEntity(queryParser.parseQueryParam(handle));
  if (null != result) {
    if (!accessControlManager.hasPermission(result)) {
      return RestResponseUtil.createResponse403();
    }
    responseDecorator.decorateResponse(result);
    return RestResponseUtil.createResponse200(result);
  }
  return RestResponseUtil.createResponse404();
}
Program: 37269
Project: 37269
Buggy source:
/** 
 * get last split in URI. <p> For spring will ignore ending params, eg: /cnnic.cn%1a. <p> eg: for URI '/domain/cnnic.cn' return 'cnnic.cn'.
 * @param request request.
 * @return param value.
 */
public String getLastSplitInURI(HttpServletRequest request) throws DecodeException {
  String path=request.getRequestURI();
  String result=StringUtils.substringAfterLast(path,"String_Node_Str");
  result=DomainUtil.urlDecode(result);
  LOGGER.debug("String_Node_Str",result);
  return result;
}

Fixed version (ground truth):
/** 
 * get last split in URI. <p> For spring will ignore ending params, eg: /cnnic.cn%1a. <p> eg: for URI '/domain/cnnic.cn' return 'cnnic.cn'.
 * @param request request.
 * @return param value.
 * @throws DecodeException DecodeException.
 */
public String getLastSplitInURI(HttpServletRequest request) throws DecodeException {
  String path=request.getRequestURI();
  String result=StringUtils.substringAfterLast(path,"String_Node_Str");
  result=DomainUtil.urlDecode(result);
  LOGGER.debug("String_Node_Str",result);
  return result;
}
Program: 37270
Project: 37270
Buggy source:
/** 
 * delete old redirects. <p> NOTICE not to delete another IP type rows which just inserted. </p>
 * @param maxOldId maxOldId.
 * @param bootstraps
 */
private void deleteOld(Long maxOldId,List<Redirect> bootstraps){
  if (null == maxOldId) {
    LOGGER.info("String_Node_Str");
    return;
  }
  if (null == bootstraps || bootstraps.size() == 0) {
    LOGGER.info("String_Node_Str");
    return;
  }
  NetworkRedirect redirect=(NetworkRedirect)bootstraps.get(0);
  IpVersion ipVersion=redirect.getNetworkQueryParam().getQueryIpVersion();
  jdbcTemplate.update(DELETE_SMALLER_THAN_ID,maxOldId,ipVersion.getName());
}

Fixed version (ground truth):
/** 
 * delete old redirects. <p> NOTICE not to delete another IP type rows which just inserted. </p>
 * @param maxOldId maxOldId.
 * @param bootstraps bootstraps.
 */
private void deleteOld(Long maxOldId,List<Redirect> bootstraps){
  if (null == maxOldId) {
    LOGGER.info("String_Node_Str");
    return;
  }
  if (null == bootstraps || bootstraps.size() == 0) {
    LOGGER.info("String_Node_Str");
    return;
  }
  NetworkRedirect redirect=(NetworkRedirect)bootstraps.get(0);
  IpVersion ipVersion=redirect.getNetworkQueryParam().getQueryIpVersion();
  jdbcTemplate.update(DELETE_SMALLER_THAN_ID,maxOldId,ipVersion.getName());
}
Program: 37271
Project: 37271
Buggy source:
/** 
 * constructor with cause.
 */
public DecodeException(Throwable cause){
  super(cause);
}

Fixed version (ground truth):
/** 
 * constructor with cause.
 * @param cause cause.
 */
public DecodeException(Throwable cause){
  super(cause);
}
Program: 37272
Project: 37272
Buggy source:
/** 
 * constructor.
 */
public AutnumRedirect(Long startAutnum,Long endAutnum,List<String> urls){
  super();
  this.startAutnum=startAutnum;
  this.endAutnum=endAutnum;
  super.urls=urls;
}

Fixed version (ground truth):
/** 
 * constructor.
 * @param startAutnum startAutnum.
 * @param endAutnum endAutnum.
 * @param urls urls.
 */
public AutnumRedirect(Long startAutnum,Long endAutnum,List<String> urls){
  super();
  this.startAutnum=startAutnum;
  this.endAutnum=endAutnum;
  super.urls=urls;
}
Program: 37273
Project: 37273
Buggy source:
@Override List<Redirect> generateRedirects(String key,List<String> registryUrls){
  List<Redirect> redirects=new ArrayList<Redirect>();
  if (StringUtils.isBlank(key) || !removeEmptyUrlsAndValidate(registryUrls)) {
    LOGGER.error("String_Node_Str",key,registryUrls);
    return redirects;
  }
  key=StringUtils.trim(key);
  key=StringUtils.removeStart(key,"String_Node_Str");
  key=StringUtils.removeEnd(key,"String_Node_Str");
  String[] splits=StringUtils.split(key,AS_START_END_SEPARATOR);
  if (splits.length != 2) {
    LOGGER.error("String_Node_Str",Arrays.toString(splits));
    return redirects;
  }
  Long startAsNumber=0L;
  Long endAsNumber=0L;
  try {
    startAsNumber=Long.parseLong(StringUtils.trim(splits[0]));
    endAsNumber=Long.parseLong(StringUtils.trim(splits[1]));
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str",new Object[]{splits[0],splits[1],e});
    LOGGER.error("String_Node_Str",key,registryUrls);
    return redirects;
  }
  AutnumRedirect autnumRedirect=new AutnumRedirect(startAsNumber,endAsNumber,registryUrls);
  redirects.add(autnumRedirect);
  return redirects;
}

Fixed version (ground truth):
@Override List<Redirect> generateRedirects(String key,List<String> registryUrls){
  List<Redirect> redirects=new ArrayList<Redirect>();
  if (StringUtils.isBlank(key) || !removeEmptyUrlsAndValidate(registryUrls)) {
    logger.error("String_Node_Str" + "String_Node_Str",key,registryUrls);
    return redirects;
  }
  key=StringUtils.trim(key);
  key=StringUtils.removeStart(key,"String_Node_Str");
  key=StringUtils.removeEnd(key,"String_Node_Str");
  String[] splits=StringUtils.split(key,AS_START_END_SEPARATOR);
  if (splits.length != 2) {
    logger.error("String_Node_Str" + "String_Node_Str",Arrays.toString(splits));
    return redirects;
  }
  Long startAsNumber=0L;
  Long endAsNumber=0L;
  try {
    startAsNumber=Long.parseLong(StringUtils.trim(splits[0]));
    endAsNumber=Long.parseLong(StringUtils.trim(splits[1]));
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",new Object[]{splits[0],splits[1],e});
    logger.error("String_Node_Str",key,registryUrls);
    return redirects;
  }
  AutnumRedirect autnumRedirect=new AutnumRedirect(startAsNumber,endAsNumber,registryUrls);
  redirects.add(autnumRedirect);
  return redirects;
}
Program: 37274
Project: 37274
Buggy source:
@Override List<Redirect> generateRedirects(String key,List<String> registryUrls){
  List<Redirect> redirects=new ArrayList<Redirect>();
  if (StringUtils.isBlank(key) || !removeEmptyUrlsAndValidate(registryUrls)) {
    LOGGER.error("String_Node_Str");
    LOGGER.error("String_Node_Str",key);
    LOGGER.error("String_Node_Str",registryUrls);
    return redirects;
  }
  redirects.add(new DomainRedirect(key,registryUrls));
  return redirects;
}

Fixed version (ground truth):
@Override List<Redirect> generateRedirects(String key,List<String> registryUrls){
  List<Redirect> redirects=new ArrayList<Redirect>();
  if (StringUtils.isBlank(key) || !removeEmptyUrlsAndValidate(registryUrls)) {
    logger.error("String_Node_Str" + "String_Node_Str");
    logger.error("String_Node_Str",key);
    logger.error("String_Node_Str",registryUrls);
    return redirects;
  }
  redirects.add(new DomainRedirect(key,registryUrls));
  return redirects;
}
Program: 37275
Project: 37275
Buggy source:
@Override List<Redirect> generateRedirects(String key,List<String> registryUrls){
  List<Redirect> redirects=new ArrayList<Redirect>();
  if (!validateKey(key) || !removeEmptyUrlsAndValidate(registryUrls)) {
    return redirects;
  }
  key=StringUtils.lowerCase(key);
  String[] splits=StringUtils.split(key,CIDR_SEPARATOR);
  if (splits.length != 2) {
    return redirects;
  }
  String ipPrefix=splits[0];
  String ipMask=splits[1];
  long ipMaskLongVal=0;
  try {
    ipMaskLongVal=Long.parseLong(ipMask);
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str",ipMask,e);
    LOGGER.error("String_Node_Str",key,registryUrls);
    return redirects;
  }
  NetworkRedirect networkRedirect=new NetworkRedirect(ipPrefix,ipMask,registryUrls);
  IpVersion ipVersion=parseIpVersion(ipPrefix);
  if (null == ipVersion) {
    return redirects;
  }
  QueryParam queryParam=queryParser.parseIpQueryParam(ipPrefix,ipMaskLongVal,ipVersion);
  networkRedirect.setNetworkQueryParam((NetworkQueryParam)queryParam);
  redirects.add(networkRedirect);
  return redirects;
}

Fixed version (ground truth):
@Override List<Redirect> generateRedirects(String key,List<String> registryUrls){
  List<Redirect> redirects=new ArrayList<Redirect>();
  if (!validateKey(key) || !removeEmptyUrlsAndValidate(registryUrls)) {
    return redirects;
  }
  key=StringUtils.lowerCase(key);
  String[] splits=StringUtils.split(key,CIDR_SEPARATOR);
  if (splits.length != 2) {
    return redirects;
  }
  String ipPrefix=splits[0];
  String ipMask=splits[1];
  long ipMaskLongVal=0;
  try {
    ipMaskLongVal=Long.parseLong(ipMask);
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",ipMask,e);
    logger.error("String_Node_Str",key,registryUrls);
    return redirects;
  }
  NetworkRedirect networkRedirect=new NetworkRedirect(ipPrefix,ipMask,registryUrls);
  IpVersion ipVersion=parseIpVersion(ipPrefix);
  if (null == ipVersion) {
    return redirects;
  }
  QueryParam queryParam=queryParser.parseIpQueryParam(ipPrefix,ipMaskLongVal,ipVersion);
  networkRedirect.setNetworkQueryParam((NetworkQueryParam)queryParam);
  redirects.add(networkRedirect);
  return redirects;
}
Program: 37276
Project: 37276
Buggy source:
/** 
 * save redirect from bootstrap.
 * @param bootstrapRegistries bootstrapRegistries.
 */
public void handle(){
  BootstrapRegistries bootstrapRegistries=dataProvider.getDataFromRegistry(getRegistryRelativateUrl());
  if (null == bootstrapRegistries) {
    LOGGER.error("String_Node_Str");
    return;
  }
  List<Redirect> redirects=generateRedirectsFromBootstraps(bootstrapRegistries);
  LOGGER.debug("String_Node_Str",redirects);
  saveRedirects(redirects);
}

Fixed version (ground truth):
/** 
 * save redirect from bootstrap.
 */
public void handle(){
  BootstrapRegistries bootstrapRegistries=dataProvider.getDataFromRegistry(getRegistryRelativateUrl());
  if (null == bootstrapRegistries) {
    logger.error("String_Node_Str");
    return;
  }
  List<Redirect> redirects=generateRedirectsFromBootstraps(bootstrapRegistries);
  logger.debug("String_Node_Str",redirects);
  saveRedirects(redirects);
}
Program: 37277
Project: 37277
Buggy source:
/** 
 * decoded url use UTF-8.
 * @param str string.
 * @return String decoded string.
 */
public static String urlDecode(String str) throws DecodeException {
  if (StringUtils.isBlank(str)) {
    return str;
  }
  String result=str;
  try {
    result=URLDecoder.decode(str,StringUtil.CHAR_SET_UTF8);
  }
 catch (  UnsupportedEncodingException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  Exception e) {
    LOGGER.error("String_Node_Str",e);
    throw new DecodeException("String_Node_Str",e);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * decoded url use UTF-8.
 * @param str string.
 * @return String decoded string.
 * @throws DecodeException DecodeException.
 */
public static String urlDecode(String str) throws DecodeException {
  if (StringUtils.isBlank(str)) {
    return str;
  }
  String result=str;
  try {
    result=URLDecoder.decode(str,StringUtil.CHAR_SET_UTF8);
  }
 catch (  UnsupportedEncodingException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  Exception e) {
    LOGGER.error("String_Node_Str",e);
    throw new DecodeException("String_Node_Str",e);
  }
  return result;
}
Program: 37278
Project: 37278
Buggy source:
/** 
 * validate domain length, length is without last dot.
 * @param domainWithoutLastDot domain without last dot.
 * @return true if valid,false if not.
 */
private static boolean validateDomainLength(String domainWithoutLastDot){
  if (StringUtils.isBlank(domainWithoutLastDot)) {
    return false;
  }
  if (domainWithoutLastDot.length() < MIN_DOMAIN_LENGTH_WITHOUT_LAST_DOT || domainWithoutLastDot.length() > MAX_DOMAIN_LENGTH_WITHOUT_LAST_DOT) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * validate domain length, length is without last dot.
 * @param domainWithoutLastDot domain without last dot.
 * @return true if valid,false if not.
 */
private static boolean validateDomainLength(String domainWithoutLastDot){
  if (StringUtils.isBlank(domainWithoutLastDot)) {
    return false;
  }
  int domainLength=domainWithoutLastDot.length();
  if (domainLength < MIN_DOMAIN_LENGTH_WITHOUT_LAST_DOT) {
    return false;
  }
  if (domainLength > MAX_DOMAIN_LENGTH_WITHOUT_LAST_DOT) {
    return false;
  }
  return true;
}
Program: 37279
Project: 37279
Buggy source:
@Override List<Redirect> generateRedirects(String key,List<String> registryUrls){
  List<Redirect> redirects=new ArrayList<Redirect>();
  if (StringUtils.isBlank(key) || !removeEmptyUrlsAndValidate(registryUrls)) {
    logger.error("String_Node_Str" + "String_Node_Str",key,registryUrls);
    return redirects;
  }
  key=StringUtils.trim(key);
  key=StringUtils.removeStart(key,"String_Node_Str");
  key=StringUtils.removeEnd(key,"String_Node_Str");
  String[] splits=StringUtils.split(key,AS_START_END_SEPARATOR);
  if (splits.length != 2) {
    logger.error("String_Node_Str" + "String_Node_Str",Arrays.toString(splits));
    return redirects;
  }
  Long startAsNumber=0L;
  Long endAsNumber=0L;
  try {
    startAsNumber=Long.parseLong(StringUtils.trim(splits[0]));
    endAsNumber=Long.parseLong(StringUtils.trim(splits[1]));
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",new Object[]{splits[0],splits[1],e});
    logger.error("String_Node_Str",key,registryUrls);
    return redirects;
  }
  AutnumRedirect autnumRedirect=new AutnumRedirect(startAsNumber,endAsNumber,registryUrls);
  redirects.add(autnumRedirect);
  return redirects;
}

Fixed version (ground truth):
@Override List<Redirect> generateRedirects(String key,List<String> registryUrls){
  List<Redirect> redirects=new ArrayList<Redirect>();
  if (StringUtils.isBlank(key) || !removeEmptyUrlsAndValidate(registryUrls)) {
    logger.error("String_Node_Str" + "String_Node_Str",key,registryUrls);
    return redirects;
  }
  key=StringUtils.trim(key);
  key=StringUtils.removeStart(key,"String_Node_Str");
  key=StringUtils.removeEnd(key,"String_Node_Str");
  String[] splits=StringUtils.split(key,AS_START_END_SEPARATOR);
  if (splits.length != 2) {
    logger.error("String_Node_Str" + "String_Node_Str",Arrays.toString(splits));
    return redirects;
  }
  Long startAsNumber=0L;
  Long endAsNumber=0L;
  try {
    startAsNumber=Long.parseLong(StringUtils.trim(splits[0]));
    endAsNumber=Long.parseLong(StringUtils.trim(splits[1]));
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",new Object[]{splits[0],splits[1],e});
    logger.error("String_Node_Str",key,registryUrls);
    return redirects;
  }
  if (!validateAsNumber(startAsNumber,endAsNumber)) {
    logger.error("String_Node_Str",key,registryUrls);
    return redirects;
  }
  AutnumRedirect autnumRedirect=new AutnumRedirect(startAsNumber,endAsNumber,registryUrls);
  redirects.add(autnumRedirect);
  return redirects;
}
Program: 37280
Project: 37280
Buggy source:
@Override List<Redirect> generateRedirects(String key,List<String> registryUrls){
  List<Redirect> redirects=new ArrayList<Redirect>();
  if (!validateKey(key) || !removeEmptyUrlsAndValidate(registryUrls)) {
    return redirects;
  }
  key=StringUtils.lowerCase(key);
  String[] splits=StringUtils.split(key,CIDR_SEPARATOR);
  if (splits.length != 2) {
    return redirects;
  }
  String ipPrefix=splits[0];
  String ipMask=splits[1];
  long ipMaskLongVal=0;
  try {
    ipMaskLongVal=Long.parseLong(ipMask);
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",ipMask,e);
    logger.error("String_Node_Str",key,registryUrls);
    return redirects;
  }
  NetworkRedirect networkRedirect=new NetworkRedirect(ipPrefix,ipMask,registryUrls);
  IpVersion ipVersion=parseIpVersion(ipPrefix);
  if (null == ipVersion) {
    return redirects;
  }
  QueryParam queryParam=queryParser.parseIpQueryParam(ipPrefix,ipMaskLongVal,ipVersion);
  networkRedirect.setNetworkQueryParam((NetworkQueryParam)queryParam);
  redirects.add(networkRedirect);
  return redirects;
}

Fixed version (ground truth):
@Override List<Redirect> generateRedirects(String key,List<String> registryUrls){
  List<Redirect> redirects=new ArrayList<Redirect>();
  if (!validateKey(key) || !removeEmptyUrlsAndValidate(registryUrls)) {
    return redirects;
  }
  key=StringUtils.lowerCase(key);
  String[] splits=StringUtils.split(key,CIDR_SEPARATOR);
  if (splits.length != 2) {
    return redirects;
  }
  String ipPrefix=splits[0];
  String ipMask=splits[1];
  long ipMaskLongVal=0;
  try {
    ipMaskLongVal=Long.parseLong(ipMask);
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",ipMask,e);
    logger.error("String_Node_Str",key,registryUrls);
    return redirects;
  }
  if (!validateMask(ipMaskLongVal)) {
    logger.error("String_Node_Str",ipMask);
    logger.error("String_Node_Str",key,registryUrls);
    return redirects;
  }
  NetworkRedirect networkRedirect=new NetworkRedirect(ipPrefix,ipMask,registryUrls);
  IpVersion ipVersion=parseIpVersion(ipPrefix);
  if (null == ipVersion) {
    return redirects;
  }
  QueryParam queryParam=queryParser.parseIpQueryParam(ipPrefix,ipMaskLongVal,ipVersion);
  networkRedirect.setNetworkQueryParam((NetworkQueryParam)queryParam);
  redirects.add(networkRedirect);
  return redirects;
}
Program: 37281
Project: 37281
Buggy source:
@Override public void messageReceived(ChannelHandlerContext ctx,String request){
  InetSocketAddress socketAddress=(InetSocketAddress)ctx.channel().remoteAddress();
  String remoteAddr=socketAddress.getAddress().getHostAddress();
  LOGGER.info("String_Node_Str",remoteAddr);
  String response=StringUtils.EMPTY;
  if (ConnectionControlService.exceedRateLimit(remoteAddr)) {
    LOGGER.debug("String_Node_Str");
    response=get429Response();
    writeResponseAndcloseConnection(ctx,response);
    return;
  }
  if (request.isEmpty()) {
    response="String_Node_Str";
  }
 else {
    ProxyService proxyService=ProxyService.getInstance();
    try {
      response=proxyService.execute(request);
    }
 catch (    Exception e) {
      LOGGER.error("String_Node_Str",e);
      response="String_Node_Str";
    }
  }
  writeResponseAndcloseConnection(ctx,response);
}

Fixed version (ground truth):
@Override public void messageReceived(ChannelHandlerContext ctx,String request){
  InetSocketAddress socketAddress=(InetSocketAddress)ctx.channel().remoteAddress();
  String remoteAddr=socketAddress.getAddress().getHostAddress();
  LOGGER.info("String_Node_Str",remoteAddr);
  String response=StringUtils.EMPTY;
  if (ConnectionControlService.exceedRateLimit(remoteAddr)) {
    LOGGER.debug("String_Node_Str");
    response=get429Response();
    writeResponseAndcloseConnection(ctx,response);
    return;
  }
  if (request.isEmpty()) {
    response="String_Node_Str";
  }
 else {
    ProxyService proxyService=ProxyService.getInstance();
    try {
      response=proxyService.execute(request);
    }
 catch (    ServiceException e) {
      response=e.getMessage();
    }
catch (    Exception e) {
      LOGGER.error("String_Node_Str",e);
      response="String_Node_Str";
    }
  }
  writeResponseAndcloseConnection(ctx,response);
}
Program: 37282
Project: 37282
Buggy source:
/** 
 * main service method.This will parse command, construct URI and request RDAP server for JSON response, and then convert JSON result to text format.
 * @param commandStr commandStr.
 * @return query result.
 * @throws ServiceException ServiceException.
 */
public String execute(String commandStr) throws Exception {
  LOGGER.info("String_Node_Str",commandStr);
  String requestURI=StringUtils.EMPTY;
  try {
    Command command=CommandParser.parse(commandStr);
    requestURI=generateRequestURI(command);
    if (StringUtils.isBlank(requestURI)) {
      LOGGER.error("String_Node_Str");
      throw new ServiceException("String_Node_Str" + commandStr);
    }
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str",e);
    LOGGER.error("String_Node_Str");
    requestURI=generateRequestURIForError();
  }
  RestResponse restResponse=RestClient.getInstance().execute(requestURI);
  Map jsonMap=JsonUtil.deserializateJsonToMap(restResponse);
  String result=ResponseFormater.format(jsonMap);
  return result;
}

Fixed version (ground truth):
/** 
 * main service method.This will parse command, construct URI and request RDAP server for JSON response, and then convert JSON result to text format.
 * @param commandStr commandStr.
 * @return query result.
 * @throws ServiceException ServiceException.
 */
public String execute(String commandStr) throws Exception {
  LOGGER.info("String_Node_Str",commandStr);
  String requestURI=StringUtils.EMPTY;
  try {
    Command command=CommandParser.parse(commandStr);
    requestURI=generateRequestURI(command);
    if (StringUtils.isBlank(requestURI)) {
      LOGGER.error("String_Node_Str");
      throw new ServiceException("String_Node_Str" + commandStr);
    }
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str",e);
    LOGGER.error("String_Node_Str");
    requestURI=generateRequestURIForError();
  }
  RestResponse restResponse=RestClient.getInstance().execute(requestURI);
  if (null == restResponse || StringUtils.isBlank(restResponse.getBody())) {
    LOGGER.error("String_Node_Str");
    throw new ServiceException("String_Node_Str" + commandStr);
  }
  Map jsonMap=JsonUtil.deserializateJsonToMap(restResponse);
  String result=ResponseFormater.format(jsonMap);
  return result;
}
Program: 37283
Project: 37283
Buggy source:
@Override protected String getRelativeRequestURI(Command command){
  List<String> argumentList=command.getArgumentList();
  throwExceptionIfArguementIsEmpty(argumentList);
  String uri="String_Node_Str";
  String OPTION_FN=CommandOption.ENTITY_SEARCH_FN.getOption();
  String OPTION_HANDLE=CommandOption.ENTITY_SEARCH_HANDLE.getOption();
  if (isPrefixedArgument(argumentList.get(0),OPTION_FN)) {
    uri=uri + OPTION_FN + "String_Node_Str"+ removePrefix(argumentList.get(0),OPTION_FN);
  }
 else   if (isPrefixedArgument(argumentList.get(0),OPTION_HANDLE)) {
    uri=uri + OPTION_HANDLE + "String_Node_Str"+ removePrefix(argumentList.get(0),OPTION_HANDLE);
  }
 else {
    throw new ServiceException("String_Node_Str");
  }
  return uri;
}

Fixed version (ground truth):
@Override protected String getRelativeRequestURI(Command command){
  List<String> argumentList=command.getArgumentList();
  throwExceptionIfArguementIsEmpty(argumentList);
  String uri="String_Node_Str";
  String OPTION_FN=CommandOption.ENTITY_SEARCH_FN.getOption();
  String OPTION_HANDLE=CommandOption.ENTITY_SEARCH_HANDLE.getOption();
  if (isPrefixedArgument(argumentList.get(0),OPTION_FN + PARAM_SEPARATOR)) {
    uri=uri + OPTION_FN + PARAM_SEPARATOR+ removePrefix(argumentList.get(0),OPTION_FN);
  }
 else   if (isPrefixedArgument(argumentList.get(0),OPTION_HANDLE + PARAM_SEPARATOR)) {
    uri=uri + OPTION_HANDLE + PARAM_SEPARATOR+ removePrefix(argumentList.get(0),OPTION_HANDLE);
  }
 else {
    throw new ServiceException("String_Node_Str");
  }
  return uri;
}
Program: 37284
Project: 37284
Buggy source:
@Override protected String getRelativeRequestURI(Command command){
  List<String> argumentList=command.getArgumentList();
  throwExceptionIfArguementIsEmpty(argumentList);
  String uri="String_Node_Str";
  String OPTION_IP=CommandOption.NAMESERVER_SEARCH_BY_IP.getOption();
  String OPTION_NAME=CommandOption.NAMESERVER_SEARCH_BY_NAME.getOption();
  if (isPrefixedArgument(argumentList.get(0),OPTION_IP)) {
    uri=uri + OPTION_IP + "String_Node_Str"+ removePrefix(argumentList.get(0),OPTION_IP);
  }
 else {
    List<String> argumntList=command.getArgumentList();
    throwExceptionIfArguementIsEmpty(argumntList);
    uri=uri + OPTION_NAME + "String_Node_Str"+ argumntList.get(0);
  }
  return uri;
}

Fixed version (ground truth):
@Override protected String getRelativeRequestURI(Command command){
  List<String> argumentList=command.getArgumentList();
  throwExceptionIfArguementIsEmpty(argumentList);
  String uri="String_Node_Str";
  String OPTION_IP=CommandOption.NAMESERVER_SEARCH_BY_IP.getOption();
  String OPTION_NAME=CommandOption.NAMESERVER_SEARCH_BY_NAME.getOption();
  if (isPrefixedArgument(argumentList.get(0),OPTION_IP + PARAM_SEPARATOR)) {
    uri=uri + OPTION_IP + "String_Node_Str"+ removePrefix(argumentList.get(0),OPTION_IP);
  }
 else {
    List<String> argumntList=command.getArgumentList();
    throwExceptionIfArguementIsEmpty(argumntList);
    uri=uri + OPTION_NAME + "String_Node_Str"+ argumntList.get(0);
  }
  return uri;
}
Program: 37285
Project: 37285
Buggy source:
/** 
 * get prefixed agrument.
 * @param prefixedArgument prefixedArgument.
 * @param prefix prefix.
 * @return value.
 */
protected String removePrefix(String prefixedArgument,String prefix){
  if (StringUtils.isBlank(prefixedArgument)) {
    return StringUtils.EMPTY;
  }
  return StringUtils.removeStart(prefixedArgument,prefix + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * get prefixed agrument.
 * @param prefixedArgument prefixedArgument.
 * @param prefix prefix.
 * @return value.
 */
protected String removePrefix(String prefixedArgument,String prefix){
  if (StringUtils.isBlank(prefixedArgument)) {
    return StringUtils.EMPTY;
  }
  return StringUtils.removeStart(prefixedArgument,prefix + PARAM_SEPARATOR);
}
Program: 37286
Project: 37286
Buggy source:
/** 
 * call this method to start timer.
 */
public static void schedule(){
  timer.schedule(new TimerTask(){
    @Override public void run(){
      ConnectionControlService.clearIpMap();
    }
  }
,TIMER_DELAY,INTERVAL);
}

Fixed version (ground truth):
/** 
 * call this method to start TIMER.
 */
public static void schedule(){
  TIMER.schedule(new TimerTask(){
    @Override public void run(){
      ConnectionControlService.clearIpMap();
    }
  }
,TIMER_DELAY,INTERVAL);
}
Program: 37287
Project: 37287
Buggy source:
/** 
 * stop timer.
 */
public static void stop(){
  timer.cancel();
  timer.purge();
}

Fixed version (ground truth):
/** 
 * stop TIMER.
 */
public static void stop(){
  TIMER.cancel();
  TIMER.purge();
}
Program: 37288
Project: 37288
Buggy source:
public void setCommandType(CommandOption commandType){
  this.commandType=commandType;
}

Fixed version (ground truth):
/** 
 * set commandType.
 * @param commandType commandType.
 */
public void setCommandType(CommandOption commandType){
  this.commandType=commandType;
}
Program: 37289
Project: 37289
Buggy source:
public Map<String,String> getAllOptionsMap(){
  return allOptionsMap;
}

Fixed version (ground truth):
/** 
 * get allOptionsMap.
 * @return allOptionsMap.
 */
public Map<String,String> getAllOptionsMap(){
  return allOptionsMap;
}
Program: 37290
Project: 37290
Buggy source:
public void setArgumentList(List<String> argumentList){
  this.argumentList=argumentList;
}

Fixed version (ground truth):
/** 
 * set argumentList.
 * @param argumentList argumentList.
 */
public void setArgumentList(List<String> argumentList){
  this.argumentList=argumentList;
}
Program: 37291
Project: 37291
Buggy source:
public void setAllOptionsMap(Map<String,String> allOptionsMap){
  this.allOptionsMap=allOptionsMap;
}

Fixed version (ground truth):
/** 
 * set allOptionsMap.
 * @param allOptionsMap allOptionsMap.
 */
public void setAllOptionsMap(Map<String,String> allOptionsMap){
  this.allOptionsMap=allOptionsMap;
}
Program: 37292
Project: 37292
Buggy source:
public List<String> getArgumentList(){
  return argumentList;
}

Fixed version (ground truth):
/** 
 * get argumentList.
 * @return argumentList.
 */
public List<String> getArgumentList(){
  return argumentList;
}
Program: 37293
Project: 37293
Buggy source:
/** 
 * get prefixed agrument.
 * @param prefixedArgument prefixedArgument.
 * @param prefix prefix.
 * @return value.
 */
protected String removePrefix(String prefixedArgument,String prefix){
  if (StringUtils.isBlank(prefixedArgument)) {
    return StringUtils.EMPTY;
  }
  return StringUtils.removeStart(prefixedArgument,prefix + PARAM_SEPARATOR);
}

Fixed version (ground truth):
/** 
 * get prefixed argument.
 * @param prefixedArgument prefixedArgument.
 * @param prefix prefix.
 * @return value.
 */
protected String removePrefix(String prefixedArgument,String prefix){
  if (StringUtils.isBlank(prefixedArgument)) {
    return StringUtils.EMPTY;
  }
  return StringUtils.removeStart(prefixedArgument,prefix + PARAM_SEPARATOR);
}
Program: 37294
Project: 37294
Buggy source:
public static Integer getServicePort(){
  return servicePort;
}

Fixed version (ground truth):
/** 
 * get servicePort.
 * @return servicePort.
 */
public static Integer getServicePort(){
  return servicePort;
}
Program: 37295
Project: 37295
Buggy source:
public static void setResponseFormater(String responseFormater){
  LOGGER.info("String_Node_Str",responseFormater);
  RdapProperties.responseFormater=responseFormater;
}

Fixed version (ground truth):
/** 
 * set responseFormater.
 * @param responseFormater responseFormater.
 */
public static void setResponseFormater(String responseFormater){
  LOGGER.info("String_Node_Str",responseFormater);
  RdapProperties.responseFormater=responseFormater;
}
Program: 37296
Project: 37296
Buggy source:
public static Integer getManagePort(){
  return managePort;
}

Fixed version (ground truth):
/** 
 * set servicePort.
 * @return servicePort.
 */
public static Integer getManagePort(){
  return managePort;
}
Program: 37297
Project: 37297
Buggy source:
public static void setManagePort(Integer managePort){
  LOGGER.info("String_Node_Str",managePort);
  RdapProperties.managePort=managePort;
}

Fixed version (ground truth):
/** 
 * get managePort.
 * @param managePort managePort.
 */
public static void setManagePort(Integer managePort){
  LOGGER.info("String_Node_Str",managePort);
  RdapProperties.managePort=managePort;
}
Program: 37298
Project: 37298
Buggy source:
public static void setMinSecondsAccessInterval(Long minSecondsAccessInterval){
  LOGGER.info("String_Node_Str",minSecondsAccessInterval);
  RdapProperties.minSecondsAccessInterval=minSecondsAccessInterval;
}

Fixed version (ground truth):
/** 
 * set minSecondsAccessInterval.
 * @param minSecondsAccessInterval .
 */
public static void setMinSecondsAccessInterval(Long minSecondsAccessInterval){
  LOGGER.info("String_Node_Str",minSecondsAccessInterval);
  RdapProperties.minSecondsAccessInterval=minSecondsAccessInterval;
}
Program: 37299
Project: 37299
Buggy source:
public static String getRdapServerBaseUrl(){
  return rdapServerBaseUrl;
}

Fixed version (ground truth):
/** 
 * get rdapServerBaseUrl.
 * @return rdapServerBaseUrl.
 */
public static String getRdapServerBaseUrl(){
  return rdapServerBaseUrl;
}
Program: 37300
Project: 37300
Buggy source:
public static void setRdapServerBaseUrl(String rdapServerBaseUrl){
  LOGGER.info("String_Node_Str",rdapServerBaseUrl);
  RdapProperties.rdapServerBaseUrl=rdapServerBaseUrl;
}

Fixed version (ground truth):
/** 
 * set rdapServerBaseUrl.
 * @param rdapServerBaseUrl rdapServerBaseUrl.
 */
public static void setRdapServerBaseUrl(String rdapServerBaseUrl){
  LOGGER.info("String_Node_Str",rdapServerBaseUrl);
  RdapProperties.rdapServerBaseUrl=rdapServerBaseUrl;
}
Program: 37301
Project: 37301
Buggy source:
public static String getResponseFormater(){
  return responseFormater;
}

Fixed version (ground truth):
/** 
 * get responseFormater.
 * @return responseFormater.
 */
public static String getResponseFormater(){
  return responseFormater;
}
Program: 37302
Project: 37302
Buggy source:
public static void setServicePort(Integer servicePort){
  LOGGER.info("String_Node_Str",servicePort);
  RdapProperties.servicePort=servicePort;
}

Fixed version (ground truth):
/** 
 * set managePort.
 * @param servicePort managePort.
 */
public static void setServicePort(Integer servicePort){
  LOGGER.info("String_Node_Str",servicePort);
  RdapProperties.servicePort=servicePort;
}
Program: 37303
Project: 37303
Buggy source:
public static Long getMinSecondsAccessInterval(){
  return minSecondsAccessInterval;
}

Fixed version (ground truth):
/** 
 * get minSecondsAccessInterval.
 * @return minSecondsAccessInterval.
 */
public static Long getMinSecondsAccessInterval(){
  return minSecondsAccessInterval;
}
Program: 37304
Project: 37304
Buggy source:
/** 
 * get singleton instance.
 * @return
 */
public static RestClient getInstance(){
  return restClient;
}

Fixed version (ground truth):
/** 
 * get singleton instance.
 * @return instance.
 */
public static RestClient getInstance(){
  return restClient;
}
Program: 37305
Project: 37305
Buggy source:
/** 
 * @param url
 * @return
 */
public RestResponse execute(String url) throws ServiceException {
  CloseableHttpClient client=HttpClients.createDefault();
  RequestConfig requestConfig=RequestConfig.custom().setRedirectsEnabled(false).build();
  HttpGet request=new HttpGet(url);
  request.setConfig(requestConfig);
  request.setHeader("String_Node_Str","String_Node_Str");
  HttpResponse response=null;
  String responseBody=StringUtils.EMPTY;
  int statusCode=HttpStatus.SC_OK;
  String locationHeader=StringUtils.EMPTY;
  try {
    response=client.execute(request);
    HttpEntity entity=response.getEntity();
    statusCode=response.getStatusLine().getStatusCode();
    Header[] headers=response.getHeaders("String_Node_Str");
    if (null != headers && headers.length > 0) {
      locationHeader=headers[0].getValue();
    }
    if (entity != null) {
      InputStream inStream=entity.getContent();
      responseBody=convertStreamToString(inStream);
      inStream.close();
    }
  }
 catch (  Exception ex) {
    LOGGER.error("String_Node_Str",ex);
    throw new ServiceException("String_Node_Str");
  }
  RestResponse result=new RestResponse();
  result.setBody(responseBody);
  result.setStatusCode(statusCode);
  result.setLocationHeader(locationHeader);
  return result;
}

Fixed version (ground truth):
/** 
 * call rest service.
 * @param url url.
 * @return rest response.
 */
public RestResponse execute(String url) throws ServiceException {
  CloseableHttpClient client=HttpClients.createDefault();
  RequestConfig requestConfig=RequestConfig.custom().setRedirectsEnabled(false).build();
  HttpGet request=new HttpGet(url);
  request.setConfig(requestConfig);
  request.setHeader("String_Node_Str","String_Node_Str");
  HttpResponse response=null;
  String responseBody=StringUtils.EMPTY;
  int statusCode=HttpStatus.SC_OK;
  String locationHeader=StringUtils.EMPTY;
  try {
    response=client.execute(request);
    HttpEntity entity=response.getEntity();
    statusCode=response.getStatusLine().getStatusCode();
    Header[] headers=response.getHeaders("String_Node_Str");
    if (null != headers && headers.length > 0) {
      locationHeader=headers[0].getValue();
    }
    if (entity != null) {
      InputStream inStream=entity.getContent();
      responseBody=convertStreamToString(inStream);
      inStream.close();
    }
  }
 catch (  Exception ex) {
    LOGGER.error("String_Node_Str",ex);
    throw new ServiceException("String_Node_Str");
  }
  RestResponse result=new RestResponse();
  result.setBody(responseBody);
  result.setStatusCode(statusCode);
  result.setLocationHeader(locationHeader);
  return result;
}
Program: 37306
Project: 37306
Buggy source:
/** 
 * decoded url use UTF-8.
 * @param str string.
 * @return String decoded string.
 */
public static String urlDecode(String str){
  if (StringUtils.isBlank(str)) {
    return str;
  }
  String result=str;
  try {
    result=URLDecoder.decode(str,StringUtil.CHAR_SET_UTF8);
  }
 catch (  UnsupportedEncodingException e) {
    LOGGER.error(e.getMessage());
  }
  return result;
}

Fixed version (ground truth):
/** 
 * decoded url use UTF-8.
 * @param str string.
 * @return String decoded string.
 */
public static String urlDecode(String str) throws DecodeException {
  if (StringUtils.isBlank(str)) {
    return str;
  }
  String result=str;
  try {
    result=URLDecoder.decode(str,StringUtil.CHAR_SET_UTF8);
  }
 catch (  UnsupportedEncodingException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  Exception e) {
    LOGGER.error("String_Node_Str",e);
    throw new DecodeException("String_Node_Str",e);
  }
  return result;
}
Program: 37307
Project: 37307
Buggy source:
/** 
 * decode,and replace ASCII char to lower case.
 * @param str string.
 * @return str.
 */
@Deprecated public static String decodeAndReplaceAsciiToLowercase(String str){
  if (StringUtils.isBlank(str)) {
    return str;
  }
  str=urlDecode(str);
  LOGGER.debug("String_Node_Str",str);
  StringBuffer asciiLowerCasedSb=new StringBuffer();
  for (int i=0; i < str.length(); i++) {
    int c=str.charAt(i);
    char charVal=str.charAt(i);
    if (c <= MAX_ASCII_CODE) {
      asciiLowerCasedSb.append(StringUtils.lowerCase(String.valueOf(charVal)));
    }
 else {
      asciiLowerCasedSb.append(String.valueOf(charVal));
    }
  }
  return asciiLowerCasedSb.toString();
}

Fixed version (ground truth):
/** 
 * decode,and replace ASCII char to lower case.
 * @param str string.
 * @return str.
 */
@Deprecated public static String decodeAndReplaceAsciiToLowercase(String str) throws DecodeException {
  if (StringUtils.isBlank(str)) {
    return str;
  }
  str=urlDecode(str);
  LOGGER.debug("String_Node_Str",str);
  StringBuffer asciiLowerCasedSb=new StringBuffer();
  for (int i=0; i < str.length(); i++) {
    int c=str.charAt(i);
    char charVal=str.charAt(i);
    if (c <= MAX_ASCII_CODE) {
      asciiLowerCasedSb.append(StringUtils.lowerCase(String.valueOf(charVal)));
    }
 else {
      asciiLowerCasedSb.append(String.valueOf(charVal));
    }
  }
  return asciiLowerCasedSb.toString();
}
Program: 37308
Project: 37308
Buggy source:
/** 
 * <pre> query ip by ip and mask. URI:/ip/{ipAddr}/{mask}  This service is under permission control, @see AccessControlManager. This service is under policy control, @see PolicyControlService. </pre>
 * @param ipAddr the query ip
 * @param mask the ip mask
 * @param request request.
 * @return JSON formatted result,with HTTP code.
 */
@RequestMapping(value={"String_Node_Str"},method=RequestMethod.GET) @ResponseBody public ResponseEntity queryIpWithMask(@PathVariable String ipAddr,@PathVariable String mask,HttpServletRequest request){
  ipAddr=queryParser.getLastSecondSplitInURI(request);
  mask=queryParser.getLastSplitInURI(request);
  return queryIpAddress(ipAddr,mask,ipAddr + "String_Node_Str" + mask);
}

Fixed version (ground truth):
/** 
 * <pre> query ip by ip and mask. URI:/ip/{ipAddr}/{mask}  This service is under permission control, @see AccessControlManager. This service is under policy control, @see PolicyControlService. </pre>
 * @param ipAddr the query ip
 * @param mask the ip mask
 * @param request request.
 * @return JSON formatted result,with HTTP code.
 */
@RequestMapping(value={"String_Node_Str"},method=RequestMethod.GET) @ResponseBody public ResponseEntity queryIpWithMask(@PathVariable String ipAddr,@PathVariable String mask,HttpServletRequest request) throws DecodeException {
  ipAddr=queryParser.getLastSecondSplitInURI(request);
  mask=queryParser.getLastSplitInURI(request);
  return queryIpAddress(ipAddr,mask,ipAddr + "String_Node_Str" + mask);
}
Program: 37309
Project: 37309
Buggy source:
/** 
 * <pre> query ip by ip address. URI:/ip/{ipAddr}  This service is under permission control, @see AccessControlManager. This service is under policy control, @see PolicyControlService. </pre>
 * @param ipAddr the query ip
 * @param request request.
 * @return ResponseEntity
 */
@RequestMapping(value={"String_Node_Str"},method=RequestMethod.GET) @ResponseBody public ResponseEntity queryIp(@PathVariable String ipAddr,HttpServletRequest request){
  ipAddr=queryParser.getLastSplitInURI(request);
  return queryIpAddress(ipAddr,"String_Node_Str",ipAddr);
}

Fixed version (ground truth):
/** 
 * <pre> query ip by ip address. URI:/ip/{ipAddr}  This service is under permission control, @see AccessControlManager. This service is under policy control, @see PolicyControlService. </pre>
 * @param ipAddr the query ip
 * @param request request.
 * @return ResponseEntity
 */
@RequestMapping(value={"String_Node_Str"},method=RequestMethod.GET) @ResponseBody public ResponseEntity queryIp(@PathVariable String ipAddr,HttpServletRequest request) throws DecodeException {
  ipAddr=queryParser.getLastSplitInURI(request);
  return queryIpAddress(ipAddr,"String_Node_Str",ipAddr);
}
Program: 37312
Project: 37312
Buggy source:
/** 
 * <pre> Query help. URI:/help. This service is not under permission control. This service is not under policy control. </pre>
 * @param request HttpServletRequest.
 * @param response HttpServletResponse
 * @return JSON formated result,with HTTP code.
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public ResponseEntity queryHelp(HttpServletRequest request,HttpServletResponse response){
  String lastSpliInURI=queryParser.getLastSplitInURI(request);
  if (!"String_Node_Str".equals(lastSpliInURI)) {
    return RestResponseUtil.createResponse400();
  }
  Help result=queryService.queryHelp(queryParser.parseQueryParam("String_Node_Str"));
  if (null != result) {
    responseDecorator.decorateResponseForHelp(result);
    return RestResponseUtil.createResponse200(result);
  }
  return RestResponseUtil.createResponse404();
}

Fixed version (ground truth):
/** 
 * <pre> Query help. URI:/help. This service is not under permission control. This service is not under policy control. </pre>
 * @param request HttpServletRequest.
 * @param response HttpServletResponse
 * @return JSON formated result,with HTTP code.
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public ResponseEntity queryHelp(HttpServletRequest request,HttpServletResponse response) throws DecodeException {
  String lastSpliInURI=queryParser.getLastSplitInURI(request);
  if (!"String_Node_Str".equals(lastSpliInURI)) {
    return RestResponseUtil.createResponse400();
  }
  Help result=queryService.queryHelp(queryParser.parseQueryParam("String_Node_Str"));
  if (null != result) {
    responseDecorator.decorateResponseForHelp(result);
    return RestResponseUtil.createResponse200(result);
  }
  return RestResponseUtil.createResponse404();
}