nus-yam/ex-repair huggingface dataset:
Program: 37364
Project: 37364
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){
  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: 37366
Project: 37366
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){
  LOGGER.debug("String_Node_Str" + handle);
  handle=queryParser.getLastSplitInURI(request);
  handle=StringUtils.trim(handle);
  if (!StringUtil.isValidEntityHandleOrName(handle)) {
    return RestResponseUtil.createResponse400();
  }
  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.
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public ResponseEntity queryEntity(@PathVariable String handle,HttpServletRequest request,HttpServletResponse response){
  LOGGER.debug("String_Node_Str" + handle);
  handle=queryParser.getLastSplitInURI(request);
  handle=StringUtils.trim(handle);
  if (!StringUtil.isValidEntityHandleOrName(handle)) {
    return RestResponseUtil.createResponse400();
  }
  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: 37370
Project: 37370
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
 * @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){
  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
 * @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);
}
Program: 37371
Project: 37371
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
 * @return ResponseEntity
 */
@RequestMapping(value={"String_Node_Str"},method=RequestMethod.GET) @ResponseBody public ResponseEntity queryIp(@PathVariable String ipAddr){
  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
 * @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);
}
Program: 37372
Project: 37372
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){
  LOGGER.debug("String_Node_Str");
  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){
  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: 37374
Project: 37374
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){
  LOGGER.debug("String_Node_Str" + handle);
  handle=StringUtils.trim(handle);
  if (!StringUtil.isValidEntityHandleOrName(handle)) {
    return RestResponseUtil.createResponse400();
  }
  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.
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public ResponseEntity queryEntity(@PathVariable String handle,HttpServletRequest request,HttpServletResponse response){
  LOGGER.debug("String_Node_Str" + handle);
  handle=queryParser.getLastSplitInURI(request);
  handle=StringUtils.trim(handle);
  if (!StringUtil.isValidEntityHandleOrName(handle)) {
    return RestResponseUtil.createResponse400();
  }
  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: 37375
Project: 37375
Buggy source:
/** 
 * <pre> query autnum. URI:/autnum/{autnum} First query autnum in local registry, if not exist, then query  for redirect. This service is under permission control, @see AccessControlManager. This service is under policy control, @see PolicyControlService. <pre>
 * @param autnum an AS Plain autonomous system number [RFC5396].
 * @param request HttpServletRequest.
 * @param response HttpServletResponse
 * @return JSON formated result,with HTTP code.
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public ResponseEntity queryAs(@PathVariable String autnum,HttpServletRequest request,HttpServletResponse response){
  LOGGER.debug("String_Node_Str" + autnum);
  if (!AutnumValidator.isValidAutnum(autnum)) {
    return RestResponseUtil.createResponse400();
  }
  QueryParam queryParam=queryParser.parseQueryParam(autnum);
  Autnum result=queryService.queryAutnum(queryParam);
  if (null != result) {
    if (!accessControlManager.hasPermission(result)) {
      return RestResponseUtil.createResponse403();
    }
    responseDecorator.decorateResponse(result);
    return RestResponseUtil.createResponse200(result);
  }
  LOGGER.debug("String_Node_Str",queryParam);
  RedirectResponse redirect=redirectService.queryAutnum(queryParam);
  if (redirectService.isValidRedirect(redirect)) {
    String redirectUrl=StringUtil.generateEncodedRedirectURL(autnum,SERVICE_URI_AS_Q,redirect.getUrl());
    return RestResponseUtil.createResponse301(redirectUrl);
  }
  return RestResponseUtil.createResponse404();
}

Fixed version (ground truth):
/** 
 * <pre> query autnum. URI:/autnum/{autnum} First query autnum in local registry, if not exist, then query  for redirect. This service is under permission control, @see AccessControlManager. This service is under policy control, @see PolicyControlService. <pre>
 * @param autnum an AS Plain autonomous system number [RFC5396].
 * @param request HttpServletRequest.
 * @param response HttpServletResponse
 * @return JSON formated result,with HTTP code.
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public ResponseEntity queryAs(@PathVariable String autnum,HttpServletRequest request,HttpServletResponse response){
  LOGGER.debug("String_Node_Str" + autnum);
  autnum=queryParser.getLastSplitInURI(request);
  if (!AutnumValidator.isValidAutnum(autnum)) {
    return RestResponseUtil.createResponse400();
  }
  QueryParam queryParam=queryParser.parseQueryParam(autnum);
  Autnum result=queryService.queryAutnum(queryParam);
  if (null != result) {
    if (!accessControlManager.hasPermission(result)) {
      return RestResponseUtil.createResponse403();
    }
    responseDecorator.decorateResponse(result);
    return RestResponseUtil.createResponse200(result);
  }
  LOGGER.debug("String_Node_Str",queryParam);
  RedirectResponse redirect=redirectService.queryAutnum(queryParam);
  if (redirectService.isValidRedirect(redirect)) {
    String redirectUrl=StringUtil.generateEncodedRedirectURL(autnum,SERVICE_URI_AS_Q,redirect.getUrl());
    return RestResponseUtil.createResponse301(redirectUrl);
  }
  return RestResponseUtil.createResponse404();
}
Program: 37378
Project: 37378
Buggy source:
/** 
 * set error message service.
 * @param errorMessageService error message service to set.
 */
@Autowired public void setErrorMessageService(ErrorMessageService errorMessageService){
  RestResponseUtil.errorMessageService=errorMessageService;
}

Fixed version (ground truth):
/** 
 * set error message service.
 * @param errorMsgService error message service to set.
 */
@Autowired public void setErrorMessageService(ErrorMessageService errorMsgService){
  RestResponseUtil.errorMessageService=errorMsgService;
}
Program: 37379
Project: 37379
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
 * @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){
  ipAddr=queryParser.getLastSecondSplitInURI(request);
  mask=queryParser.getLastSplitInURI(request);
  return queryIpAddress(ipAddr,mask,ipAddr + "String_Node_Str" + mask);
}
Program: 37380
Project: 37380
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
 * @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){
  ipAddr=queryParser.getLastSplitInURI(request);
  return queryIpAddress(ipAddr,"String_Node_Str",ipAddr);
}
Program: 37383
Project: 37383
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){
  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: 37385
Project: 37385
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){
  LOGGER.debug("String_Node_Str" + handle);
  handle=queryParser.getLastSplitInURI(request);
  handle=StringUtils.trim(handle);
  if (!StringUtil.isValidEntityHandleOrName(handle)) {
    return RestResponseUtil.createResponse400();
  }
  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.
 */
@RequestMapping(value="String_Node_Str",method=RequestMethod.GET) public ResponseEntity queryEntity(@PathVariable String handle,HttpServletRequest request,HttpServletResponse response){
  LOGGER.debug("String_Node_Str" + handle);
  handle=queryParser.getLastSplitInURI(request);
  handle=StringUtils.trim(handle);
  if (!StringUtil.isValidEntityHandleOrName(handle)) {
    return RestResponseUtil.createResponse400();
  }
  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: 37389
Project: 37389
Buggy source:
/** 
 * decoded url use UTF-8.
 * @param str string.
 * @return String decoded string.
 */
private 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){
  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;
}
Program: 37390
Project: 37390
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){
  String path=request.getRequestURI();
  String result=StringUtils.substringAfterLast(path,"String_Node_Str");
  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.
 */
public String getLastSplitInURI(HttpServletRequest request){
  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: 37391
Project: 37391
Buggy source:
@Override public ModelType getObjectType(){
  return ModelType.HELP;
}

Fixed version (ground truth):
/** 
 * @return objectType: HELP.
 */
@Override public ModelType getObjectType(){
  return ModelType.HELP;
}
Program: 37392
Project: 37392
Buggy source:
@Override public String toString(){
  return new ToStringBuilder(this).append("String_Node_Str").toString();
}

Fixed version (ground truth):
/** 
 * @return String.
 */
@Override public String toString(){
  return new ToStringBuilder(this).append("String_Node_Str").toString();
}
Program: 37393
Project: 37393
Buggy source:
/** 
 * trucate the string.
 * @param strMethod set the method string trucated.
 * @return string of method.
 */
private String trucateStringFromMethod(String strMethod){
  LOGGER.info("String_Node_Str" + strMethod);
  final String strSet="String_Node_Str";
  final String strGet="String_Node_Str";
  final String strIs="String_Node_Str";
  if (!strMethod.startsWith(strSet) && !strMethod.startsWith(strGet) && !strMethod.startsWith(strIs)) {
    LOGGER.info("String_Node_Str");
    return null;
  }
  int posAfterSet=strSet.length();
  if (strMethod.startsWith(strIs)) {
    posAfterSet=strIs.length();
  }
  String strMethodField=strMethod.substring(posAfterSet);
  String strFieldFirstLetter=strMethodField.substring(0,1);
  String strReplace=StringUtils.lowerCase(strFieldFirstLetter);
  strMethodField=strMethodField.replaceFirst(strFieldFirstLetter,strReplace);
  LOGGER.info("String_Node_Str" + strMethodField);
  return strMethodField;
}

Fixed version (ground truth):
/** 
 * trucate the string.
 * @param strMethod set the method string trucated.
 * @return string of method.
 */
private String trucateStringFromMethod(String strMethod){
  final String strSet="String_Node_Str";
  final String strGet="String_Node_Str";
  final String strIs="String_Node_Str";
  if (!strMethod.startsWith(strSet) && !strMethod.startsWith(strGet) && !strMethod.startsWith(strIs)) {
    return null;
  }
  int posAfterSet=strSet.length();
  if (strMethod.startsWith(strIs)) {
    posAfterSet=strIs.length();
  }
  String strMethodField=strMethod.substring(posAfterSet);
  String strFieldFirstLetter=strMethodField.substring(0,1);
  String strReplace=StringUtils.lowerCase(strFieldFirstLetter);
  strMethodField=strMethodField.replaceFirst(strFieldFirstLetter,strReplace);
  return strMethodField;
}
Program: 37395
Project: 37395
Buggy source:
/** 
 * set the inner object policy.
 * @param object object to set.
 */
private void setInnerListPolicy(final Object object){
  LOGGER.info("String_Node_Str" + object);
  List<?> listObjs=(List<?>)object;
  if (listObjs != null) {
    for (int iObj=0; iObj < listObjs.size(); ++iObj) {
      applyPolicy(listObjs.get(iObj));
    }
  }
}

Fixed version (ground truth):
/** 
 * set the inner object policy.
 * @param object object to set.
 */
private void setInnerListPolicy(final Object object){
  List<?> listObjs=(List<?>)object;
  if (listObjs != null) {
    for (int iObj=0; iObj < listObjs.size(); ++iObj) {
      applyPolicy(listObjs.get(iObj));
    }
  }
}
Program: 37396
Project: 37396
Buggy source:
/** 
 * get Model String.
 * @param objModel the model of object.
 * @return string of object type.
 */
private String getModelString(final Object objModel){
  LOGGER.info("String_Node_Str" + objModel);
  String strObjType=null;
  ModelType modelType=((BaseModel)objModel).getObjectType();
  strObjType=modelType.getName();
  if (strObjType == "String_Node_Str") {
    LOGGER.info("String_Node_Str");
    return null;
  }
  LOGGER.info("String_Node_Str" + strObjType);
  return strObjType;
}

Fixed version (ground truth):
/** 
 * get Model String.
 * @param objModel the model of object.
 * @return string of object type.
 */
private String getModelString(final Object objModel){
  String strObjType=null;
  ModelType modelType=((BaseModel)objModel).getObjectType();
  strObjType=modelType.getName();
  if (strObjType == "String_Node_Str") {
    LOGGER.info("String_Node_Str");
    return null;
  }
  return strObjType;
}
Program: 37397
Project: 37397
Buggy source:
/** 
 * test search exist truncated nameserver.
 * @throws Exception throw a exception.
 */
@Test @DatabaseTearDown("String_Node_Str") @DatabaseSetup("String_Node_Str") public void testSearchTruncatedNameserver() throws Exception {
  String nsHead="String_Node_Str";
  String ipHead="String_Node_Str";
  String nsName=nsHead + "String_Node_Str";
  String nsIpV6=ipHead + "String_Node_Str";
  String ipHighCase=ipHead + "String_Node_Str";
  searchTruncatedNS(nsName);
  searchTruncatedNS(nsIpV6);
  searchTruncatedNS(ipHighCase);
}

Fixed version (ground truth):
/** 
 * test search exist truncated nameserver.
 * @throws Exception throw a exception.
 */
@Test @DatabaseTearDown("String_Node_Str") @DatabaseSetup("String_Node_Str") public void testSearchTruncatedNameserver() throws Exception {
  RestResponseUtil.initErrorMessages();
  String nsHead="String_Node_Str";
  String ipHead="String_Node_Str";
  String nsName=nsHead + "String_Node_Str";
  String nsIpV6=ipHead + "String_Node_Str";
  String ipHighCase=ipHead + "String_Node_Str";
  searchTruncatedNS(nsName);
  searchTruncatedNS(nsIpV6);
  searchTruncatedNS(ipHighCase);
}
Program: 37398
Project: 37398
Buggy source:
/** 
 * test search exist nameserver.
 * @throws Exception throw a exception.
 */
@Test @DatabaseTearDown("String_Node_Str") @DatabaseSetup("String_Node_Str") public void testSearchExistNameserver() throws Exception {
  String nsNameCn="String_Node_Str";
  String ipHead="String_Node_Str";
  String nsNameIpV4=ipHead + "String_Node_Str";
  String nsNameIpV6Full=ipHead + "String_Node_Str";
  String nsNameIpV6Omit=ipHead + "String_Node_Str";
  String nsIpV4=ipHead + "String_Node_Str";
  String nsIpZero=ipHead + "String_Node_Str";
  String nsIpV4V6=ipHead + "String_Node_Str";
  String nsBoth1=nsNameCn + "String_Node_Str" + ipHead+ "String_Node_Str";
  String nsBoth2=ipHead + "String_Node_Str" + "String_Node_Str"+ nsNameCn;
  String nsComplex="String_Node_Str";
  searchByObject(nsNameCn);
  searchByObject(nsNameIpV4);
  searchByObject(nsNameIpV6Full);
  searchByObject(nsNameIpV6Omit);
  searchByObject(nsIpV4);
  searchByObject(nsIpZero);
  searchByObject(nsIpV4V6);
  searchByObject(nsBoth1);
  searchByObject(nsBoth2);
  searchByObject(nsComplex);
}

Fixed version (ground truth):
/** 
 * test search exist nameserver.
 * @throws Exception throw a exception.
 */
@Test @DatabaseTearDown("String_Node_Str") @DatabaseSetup("String_Node_Str") public void testSearchExistNameserver() throws Exception {
  RestResponseUtil.initErrorMessages();
  String nsNameCn="String_Node_Str";
  String ipHead="String_Node_Str";
  String nsNameIpV4=ipHead + "String_Node_Str";
  String nsNameIpV6Full=ipHead + "String_Node_Str";
  String nsNameIpV6Omit=ipHead + "String_Node_Str";
  String nsIpV4=ipHead + "String_Node_Str";
  String nsIpZero=ipHead + "String_Node_Str";
  String nsIpV4V6=ipHead + "String_Node_Str";
  String nsBoth1=nsNameCn + "String_Node_Str" + ipHead+ "String_Node_Str";
  String nsBoth2=ipHead + "String_Node_Str" + "String_Node_Str"+ nsNameCn;
  String nsComplex="String_Node_Str";
  searchByObject(nsNameCn);
  searchByObject(nsNameIpV4);
  searchByObject(nsNameIpV6Full);
  searchByObject(nsNameIpV6Omit);
  searchByObject(nsIpV4);
  searchByObject(nsIpZero);
  searchByObject(nsIpV4V6);
  searchByObject(nsBoth1);
  searchByObject(nsBoth2);
  searchByObject(nsComplex);
}
Program: 37399
Project: 37399
Buggy source:
/** 
 * test query exist nameserver.
 * @throws Exception exception.
 */
@Test @DatabaseTearDown("String_Node_Str") @DatabaseSetup("String_Node_Str") public void testQueryExistNameserver() throws Exception {
  RestResponseUtil.initConformanceService();
  String nsName="String_Node_Str";
  String nsNameWithPrefixBlank="String_Node_Str";
  String nsChineseLDH="String_Node_Str";
  String nsLangEn="String_Node_Str";
  String nsLangZh="String_Node_Str";
  String nsNameWithUpperCase="String_Node_Str";
  commonQueryExistNS(nsName,nsLangEn);
  commonQueryExistNS(nsNameWithPrefixBlank,nsLangEn);
  commonQueryExistNS(nsNameWithUpperCase,nsLangEn);
  nsChineseLDH=StringUtil.urlEncode(nsChineseLDH);
  commonQueryExistNS(nsChineseLDH,nsLangZh);
}

Fixed version (ground truth):
/** 
 * test query exist nameserver.
 * @throws Exception exception.
 */
@Test @DatabaseTearDown("String_Node_Str") @DatabaseSetup("String_Node_Str") public void testQueryExistNameserver() throws Exception {
  RestResponseUtil.initErrorMessages();
  RestResponseUtil.initConformanceService();
  String nsName="String_Node_Str";
  String nsNameWithPrefixBlank="String_Node_Str";
  String nsChineseLDH="String_Node_Str";
  String nsLangEn="String_Node_Str";
  String nsLangZh="String_Node_Str";
  String nsNameWithUpperCase="String_Node_Str";
  commonQueryExistNS(nsName,nsLangEn);
  commonQueryExistNS(nsNameWithPrefixBlank,nsLangEn);
  commonQueryExistNS(nsNameWithUpperCase,nsLangEn);
  nsChineseLDH=StringUtil.urlEncode(nsChineseLDH);
  commonQueryExistNS(nsChineseLDH,nsLangZh);
}
Program: 37400
Project: 37400
Buggy source:
/** 
 * test query exist nameserver.
 * @throws Exception
 */
@Test @DatabaseTearDown("String_Node_Str") public void testQueryInvalidNS() throws Exception {
  commonQueryInvalidNS("String_Node_Str");
  commonQueryInvalidNS("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * test query exist nameserver.
 * @throws Exception
 */
@Test @DatabaseTearDown("String_Node_Str") public void testQueryInvalidNS() throws Exception {
  RestResponseUtil.initErrorMessages();
  commonQueryInvalidNS("String_Node_Str");
  commonQueryInvalidNS("String_Node_Str");
}
Program: 37401
Project: 37401
Buggy source:
/** 
 * test query exist domain.
 * @throws Exception
 */
@Test public void testQueryNonExistNS() throws Exception {
  commonQueryNonExistNS("String_Node_Str");
  commonQueryNonExistNS("String_Node_Str");
  commonQueryNonExistNS("String_Node_Str");
  commonQueryNonExistNS("String_Node_Str");
  commonQueryNonExistNS("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * test query exist domain.
 * @throws Exception
 */
@Test public void testQueryNonExistNS() throws Exception {
  RestResponseUtil.initErrorMessages();
  commonQueryNonExistNS("String_Node_Str");
  commonQueryNonExistNS("String_Node_Str");
  commonQueryNonExistNS("String_Node_Str");
  commonQueryNonExistNS("String_Node_Str");
  commonQueryNonExistNS("String_Node_Str");
}
Program: 37402
Project: 37402
Buggy source:
/** 
 * test query non exist.
 */
@Test @DatabaseTearDown("String_Node_Str") @DatabaseSetup("String_Node_Str") public void testQueryNonExist(){
  Long nonExistAutnumId=10000L;
  List<Variants> variants=variantsQueryDao.queryAsInnerObjects(nonExistAutnumId,ModelType.AUTNUM);
  assertNotNull(variants);
  assertEquals(variants.size(),0);
}

Fixed version (ground truth):
/** 
 * test query non exist.
 */
@Test @DatabaseTearDown("String_Node_Str") public void testQueryNonExist(){
  Long nonExistAutnumId=10000L;
  List<Variants> variants=variantsQueryDao.queryAsInnerObjects(nonExistAutnumId,ModelType.DOMAIN);
  assertNotNull(variants);
  assertEquals(variants.size(),0);
  variants=variantsQueryDao.queryAsInnerObjects(nonExistAutnumId,ModelType.AUTNUM);
  assertNull(variants);
}
Program: 37405
Project: 37405
Buggy source:
/** 
 * test query non exist.
 */
@Test @DatabaseTearDown("String_Node_Str") @DatabaseSetup("String_Node_Str") public void testQueryNonExist(){
  Long nonExistAutnumId=10000L;
  List<Variants> variants=variantsQueryDao.queryAsInnerObjects(nonExistAutnumId,ModelType.AUTNUM);
  assertNotNull(variants);
  assertEquals(variants.size(),0);
}

Fixed version (ground truth):
/** 
 * test query non exist.
 */
@Test @DatabaseTearDown("String_Node_Str") public void testQueryNonExist(){
  Long nonExistAutnumId=10000L;
  List<Variants> variants=variantsQueryDao.queryAsInnerObjects(nonExistAutnumId,ModelType.DOMAIN);
  assertNotNull(variants);
  assertEquals(variants.size(),0);
  variants=variantsQueryDao.queryAsInnerObjects(nonExistAutnumId,ModelType.AUTNUM);
  assertNull(variants);
}
Program: 37406
Project: 37406
Buggy source:
/** 
 * handle exception.
 */
@Override protected ModelAndView doResolveException(HttpServletRequest request,HttpServletResponse response,Object handler,Exception ex){
  ResponseEntity<ErrorMessage> responseEntity=null;
  LOGGER.error("String_Node_Str",ex);
  if (ex instanceof InvalidMediaTypeException) {
    responseEntity=RestResponseUtil.createResponse415();
  }
  responseEntity=RestResponseUtil.createResponse500();
  try {
    FilterHelper.writeResponse(responseEntity,response);
  }
 catch (  IOException e) {
    LOGGER.error(e.getMessage());
  }
  return new ModelAndView();
}

Fixed version (ground truth):
/** 
 * handle exception.
 */
@Override protected ModelAndView doResolveException(HttpServletRequest request,HttpServletResponse response,Object handler,Exception ex){
  ResponseEntity<ErrorMessage> responseEntity=null;
  LOGGER.error("String_Node_Str",ex);
  if (ex instanceof InvalidMediaTypeException) {
    responseEntity=RestResponseUtil.createResponse415();
  }
 else {
    responseEntity=RestResponseUtil.createResponse500();
  }
  try {
    FilterHelper.writeResponse(responseEntity,response);
  }
 catch (  IOException e) {
    LOGGER.error(e.getMessage());
  }
  return new ModelAndView();
}
Program: 37410
Project: 37410
Buggy source:
/** 
 * query nameserver by nameserver name.
 * @param nameserverName represents information regarding DNS name servers used in both forward and reverse DNS. RIRs and some DNRs register or expose nameserver information as an attribute of a domain name, while other DNRs model nameservers as "first class objects".
 * @return JSON formatted result,with HTTP code.
 */
@RequestMapping(value={"String_Node_Str"},method=RequestMethod.GET) @ResponseBody public ResponseEntity queryNameserver(@PathVariable String nameserverName){
  String decodeNS=nameserverName;
  String punyNSName=decodeNS;
  try {
    decodeNS=DomainUtil.decodeAndReplaceAsciiToLowercase(nameserverName);
    punyNSName=DomainUtil.geneDomainPunyName(decodeNS);
  }
 catch (  Exception e) {
    return RestResponseUtil.createResponse400();
  }
  if (!DomainUtil.validateDomainNameIsValidIdna(decodeNS)) {
    return RestResponseUtil.createResponse400();
  }
  decodeNS=StringUtil.getNormalization(decodeNS);
  LOGGER.debug("String_Node_Str",decodeNS);
  decodeNS=DomainUtil.deleteLastPoint(decodeNS);
  decodeNS=StringUtils.lowerCase(decodeNS);
  QueryParam queryParam=queryParser.parseNameserverQueryParam(decodeNS,punyNSName);
  if (queryService.tldInThisRegistry(queryParam)) {
    return queryNsInThisRegistry(queryParam);
  }
  return queryRedirectDomainOrNs(queryParam,nameserverName);
}

Fixed version (ground truth):
/** 
 * query nameserver by nameserver name.
 * @param nameserverName represents information regarding DNS name servers used in both forward and reverse DNS. RIRs and some DNRs register or expose nameserver information as an attribute of a domain name, while other DNRs model nameservers as "first class objects".
 * @return JSON formatted result,with HTTP code.
 */
@RequestMapping(value={"String_Node_Str"},method=RequestMethod.GET) @ResponseBody public ResponseEntity queryNameserver(@PathVariable String nameserverName){
  String decodeNS=nameserverName;
  String punyNSName=decodeNS;
  try {
    decodeNS=DomainUtil.decodeAndReplaceAsciiToLowercase(nameserverName);
    punyNSName=DomainUtil.geneDomainPunyName(decodeNS);
  }
 catch (  Exception e) {
    return RestResponseUtil.createResponse400();
  }
  decodeNS=StringUtil.getNormalization(decodeNS);
  if (!DomainUtil.validateDomainNameIsValidIdna(decodeNS)) {
    return RestResponseUtil.createResponse400();
  }
  LOGGER.debug("String_Node_Str",decodeNS);
  decodeNS=DomainUtil.deleteLastPoint(decodeNS);
  decodeNS=StringUtils.lowerCase(decodeNS);
  QueryParam queryParam=queryParser.parseNameserverQueryParam(decodeNS,punyNSName);
  if (queryService.tldInThisRegistry(queryParam)) {
    return queryNsInThisRegistry(queryParam);
  }
  return queryRedirectDomainOrNs(queryParam,nameserverName);
}
Program: 37411
Project: 37411
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 queryDomain(@PathVariable String domainName){
  String decodeDomain=domainName;
  String punyDomainName=decodeDomain;
  try {
    decodeDomain=DomainUtil.decodeAndReplaceAsciiToLowercase(domainName);
    punyDomainName=DomainUtil.geneDomainPunyName(decodeDomain);
  }
 catch (  Exception e) {
    return RestResponseUtil.createResponse400();
  }
  if (!DomainUtil.validateDomainNameIsValidIdna(decodeDomain)) {
    return RestResponseUtil.createResponse400();
  }
  decodeDomain=StringUtil.getNormalization(decodeDomain);
  LOGGER.debug("String_Node_Str",decodeDomain);
  decodeDomain=DomainUtil.deleteLastPoint(decodeDomain);
  decodeDomain=StringUtils.lowerCase(decodeDomain);
  QueryParam queryParam=queryParser.parseDomainQueryParam(decodeDomain,punyDomainName);
  if (queryService.tldInThisRegistry(queryParam)) {
    return queryDomainInThisRegistry(queryParam);
  }
  return queryRedirectDomainOrNs(queryParam,domainName);
}

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 queryDomain(@PathVariable String domainName){
  String decodeDomain=domainName;
  String punyDomainName=decodeDomain;
  try {
    decodeDomain=DomainUtil.decodeAndReplaceAsciiToLowercase(domainName);
    punyDomainName=DomainUtil.geneDomainPunyName(decodeDomain);
  }
 catch (  Exception e) {
    return RestResponseUtil.createResponse400();
  }
  decodeDomain=StringUtil.getNormalization(decodeDomain);
  if (!DomainUtil.validateDomainNameIsValidIdna(decodeDomain)) {
    return RestResponseUtil.createResponse400();
  }
  LOGGER.debug("String_Node_Str",decodeDomain);
  decodeDomain=DomainUtil.deleteLastPoint(decodeDomain);
  decodeDomain=StringUtils.lowerCase(decodeDomain);
  QueryParam queryParam=queryParser.parseDomainQueryParam(decodeDomain,punyDomainName);
  if (queryService.tldInThisRegistry(queryParam)) {
    return queryDomainInThisRegistry(queryParam);
  }
  return queryRedirectDomainOrNs(queryParam,domainName);
}
Program: 37412
Project: 37412
Buggy source:
/** 
 * query domain (RIR or DNR).
 * @param queryParam QueryParam.
 * @return domain .
 */
@Override public Domain query(QueryParam queryParam){
  DomainQueryParam domainQueryParam=(DomainQueryParam)queryParam;
  if (domainQueryParam.isRirDomain()) {
    Domain domain=queryArpaWithoutInnerObjects(queryParam);
    queryAndSetInnerObjects(domain);
    queryAndSetInnerNetwork(domain);
    return domain;
  }
 else {
    Domain domain=queryDomainWithoutInnerObjects(queryParam);
    queryAndSetInnerObjects(domain);
    return domain;
  }
}

Fixed version (ground truth):
/** 
 * query domain (RIR or DNR).
 * @param queryParam QueryParam.
 * @return domain .
 */
@Override public Domain query(QueryParam queryParam){
  DomainQueryParam domainQueryParam=(DomainQueryParam)queryParam;
  if (domainQueryParam.isRirDomain()) {
    Domain domain=queryArpaWithoutInnerObjects(queryParam);
    queryAndSetInnerObjects(domain);
    queryAndSetInnerNetwork(domain);
    return domain;
  }
 else {
    Domain domain=queryDomainWithoutInnerObjects(queryParam);
    queryAndSetInnerObjects(domain);
    queryAndSetVariants(domain);
    return domain;
  }
}
Program: 37413
Project: 37413
Buggy source:
/** 
 * query inner objects of domain,and set fill them to domain.
 * @param domains domain list.
 */
private void queryAndSetInnerObjectsWithoutNotice(List<Domain> domains){
  if (null == domains) {
    return;
  }
  for (  Domain domain : domains) {
    queryAndSetInnerObjects(domain);
  }
}

Fixed version (ground truth):
/** 
 * query inner objects of domain,and set fill them to domain.
 * @param domains domain list.
 */
private void queryAndSetInnerObjectsWithoutNotice(List<Domain> domains){
  if (null == domains) {
    return;
  }
  for (  Domain domain : domains) {
    queryAndSetInnerObjects(domain);
    queryAndSetVariants(domain);
  }
}
Program: 37414
Project: 37414
Buggy source:
/** 
 * query inner objects of domain,and set fill them to domain.
 * @param domain inner objects will be filled.
 */
private void queryAndSetInnerObjects(Domain domain){
  if (null == domain) {
    return;
  }
  Long domainId=domain.getId();
  ModelType type=domain.getDomainType();
  List<Variants> variants=variantsQueryDao.queryAsInnerObjects(domainId,type);
  domain.setVariants(variants);
  List<Nameserver> nameServers=nameserverQueryDao.queryAsInnerObjects(domainId,type);
  domain.setNameServers(nameServers);
  List<SecureDns> secureDnsList=secureDnsQueryDao.queryAsInnerObjects(domainId,type);
  if (null != secureDnsList && secureDnsList.size() > 0) {
    domain.setSecureDns(secureDnsList.get(0));
  }
  List<PublicId> publicIds=publicIdQueryDao.queryAsInnerObjects(domainId,type);
  domain.setPublicIds(publicIds);
  List<Remark> remarks=remarkQueryDao.queryAsInnerObjects(domainId,type);
  domain.setRemarks(remarks);
  List<Link> links=linkQueryDao.queryAsInnerObjects(domainId,type);
  domain.setLinks(links);
  List<Event> events=eventQueryDao.queryAsInnerObjects(domainId,type);
  domain.setEvents(events);
  List<Entity> entities=entityQueryDao.queryAsInnerObjects(domainId,type);
  domain.setEntities(entities);
}

Fixed version (ground truth):
/** 
 * query inner objects of domain,and set fill them to domain.
 * @param domain inner objects will be filled.
 */
private void queryAndSetInnerObjects(Domain domain){
  if (null == domain) {
    return;
  }
  Long domainId=domain.getId();
  ModelType type=domain.getDomainType();
  List<Nameserver> nameServers=nameserverQueryDao.queryAsInnerObjects(domainId,type);
  domain.setNameServers(nameServers);
  List<SecureDns> secureDnsList=secureDnsQueryDao.queryAsInnerObjects(domainId,type);
  if (null != secureDnsList && secureDnsList.size() > 0) {
    domain.setSecureDns(secureDnsList.get(0));
  }
  List<PublicId> publicIds=publicIdQueryDao.queryAsInnerObjects(domainId,type);
  domain.setPublicIds(publicIds);
  List<Remark> remarks=remarkQueryDao.queryAsInnerObjects(domainId,type);
  domain.setRemarks(remarks);
  List<Link> links=linkQueryDao.queryAsInnerObjects(domainId,type);
  domain.setLinks(links);
  List<Event> events=eventQueryDao.queryAsInnerObjects(domainId,type);
  domain.setEvents(events);
  List<Entity> entities=entityQueryDao.queryAsInnerObjects(domainId,type);
  domain.setEntities(entities);
}
Program: 37415
Project: 37415
Buggy source:
@Override public List<Variants> queryAsInnerObjects(final Long outerObjectId,final ModelType outerModelType){
  List<Variant> variantList=queryWithoutInnerObjects(outerObjectId);
  List<Variants> result=geneVariantsList(variantList);
  return result;
}

Fixed version (ground truth):
@Override public List<Variants> queryAsInnerObjects(final Long outerObjectId,final ModelType outerModelType){
  if (!ModelType.DOMAIN.equals(outerModelType)) {
    return null;
  }
  List<Variant> variantList=queryWithoutInnerObjects(outerObjectId);
  List<Variants> result=geneVariantsList(variantList);
  return result;
}
Program: 37416
Project: 37416
Buggy source:
/** 
 * main method.
 * @param args args.
 */
public static void main(String[] args){
  LOGGER.info("String_Node_Str");
  ApplicationContext ctx=new ClassPathXmlApplicationContext("String_Node_Str");
  InitDao initDao=(InitDao)ctx.getBean("String_Node_Str");
  initDao.initSchema();
  initDao.initData();
  LOGGER.info("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * main method.
 * @param args args.
 */
public static void main(String[] args){
  LOGGER.info("String_Node_Str");
  LOGGER.info("String_Node_Str",args);
  if (null == args || args.length < 1 || StringUtils.isBlank(args[0])) {
    LOGGER.info("String_Node_Str");
    printUsage();
    return;
  }
  String arg=args[0];
  if (!(isInitSchemaCmd(arg) || isInitDataCmd(arg))) {
    printUsage();
    return;
  }
  ApplicationContext ctx=new ClassPathXmlApplicationContext("String_Node_Str");
  InitDao initDao=(InitDao)ctx.getBean("String_Node_Str");
  if (isInitSchemaCmd(arg)) {
    initDao.initSchema();
  }
  if (isInitDataCmd(arg)) {
    initDao.initData();
  }
  LOGGER.info("String_Node_Str");
}
Program: 37418
Project: 37418
Buggy source:
/** 
 * initData.
 */
public void initData(){
  LOGGER.info("String_Node_Str");
  LOGGER.info("String_Node_Str",SQL_RESOURCE_DATA_PATH,databaseName);
  initContext.executeSqlScript(jdbcTemplate,SQL_RESOURCE_DATA_PATH,databaseName,false);
  LOGGER.info("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * initData.
 * @param arg
 */
public void initData(){
  LOGGER.info("String_Node_Str");
  LOGGER.info("String_Node_Str",SQL_RESOURCE_DATA_PATH,databaseName);
  initContext.executeSqlScript(jdbcTemplate,SQL_RESOURCE_DATA_PATH,databaseName,false);
  LOGGER.info("String_Node_Str");
}