nus-yam/ex-repair huggingface dataset:
Program: 37218
Project: 37218
Buggy source:
@Override public void convertParam() throws Exception {
  String decodeDomain=getQ();
  decodeDomain=StringUtil.foldCaseAndNormalization(decodeDomain);
  decodeDomain=DomainUtil.deleteLastPoint(decodeDomain);
  setQ(decodeDomain);
  setPunyName(decodeDomain);
}

Fixed version (ground truth):
@Override public void convertParam() throws Exception {
  String decodeDomain=getQ();
  decodeDomain=StringUtil.foldCase(decodeDomain);
  decodeDomain=DomainUtil.deleteLastPoint(decodeDomain);
  setQ(decodeDomain);
  setPunyName(decodeDomain);
}
Program: 37219
Project: 37219
Buggy source:
@Override public void fillParam() throws Exception {
  String domainName=getParameter(getRequest(),DomainSearchType.NSLDHNAME.getName());
  String decodeDomain=domainName;
  decodeDomain=DomainUtil.iso8859Decode(domainName);
  decodeDomain=DomainUtil.urlDecodeAndReplaceAsciiToLowercase(decodeDomain);
  setQ(decodeDomain);
  setPunyName(decodeDomain);
}

Fixed version (ground truth):
@Override public void fillParam() throws Exception {
  String domainName=getParameter(getRequest(),DomainSearchType.NSLDHNAME.getName());
  String decodeDomain=domainName;
  decodeDomain=DomainUtil.iso8859Decode(domainName);
  decodeDomain=DomainUtil.urlDecodeAndReplaceAsciiToLowercase(decodeDomain);
  decodeDomain=StringUtil.getNormalization(decodeDomain);
  setQ(decodeDomain);
  setPunyName(decodeDomain);
}
Program: 37220
Project: 37220
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.
 * @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(QueryParamHelper.buildQueryParam("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(new HelpQueryParam("String_Node_Str"));
  if (null != result) {
    responseDecorator.decorateResponseForHelp(result);
    return RestResponseUtil.createResponse200(result);
  }
  return RestResponseUtil.createResponse404();
}
Program: 37221
Project: 37221
Buggy source:
@Override public boolean supports(Class<?> clazz){
  return clazz.equals(DomainSearchByDomainNameParam.class) || clazz.equals(DomainSearchByNsNameParam.class) || clazz.equals(NameserverSearchByNameParam.class);
}

Fixed version (ground truth):
@Override public boolean supports(Class<?> clazz){
  return clazz.equals(DomainSearchByDomainNameParam.class) || clazz.equals(NameserverSearchByNameParam.class);
}
Program: 37222
Project: 37222
Buggy source:
@Override public boolean support(QueryParam queryParam){
  return queryParam instanceof DomainSearchByNsNameParam;
}

Fixed version (ground truth):
@Override public boolean support(QueryParam queryParam){
  return queryParam instanceof DomainSearchByNsLdhNameParam;
}
Program: 37223
Project: 37223
Buggy source:
/** 
 * encoded url with UTF-8 encoding. This will escape protocol(eg:'http://') and '/'.
 * @param str string
 * @return String encoded string
 */
public static String urlEncode(String str){
  if (StringUtils.isBlank(str)) {
    return str;
  }
  String result=str;
  try {
    UriComponents uriComponents=UriComponentsBuilder.fromHttpUrl(str).build();
    return uriComponents.encode().toUriString();
  }
 catch (  Exception e) {
    LOGGER.error(e.getMessage());
  }
  return result;
}

Fixed version (ground truth):
/** 
 * encoded url with UTF-8 encoding. This will escape protocol(eg:'http://') and '/'.
 * @param str string
 * @return String encoded string
 */
public static String urlEncode(String str){
  if (StringUtils.isBlank(str)) {
    return str;
  }
  String result=str;
  try {
    UriComponents uriComponents=UriComponentsBuilder.fromUriString(str).build();
    return uriComponents.encode().toUriString();
  }
 catch (  Exception e) {
    LOGGER.error(e.getMessage());
  }
  return result;
}
Program: 37224
Project: 37224
Buggy source:
@Test public void test_encodedURL_with_space() throws UnsupportedEncodingException {
  String url="String_Node_Str";
  String param="String_Node_Str";
  String qEncode=URLEncoder.encode(param,"String_Node_Str");
  String result=StringUtil.urlEncode(url + param);
  assertEquals("String_Node_Str",result);
}

Fixed version (ground truth):
@Test public void test_encodedURL_with_space() throws UnsupportedEncodingException {
  String url="String_Node_Str";
  String param="String_Node_Str";
  String result=StringUtil.urlEncode(url + param);
  assertEquals("String_Node_Str",result);
}
Program: 37225
Project: 37225
Buggy source:
/** 
 * test decoded URL.
 * @throws UnsupportedEncodingException
 */
@Test public void testDecodedURLForIDN() throws UnsupportedEncodingException {
  String decodedURL="String_Node_Str";
  String encodeURL=URLEncoder.encode(decodedURL,"String_Node_Str");
  String expectURL="String_Node_Str";
  String result=StringUtil.urlEncode(decodedURL);
  assertEquals(expectURL,result);
}

Fixed version (ground truth):
/** 
 * test decoded URL.
 * @throws UnsupportedEncodingException
 */
@Test public void testDecodedURLForIDN() throws UnsupportedEncodingException {
  String decodedURL="String_Node_Str";
  String expectURL="String_Node_Str";
  String result=StringUtil.urlEncode(decodedURL);
  assertEquals(expectURL,result);
}
Program: 37226
Project: 37226
Buggy source:
@Override List<Redirect> generateRedirects(String key,List<String> registryUrls){
  List<Redirect> redirects=new ArrayList<Redirect>();
  if (!removeEmptyUrlsAndValidate(registryUrls)) {
    logger.error("String_Node_Str",key,registryUrls);
    return redirects;
  }
  NetworkRedirect networkRedirect=new NetworkRedirect(registryUrls);
  IpVersion ipVersion=IpUtil.getIpVersionOfNetwork(key);
  if (ipVersion.isNotValidIp()) {
    logger.error("String_Node_Str",key,registryUrls);
    return redirects;
  }
  QueryParam queryParam=queryParser.parseIpQueryParam(key,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 (!removeEmptyUrlsAndValidate(registryUrls)) {
    logger.error("String_Node_Str",key,registryUrls);
    return redirects;
  }
  NetworkRedirect networkRedirect=new NetworkRedirect(registryUrls);
  IpVersion ipVersion=IpUtil.getIpVersionOfNetwork(key);
  if (ipVersion.isNotValidIp()) {
    logger.error("String_Node_Str",key,registryUrls);
    return redirects;
  }
  try {
    QueryParam queryParam=queryParser.parseIpQueryParam(key,ipVersion);
    networkRedirect.setNetworkQueryParam((NetworkQueryParam)queryParam);
    redirects.add(networkRedirect);
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",key,registryUrls);
  }
  return redirects;
}
Program: 37227
Project: 37227
Buggy source:
/** 
 * validate domain search string represent a valid IDNA domain.
 * @param searchString domain or name server string.
 * @return true if is valid IDNA2008 domain, false if not.
 */
public static boolean validateSearchStringIsValidIdna(String searchString){
  if (StringUtils.isBlank(searchString)) {
    return false;
  }
  if (searchString.contains(BLANK_IN_DOMAIN)) {
    return false;
  }
  if (1 < StringUtils.countMatches(searchString,StringUtil.ASTERISK)) {
    return false;
  }
  String domainName=searchString.replace(StringUtil.ASTERISK,"String_Node_Str");
  if (validateDomainNameIsValidIdna(domainName)) {
    return true;
  }
  domainName=searchString.replace(StringUtil.ASTERISK,StringUtil.TLD_SPLITOR);
  if (validateDomainNameIsValidIdna(domainName)) {
    return true;
  }
  domainName=searchString.replace(StringUtil.ASTERISK,"String_Node_Str");
  if (validateDomainNameIsValidIdna(domainName)) {
    return true;
  }
  domainName=searchString.replace("String_Node_Str","String_Node_Str");
  if (validateDomainNameIsValidIdna(domainName)) {
    return true;
  }
  domainName=searchString.replace("String_Node_Str","String_Node_Str");
  if (validateDomainNameIsValidIdna(domainName)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * validate domain search string represent a valid IDNA domain.
 * @param searchString domain or name server string.
 * @return true if is valid IDNA2008 domain, false if not.
 */
public static boolean validateSearchStringIsValidIdna(String searchString){
  if (StringUtils.isBlank(searchString)) {
    return false;
  }
  if (searchString.contains(BLANK_IN_DOMAIN)) {
    return false;
  }
  if (1 < StringUtils.countMatches(searchString,StringUtil.ASTERISK)) {
    return false;
  }
  String domainName=searchString.replace(StringUtil.ASTERISK,"String_Node_Str");
  if (validateDomainNameIsValidIdna(domainName,true)) {
    return true;
  }
  domainName=searchString.replace(StringUtil.ASTERISK,StringUtil.TLD_SPLITOR);
  if (validateDomainNameIsValidIdna(domainName,true)) {
    return true;
  }
  domainName=searchString.replace(StringUtil.ASTERISK,"String_Node_Str");
  if (validateDomainNameIsValidIdna(domainName,true)) {
    return true;
  }
  domainName=searchString.replace("String_Node_Str","String_Node_Str");
  if (validateDomainNameIsValidIdna(domainName,true)) {
    return true;
  }
  domainName=searchString.replace("String_Node_Str","String_Node_Str");
  if (validateDomainNameIsValidIdna(domainName,true)) {
    return true;
  }
  return false;
}
Program: 37228
Project: 37228
Buggy source:
/** 
 * validate domain puny name is valid idna.
 * @param domainName domain name,ASCII char MUST in lower case.
 * @return true if is valid idna,false if not.
 */
public static boolean validateDomainNameIsValidIdna(String domainName){
  if (StringUtils.isBlank(domainName) || !domainName.contains("String_Node_Str")) {
    return false;
  }
  if (domainName.contains(BLANK_IN_DOMAIN)) {
    return false;
  }
  if (StringUtils.containsAny(domainName,DISALLOWED_DELIMITERS)) {
    return false;
  }
  if (!isArpaTldAndLabelIsValid(domainName)) {
    return false;
  }
  String punyDomainName=domainName;
  try {
    punyDomainName=geneDomainPunyName(domainName);
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str" + e.getMessage());
    return false;
  }
  String punyWithoutLastPoint=deleteLastPoint(punyDomainName);
  if (!validateDomainLength(punyWithoutLastPoint)) {
    return false;
  }
  String domainNameWithoutLastPoint=deleteLastPoint(domainName);
  String[] splits=StringUtils.split(punyWithoutLastPoint,"String_Node_Str");
  if (splits.length > MAX_DOMAIN_LABEL) {
    return false;
  }
  if (domainName.equals(punyDomainName) || domainNameWithoutLastPoint.equals(punyWithoutLastPoint)) {
    return isLdh(domainName);
  }
  domainName=deleteLastPoint(domainName);
  if (StringUtils.isBlank(domainName) || !domainName.contains("String_Node_Str")) {
    return false;
  }
  return IdnaUtil.isValidIdn(domainName);
}

Fixed version (ground truth):
/** 
 * validate domain puny name is valid idna.
 * @param domainName domain name,ASCII char MUST in lower case.
 * @param forSearch is for search.            
 * @return true if is valid idna,false if not.
 */
public static boolean validateDomainNameIsValidIdna(String domainName,boolean forSearch){
  if (StringUtils.isBlank(domainName) || !domainName.contains("String_Node_Str")) {
    return false;
  }
  if (domainName.contains(BLANK_IN_DOMAIN)) {
    return false;
  }
  if (StringUtils.containsAny(domainName,DISALLOWED_DELIMITERS)) {
    return false;
  }
  if (!forSearch && !isArpaTldAndLabelIsValid(domainName)) {
    return false;
  }
  String punyDomainName=domainName;
  try {
    punyDomainName=geneDomainPunyName(domainName);
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str" + e.getMessage());
    return false;
  }
  String punyWithoutLastPoint=deleteLastPoint(punyDomainName);
  if (!validateDomainLength(punyWithoutLastPoint)) {
    return false;
  }
  String domainNameWithoutLastPoint=deleteLastPoint(domainName);
  String[] splits=StringUtils.split(punyWithoutLastPoint,"String_Node_Str");
  if (splits.length > MAX_DOMAIN_LABEL) {
    return false;
  }
  if (domainName.equals(punyDomainName) || domainNameWithoutLastPoint.equals(punyWithoutLastPoint)) {
    return isLdh(domainName);
  }
  domainName=deleteLastPoint(domainName);
  if (StringUtils.isBlank(domainName) || !domainName.contains("String_Node_Str")) {
    return false;
  }
  return IdnaUtil.isValidIdn(domainName);
}
Program: 37229
Project: 37229
Buggy source:
/** 
 * check if IPv4 is valid.
 * @param cidr IP.
 * @return true if valid, false if not.
 */
public static boolean isValidIpV4(String cidr){
  if (StringUtils.isBlank(cidr)) {
    return false;
  }
  cidr=addDefaultMaskIfNotExist(cidr);
  try {
    new SubnetUtils(cidr);
  }
 catch (  Exception e) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * check if IPv4 is valid.
 * @param cidr IP.
 * @return true if valid, false if not.
 */
public static boolean isValidIpV4(String cidr){
  if (StringUtils.isBlank(cidr)) {
    return false;
  }
  if (hasPrefixZero(cidr)) {
    return false;
  }
  cidr=addDefaultMaskIfNotExist(cidr);
  try {
    new SubnetUtils(cidr);
  }
 catch (  Exception e) {
    return false;
  }
  return true;
}
Program: 37232
Project: 37232
Buggy source:
/** 
 * query inner objects of domain,and set them to domain object.
 * @param domains domain list.
 */
private void queryAndSetInnerObjectsWithoutNotice(List<Domain> domains){
  if (null == domains) {
    return;
  }
  for (  Domain domain : domains) {
    queryAndSetInnerObjects(domain);
    queryAndSetVariants(domain);
  }
}

Fixed version (ground truth):
/** 
 * query inner objects of domain,and set them to domain object.
 * @param domains domain list.
 */
private void queryAndSetInnerObjectsWithoutNotice(List<Domain> domains){
  if (null == domains) {
    return;
  }
  for (  Domain domain : domains) {
    queryAndSetInnerObjects(domain);
    queryAndSetVariants(domain);
    queryAndSetInnerNetwork(domain);
  }
}
Program: 37234
Project: 37234
Buggy source:
/** 
 * validate domain.
 * @param domainName domain name.
 * @return boolean.
 */
private boolean validateDomainNameIsValidIdna(String domainName){
  String decodeDomain=domainName;
  try {
    decodeDomain=DomainUtil.urlDecodeAndReplaceAsciiToLowercase(domainName);
  }
 catch (  DecodeException e) {
    e.printStackTrace();
  }
  return DomainUtil.validateDomainNameIsValidIdna(decodeDomain);
}

Fixed version (ground truth):
/** 
 * validate domain.
 * @param domainName domain name.
 * @return boolean.
 */
private boolean validateDomainNameIsValidIdna(String domainName){
  String decodeDomain=domainName;
  try {
    decodeDomain=DomainUtil.urlDecodeAndReplaceAsciiToLowercase(domainName);
  }
 catch (  DecodeException e) {
    e.printStackTrace();
  }
  return DomainUtil.validateDomainNameIsValidIdna(decodeDomain,false);
}
Program: 37235
Project: 37235
Buggy source:
@Test public void test_parse_IPV4(){
  String ipPrefix="String_Node_Str";
  IpVersion ipVersion=IpUtil.getIpVersionOfIp(ipPrefix);
  assertEquals(IpVersion.V4,ipVersion);
  byte[] bytes=IpUtil.ipToByteArray(ipPrefix,ipVersion);
  String ipString=IpUtil.toString(bytes,ipVersion);
  String hex1=DatatypeConverter.printHexBinary(bytes);
  System.err.println("String_Node_Str" + hex1);
}

Fixed version (ground truth):
@Test public void test_parse_IPV4(){
  String ipPrefix="String_Node_Str";
  IpVersion ipVersion=IpUtil.getIpVersionOfIp(ipPrefix);
  assertEquals(IpVersion.V4,ipVersion);
  byte[] bytes=IpUtil.ipToByteArray(ipPrefix,ipVersion);
  String ipString=IpUtil.toString(bytes,ipVersion);
  String hex1=DatatypeConverter.printHexBinary(bytes);
}
Program: 37236
Project: 37236
Buggy source:
@Test public void test_generate_ARPA(){
  NetworkInBytes networkInBytes=IpUtil.parseArpa("String_Node_Str");
  String hex1=DatatypeConverter.printHexBinary(networkInBytes.getStartAddress());
  System.err.println("String_Node_Str" + hex1);
  String hex2=DatatypeConverter.printHexBinary(networkInBytes.getEndAddress());
  System.err.println("String_Node_Str" + hex2);
}

Fixed version (ground truth):
@Test public void test_generate_ARPA(){
  NetworkInBytes networkInBytes=IpUtil.parseArpa("String_Node_Str");
  String hex1=DatatypeConverter.printHexBinary(networkInBytes.getStartAddress());
  String hex2=DatatypeConverter.printHexBinary(networkInBytes.getEndAddress());
}
Program: 37237
Project: 37237
Buggy source:
@Test public void test_parse_network_V4(){
  String network="String_Node_Str";
  IpVersion ipVersion=IpUtil.getIpVersionOfNetwork(network);
  assertEquals(IpVersion.V4,ipVersion);
  NetworkInBytes networkInBytes=IpUtil.parseNetwork(network,ipVersion);
  String hex1=DatatypeConverter.printHexBinary(networkInBytes.getStartAddress());
  System.err.println("String_Node_Str" + hex1);
  String hex2=DatatypeConverter.printHexBinary(networkInBytes.getEndAddress());
  System.err.println("String_Node_Str" + hex2);
  assertEquals(IpVersion.V4,networkInBytes.getIpVersion());
}

Fixed version (ground truth):
@Test public void test_parse_network_V4(){
  String network="String_Node_Str";
  IpVersion ipVersion=IpUtil.getIpVersionOfNetwork(network);
  assertEquals(IpVersion.V4,ipVersion);
  NetworkInBytes networkInBytes=IpUtil.parseNetwork(network,ipVersion);
  String hex1=DatatypeConverter.printHexBinary(networkInBytes.getStartAddress());
  String hex2=DatatypeConverter.printHexBinary(networkInBytes.getEndAddress());
  assertEquals(IpVersion.V4,networkInBytes.getIpVersion());
}
Program: 37238
Project: 37238
Buggy source:
@Test public void test_toByteArray_IPV4(){
  String ip="String_Node_Str";
  IpVersion ipVersion=IpUtil.getIpVersionOfIp(ip);
  String hex=DatatypeConverter.printHexBinary(IpUtil.ipToByteArray(ip,ipVersion));
  System.err.println("String_Node_Str" + hex);
}

Fixed version (ground truth):
@Test public void test_toByteArray_IPV4(){
  String ip="String_Node_Str";
  IpVersion ipVersion=IpUtil.getIpVersionOfIp(ip);
  String hex=DatatypeConverter.printHexBinary(IpUtil.ipToByteArray(ip,ipVersion));
}
Program: 37239
Project: 37239
Buggy source:
@Test public void test_toByteArray_IPV6(){
  String ip="String_Node_Str";
  IpVersion ipVersion=IpUtil.getIpVersionOfIp(ip);
  String hex=DatatypeConverter.printHexBinary(IpUtil.ipToByteArray(ip,ipVersion));
  System.err.println("String_Node_Str" + hex);
}

Fixed version (ground truth):
@Test public void test_toByteArray_IPV6(){
  String ip="String_Node_Str";
  IpVersion ipVersion=IpUtil.getIpVersionOfIp(ip);
  String hex=DatatypeConverter.printHexBinary(IpUtil.ipToByteArray(ip,ipVersion));
}
Program: 37240
Project: 37240
Buggy source:
/** 
 * encoded url with UTF-8 encoding. This will escape protocol(eg:'http://') and '/'.
 * @param str string
 * @return String encoded string
 */
public static String urlEncode(String str){
  if (StringUtils.isBlank(str)) {
    return str;
  }
  String result=str;
  try {
    String decodedURL=URLDecoder.decode(str,CHAR_SET_UTF8);
    decodedURL=decodedURL.replaceAll("String_Node_Str",URLEncoder.encode("String_Node_Str",CHAR_SET_UTF8));
    URI uri=new URI(decodedURL);
    result=uri.toASCIIString();
  }
 catch (  Exception e) {
    LOGGER.error(e.getMessage());
  }
  return result;
}

Fixed version (ground truth):
/** 
 * encoded url with UTF-8 encoding. This will escape protocol(eg:'http://') and '/'.
 * @param str string
 * @return String encoded string
 */
public static String urlEncode(String str){
  if (StringUtils.isBlank(str)) {
    return str;
  }
  String result=str;
  try {
    UriComponents uriComponents=UriComponentsBuilder.fromHttpUrl(str).build();
    return uriComponents.encode().toUriString();
  }
 catch (  Exception e) {
    LOGGER.error(e.getMessage());
  }
  return result;
}
Program: 37241
Project: 37241
Buggy source:
/** 
 * test decoded URL.
 * @throws UnsupportedEncodingException
 */
@Test public void testDecodedURLForIDN() throws UnsupportedEncodingException {
  String decodedURL="String_Node_Str";
  String encodeURL=URLEncoder.encode(decodedURL,"String_Node_Str");
  String expectURL="String_Node_Str";
  String result=StringUtil.urlEncode(decodedURL);
  assertEquals(expectURL,result);
  result=StringUtil.urlEncode(encodeURL);
  assertEquals(expectURL,result);
}

Fixed version (ground truth):
/** 
 * test decoded URL.
 * @throws UnsupportedEncodingException
 */
@Test public void testDecodedURLForIDN() throws UnsupportedEncodingException {
  String decodedURL="String_Node_Str";
  String encodeURL=URLEncoder.encode(decodedURL,"String_Node_Str");
  String expectURL="String_Node_Str";
  String result=StringUtil.urlEncode(decodedURL);
  assertEquals(expectURL,result);
}
Program: 37243
Project: 37243
Buggy source:
/** 
 * get IpVersion by name.
 * @param name name.
 * @return IpVersion if name is valid, null if not
 */
public static IpVersion getIpVersion(String name){
  IpVersion[] ipVersions=IpVersion.values();
  for (  IpVersion ipVersion : ipVersions) {
    if (ipVersion.getName().equals(name)) {
      return ipVersion;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * get IpVersion by name.
 * @param name name.
 * @return IpVersion if name is valid, null if not
 */
public static IpVersion getIpVersion(String name){
  IpVersion[] ipVersions=IpVersion.values();
  for (  IpVersion ipVersion : ipVersions) {
    if (ipVersion.getName().equalsIgnoreCase(name)) {
      return ipVersion;
    }
  }
  return null;
}
Program: 37244
Project: 37244
Buggy source:
/** 
 * <pre> generate PreparedStatementCreator by executing sql. select network ip by high address and low address and match the  most accurate one. </pre>
 * @param queryParam queryParam of network.
 * @param ipTableName the database ip table name.
 * @return PreparedStatementCreator.
 */
public static PreparedStatementCreator generatePStatCreator(QueryParam queryParam,String ipTableName){
  NetworkQueryParam ipQueryParam=(NetworkQueryParam)queryParam;
  final NetworkInBytes network=ipQueryParam.getNetworkInBytes();
  final int hexCharSize=IpUtil.getHexCharSize(network.getIpVersion());
  String sql="String_Node_Str" + ipTableName + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  final String finalSql=sql;
  PreparedStatementCreator pstatCreator=new PreparedStatementCreator(){
    public PreparedStatement createPreparedStatement(    Connection connection) throws SQLException {
      PreparedStatement ps=null;
      ps=connection.prepareStatement(finalSql);
      ps.setBytes(1,network.getStartAddress());
      ps.setBytes(2,network.getEndAddress());
      ps.setString(3,network.getIpVersion().getName());
      ps.setInt(4,hexCharSize);
      ps.setInt(5,hexCharSize);
      return ps;
    }
  }
;
  return pstatCreator;
}

Fixed version (ground truth):
/** 
 * <pre> generate PreparedStatementCreator by executing sql. select network ip by high address and low address and match the  most accurate one. </pre>
 * @param queryParam queryParam of network.
 * @param ipTableName the database ip table name.
 * @return PreparedStatementCreator.
 */
public static PreparedStatementCreator generatePStatCreator(QueryParam queryParam,String ipTableName){
  NetworkQueryParam ipQueryParam=(NetworkQueryParam)queryParam;
  final NetworkInBytes network=ipQueryParam.getNetworkInBytes();
  final int hexCharSize=IpUtil.getHexCharSize(network.getIpVersion());
  String sql="String_Node_Str" + ipTableName + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ generateNetworkVersionSql("String_Node_Str")+ "String_Node_Str";
  final String finalSql=sql;
  PreparedStatementCreator pstatCreator=new PreparedStatementCreator(){
    public PreparedStatement createPreparedStatement(    Connection connection) throws SQLException {
      PreparedStatement ps=null;
      ps=connection.prepareStatement(finalSql);
      ps.setBytes(1,network.getStartAddress());
      ps.setBytes(2,network.getEndAddress());
      ps.setString(3,network.getIpVersion().getName());
      ps.setInt(4,hexCharSize);
      ps.setInt(5,hexCharSize);
      return ps;
    }
  }
;
  return pstatCreator;
}
Program: 37245
Project: 37245
Buggy source:
/** 
 * query IPAddress from RDAP_NAMESERVER_IP for nameserver, without inner objects.
 * @param outerObjectId nameserver id which as the relation with nameserver.
 * @return IPAddress will be set to nameserver.
 */
private IPAddress queryWithoutInnerObjects(final Long outerObjectId){
  final String sql="String_Node_Str" + "String_Node_Str";
  IPAddress result=jdbcTemplate.query(new PreparedStatementCreator(){
    public PreparedStatement createPreparedStatement(    Connection connection) throws SQLException {
      PreparedStatement ps=connection.prepareStatement(sql);
      ps.setLong(1,outerObjectId);
      return ps;
    }
  }
,new NetworkResultSetExtractor());
  return result;
}

Fixed version (ground truth):
/** 
 * query IPAddress from RDAP_NAMESERVER_IP for nameserver, without inner objects.
 * @param outerObjectId nameserver id which as the relation with nameserver.
 * @return IPAddress will be set to nameserver.
 */
private IPAddress queryWithoutInnerObjects(final Long outerObjectId){
  final String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ super.generateNetworkRangeSql("String_Node_Str","String_Node_Str");
  IPAddress result=jdbcTemplate.query(new PreparedStatementCreator(){
    public PreparedStatement createPreparedStatement(    Connection connection) throws SQLException {
      PreparedStatement ps=connection.prepareStatement(sql);
      ps.setLong(1,outerObjectId);
      return ps;
    }
  }
,new NetworkResultSetExtractor());
  return result;
}
Program: 37246
Project: 37246
Buggy source:
/** 
 * query network from RDAP_IP, without inner objects.Only support ENTITY.
 * @param outerObjectId entity id.
 * @return network list
 */
private List<Network> queryWithoutInnerObjectsForEntity(final Long outerObjectId){
  final String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  List<Network> result=jdbcTemplate.query(new PreparedStatementCreator(){
    @Override public PreparedStatement createPreparedStatement(    Connection connection) throws SQLException {
      PreparedStatement ps=connection.prepareStatement(sql);
      ps.setLong(1,outerObjectId);
      ps.setString(2,ModelType.IP.getName());
      return ps;
    }
  }
,new NetworkWithStatusResultSetExtractor());
  return result;
}

Fixed version (ground truth):
/** 
 * query network from RDAP_IP, without inner objects.Only support ENTITY.
 * @param outerObjectId entity id.
 * @return network list
 */
private List<Network> queryWithoutInnerObjectsForEntity(final Long outerObjectId){
  final String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + super.generateNetworkRangeSql("String_Node_Str","String_Node_Str") + "String_Node_Str"+ super.generateNetworkRangeSql("String_Node_Str","String_Node_Str")+ "String_Node_Str";
  List<Network> result=jdbcTemplate.query(new PreparedStatementCreator(){
    @Override public PreparedStatement createPreparedStatement(    Connection connection) throws SQLException {
      PreparedStatement ps=connection.prepareStatement(sql);
      ps.setLong(1,outerObjectId);
      ps.setString(2,ModelType.IP.getName());
      return ps;
    }
  }
,new NetworkWithStatusResultSetExtractor());
  return result;
}
Program: 37247
Project: 37247
Buggy source:
/** 
 * check if is ARPA domain.
 * @return true if is, false if not.
 */
public boolean isArpaDomain(){
  return DomainType.ARPA.equals(type);
}

Fixed version (ground truth):
/** 
 * check if is ARPA domain.
 * @return true if is, false if not.
 */
@JsonIgnore public boolean isArpaDomain(){
  return DomainType.ARPA.equals(type);
}
Program: 37248
Project: 37248
Buggy source:
/** 
 * check if is DNR domain.
 * @return true if is, false if not.
 */
public boolean isDnrDomain(){
  return DomainType.DNR.equals(type);
}

Fixed version (ground truth):
/** 
 * check if is DNR domain.
 * @return true if is, false if not.
 */
@JsonIgnore public boolean isDnrDomain(){
  return DomainType.DNR.equals(type);
}
Program: 37249
Project: 37249
Buggy source:
/** 
 * get IP version of CIDR str.
 * @param cidr ip str.
 * @return IP version.
 */
public static IpVersion getIpVersionOfNetwork(String cidr){
  if (IpV4.isValidIpV4(cidr)) {
    return IpVersion.V4;
  }
 else   if (IpV6.isValidIpV6(cidr)) {
    return IpVersion.V6;
  }
  return IpVersion.INVALID;
}

Fixed version (ground truth):
/** 
 * get IP version of CIDR str.
 * @param cidr ip str.
 * @return IP version.
 */
public static IpVersion getIpVersionOfNetwork(String cidr){
  if (StringUtils.contains(cidr,"String_Node_Str")) {
    return IpVersion.INVALID;
  }
  if (IpV4.isValidIpV4(cidr)) {
    return IpVersion.V4;
  }
 else   if (IpV6.isValidIpV6(cidr)) {
    return IpVersion.V6;
  }
  return IpVersion.INVALID;
}
Program: 37250
Project: 37250
Buggy source:
/** 
 * get model type, value is simple name of class.
 * @return simple name of class
 */
public ModelType getObjectType(){
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * get model type, value is simple name of class.
 * @return simple name of class
 */
public ModelType getObjectType(){
  return ModelType.BASE;
}
Program: 37251
Project: 37251
Buggy source:
/** 
 * search domain using nsLdhName.
 * @param params query parameter include domain punyname.
 * @return domain list.
 */
private List<Domain> searchWithoutInnerObjectsByNsLdhName(final QueryParam params){
  DomainSearchParam domainQueryParam=(DomainSearchParam)params;
  final String nsName=domainQueryParam.getQ();
  final String punyName=domainQueryParam.getPunyName();
  final String nsNameLikeClause=super.generateLikeClause(nsName);
  final String punyNameLikeClause=super.generateLikeClause(punyName);
  final String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  final PageBean page=params.getPageBean();
  int startPage=page.getCurrentPage() - 1;
  startPage=startPage >= 0 ? startPage : 0;
  final long startRow=startPage * page.getMaxRecords();
  List<Domain> result=jdbcTemplate.query(new PreparedStatementCreator(){
    @Override public PreparedStatement createPreparedStatement(    Connection connection) throws SQLException {
      PreparedStatement ps=connection.prepareStatement(sql);
      ps.setString(1,punyNameLikeClause);
      ps.setString(2,nsNameLikeClause);
      ps.setString(3,punyNameLikeClause);
      ps.setString(4,nsNameLikeClause);
      ps.setLong(5,startRow);
      ps.setLong(6,page.getMaxRecords());
      return ps;
    }
  }
,new DomainResultSetExtractor());
  return result;
}

Fixed version (ground truth):
/** 
 * search domain using nsLdhName.
 * @param params query parameter include domain punyname.
 * @return domain list.
 */
private List<Domain> searchWithoutInnerObjectsByNsLdhName(final QueryParam params){
  DomainSearchParam domainQueryParam=(DomainSearchParam)params;
  final String nsName=domainQueryParam.getQ();
  final String punyName=domainQueryParam.getPunyName();
  final String nsNameLikeClause=super.generateLikeClause(nsName);
  final String punyNameLikeClause=super.generateLikeClause(punyName);
  final String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  final PageBean page=params.getPageBean();
  int startPage=page.getCurrentPage() - 1;
  startPage=startPage >= 0 ? startPage : 0;
  final long startRow=startPage * page.getMaxRecords();
  List<Domain> result=jdbcTemplate.query(new PreparedStatementCreator(){
    @Override public PreparedStatement createPreparedStatement(    Connection connection) throws SQLException {
      PreparedStatement ps=connection.prepareStatement(sql);
      ps.setString(1,punyNameLikeClause);
      ps.setString(2,punyNameLikeClause);
      ps.setLong(3,startRow);
      ps.setLong(4,page.getMaxRecords());
      return ps;
    }
  }
,new DomainResultSetExtractor());
  return result;
}
Program: 37252
Project: 37252
Buggy source:
/** 
 * search domain count by nsLdhName  <p> select the counter number of domain from database.
 * @param queryParam QueryParam.
 * @return domain count.
 */
private Long searchCountByNsLdhName(QueryParam queryParam){
  LOGGER.debug("String_Node_Str" + queryParam);
  DomainSearchParam domainQueryParam=(DomainSearchParam)queryParam;
  final String domainName=domainQueryParam.getQ();
  final String punyName=domainQueryParam.getPunyName();
  final String domainNameLikeClause=super.generateLikeClause(domainName);
  final String punyNameLikeClause=super.generateLikeClause(punyName);
  final String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  Long domainCount=jdbcTemplate.query(new PreparedStatementCreator(){
    @Override public PreparedStatement createPreparedStatement(    Connection connection) throws SQLException {
      PreparedStatement ps=connection.prepareStatement(sql);
      ps.setString(1,punyNameLikeClause);
      ps.setString(2,domainNameLikeClause);
      ps.setString(3,punyNameLikeClause);
      ps.setString(4,domainNameLikeClause);
      return ps;
    }
  }
,new CountResultSetExtractor());
  LOGGER.debug("String_Node_Str" + domainCount);
  return domainCount;
}

Fixed version (ground truth):
/** 
 * search domain count by nsLdhName  <p> select the counter number of domain from database.
 * @param queryParam QueryParam.
 * @return domain count.
 */
private Long searchCountByNsLdhName(QueryParam queryParam){
  LOGGER.debug("String_Node_Str" + queryParam);
  DomainSearchParam domainQueryParam=(DomainSearchParam)queryParam;
  final String domainName=domainQueryParam.getQ();
  final String punyName=domainQueryParam.getPunyName();
  final String domainNameLikeClause=super.generateLikeClause(domainName);
  final String punyNameLikeClause=super.generateLikeClause(punyName);
  final String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  Long domainCount=jdbcTemplate.query(new PreparedStatementCreator(){
    @Override public PreparedStatement createPreparedStatement(    Connection connection) throws SQLException {
      PreparedStatement ps=connection.prepareStatement(sql);
      ps.setString(1,punyNameLikeClause);
      ps.setString(2,punyNameLikeClause);
      return ps;
    }
  }
,new CountResultSetExtractor());
  LOGGER.debug("String_Node_Str" + domainCount);
  return domainCount;
}
Program: 37253
Project: 37253
Buggy source:
/** 
 * test query exist domain.
 * @throws Exception
 */
@Test @DatabaseTearDown("String_Node_Str") @DatabaseSetup(value="String_Node_Str") public void testSearchTruncatedDomain() throws Exception {
  mockMvc.perform(get(DOMAIN_SEARCH_URI + "String_Node_Str" + "String_Node_Str").accept(MediaType.parseMediaType(rdapJson))).andExpect(status().isOk()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(true)).andExpect(jsonPath("String_Node_Str").exists()).andExpect(jsonPath("String_Node_Str").isArray()).andExpect(jsonPath("String_Node_Str",hasSize(5))).andExpect(jsonPath("String_Node_Str",Matchers.hasItem(Matchers.hasKey("String_Node_Str"))));
  mockMvc.perform(get(DOMAIN_SEARCH_URI + "String_Node_Str").accept(MediaType.parseMediaType(rdapJson))).andExpect(status().isOk()).andExpect(jsonPath("String_Node_Str").value(true)).andExpect(jsonPath("String_Node_Str").exists()).andExpect(jsonPath("String_Node_Str").isArray()).andExpect(jsonPath("String_Node_Str",hasSize((int)5l))).andExpect(jsonPath("String_Node_Str",Matchers.hasItem(Matchers.hasKey("String_Node_Str"))));
  ;
}

Fixed version (ground truth):
/** 
 * test query exist domain.
 * @throws Exception
 */
@Test @DatabaseTearDown("String_Node_Str") @DatabaseSetup(value="String_Node_Str") public void testSearchTruncatedDomain() throws Exception {
  mockMvc.perform(get(DOMAIN_SEARCH_URI + "String_Node_Str" + "String_Node_Str").accept(MediaType.parseMediaType(rdapJson))).andExpect(status().isOk()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(true)).andExpect(jsonPath("String_Node_Str").exists()).andExpect(jsonPath("String_Node_Str").isArray()).andExpect(jsonPath("String_Node_Str",hasSize(5))).andExpect(jsonPath("String_Node_Str",Matchers.hasItem(Matchers.hasKey("String_Node_Str"))));
  mockMvc.perform(get(DOMAIN_SEARCH_URI + "String_Node_Str").accept(MediaType.parseMediaType(rdapJson))).andExpect(status().isOk()).andExpect(jsonPath("String_Node_Str").exists()).andExpect(jsonPath("String_Node_Str").isArray()).andExpect(jsonPath("String_Node_Str",hasSize(2))).andExpect(jsonPath("String_Node_Str",Matchers.hasItem(Matchers.hasKey("String_Node_Str"))));
  ;
}
Program: 37255
Project: 37255
Buggy source:
@Override protected String getRelativeRequestURI(Command command){
  List<String> argumentList=command.getArgumentList();
  if (null == argumentList || argumentList.isEmpty()) {
    throw new ServiceException("String_Node_Str");
  }
  if (StringUtils.isBlank(argumentList.get(0))) {
    throw new ServiceException("String_Node_Str");
  }
  return "String_Node_Str" + urlEncode(argumentList.get(0));
}

Fixed version (ground truth):
@Override protected String getRelativeRequestURI(Command command){
  List<String> argumentList=command.getArgumentList();
  if (null == argumentList || argumentList.isEmpty()) {
    throw new ServiceException("String_Node_Str");
  }
  if (StringUtils.isBlank(argumentList.get(0))) {
    throw new ServiceException("String_Node_Str");
  }
  return "String_Node_Str" + argumentList.get(0);
}
Program: 37256
Project: 37256
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: 37257
Project: 37257
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: 37258
Project: 37258
Buggy source:
/** 
 * set ObjectClassNameEnum.
 * @param objectClassNameEnum objectClassName for set.
 */
public void setObjectClassName(ObjectClassNameEnum objectClassName){
  this.objectClassName=objectClassName;
}

Fixed version (ground truth):
/** 
 * set ObjectClassNameEnum.
 * @param objectClassName objectClassName for set.
 */
public void setObjectClassName(ObjectClassNameEnum objectClassName){
  this.objectClassName=objectClassName;
}
Program: 37259
Project: 37259
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) throws DecodeException {
  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.
 * @throws DecodeException DecodeException.
 */
@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: 37260
Project: 37260
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) throws DecodeException {
  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 ResponseEntity.
 * @throws DecodeException DecodeException.
 */
@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);
}