nus-yam/ex-repair huggingface dataset:
Program: 37091
Project: 37091
Buggy source:
/** 
 * @param entityTelList entityTelList
 * @return notEmptyList
 */
public static List<EntityTelephoneDto> getNotEmptyList(List<EntityTelephoneDto> entityTelList){
  List<EntityTelephoneDto> notEmptyList=new ArrayList<EntityTelephoneDto>();
  if (null == entityTelList) {
    return notEmptyList;
  }
  for (  EntityTelephoneDto entityTel : entityTelList) {
    if (StringUtils.isNotBlank(entityTel.getNumber())) {
      notEmptyList.add(entityTel);
    }
  }
  return notEmptyList;
}

Fixed version (ground truth):
/** 
 * get not empty entityTelephoneDto list.
 * @param entityTelList entityTelList.
 * @return notEmptyList
 */
public static List<EntityTelephoneDto> getNotEmptyList(List<EntityTelephoneDto> entityTelList){
  List<EntityTelephoneDto> notEmptyList=new ArrayList<EntityTelephoneDto>();
  if (null == entityTelList) {
    return notEmptyList;
  }
  for (  EntityTelephoneDto entityTel : entityTelList) {
    if (StringUtils.isNotBlank(entityTel.getNumber())) {
      notEmptyList.add(entityTel);
    }
  }
  return notEmptyList;
}
Program: 37092
Project: 37092
Buggy source:
/** 
 * @param outerModel outer object
 */
public void saveRel(BaseModel outerModel){
  if (null == outerModel || null == outerModel.getDto()) {
    return;
  }
  List<EntityHandleDto> entityHandles=outerModel.getDto().getEntities();
  if (null == entityHandles || entityHandles.size() == 0) {
    return;
  }
  for (  EntityHandleDto entityHandleDto : entityHandles) {
    Long entityId=this.findIdByHandle(entityHandleDto.getHandle());
    if (null != entityId) {
      createRelEntity(outerModel,entityHandleDto,entityId);
    }
  }
}

Fixed version (ground truth):
/** 
 * save the relation between entity with object.
 * @param outerModel outer object
 */
public void saveRel(BaseModel outerModel){
  if (null == outerModel || null == outerModel.getDto()) {
    return;
  }
  List<EntityHandleDto> entityHandles=outerModel.getDto().getEntities();
  if (null == entityHandles || entityHandles.size() == 0) {
    return;
  }
  for (  EntityHandleDto entityHandleDto : entityHandles) {
    Long entityId=this.findIdByHandle(entityHandleDto.getHandle());
    if (null != entityId) {
      createRelEntity(outerModel,entityHandleDto,entityId);
    }
  }
}
Program: 37093
Project: 37093
Buggy source:
/** 
 * @param outerModel outerModel.
 * @param entityHandleDto entityHandleDto.
 * @param entityId entityId.
 */
private void createRelEntity(final BaseModel outerModel,final EntityHandleDto entityHandleDto,final Long entityId){
  final List<String> roles=entityHandleDto.getRoles();
  if (roles == null || roles.size() == 0) {
    return;
  }
  final String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str";
  jdbcTemplate.batchUpdate(sql,new BatchPreparedStatementSetter(){
    public int getBatchSize(){
      return roles.size();
    }
    @Override public void setValues(    PreparedStatement ps,    int i) throws SQLException {
      ps.setLong(1,outerModel.getId());
      ps.setString(2,outerModel.getObjectType().getName());
      ps.setLong(3,entityId);
      ps.setString(4,roles.get(i));
    }
  }
);
}

Fixed version (ground truth):
/** 
 * save the relation between entity with object to database.
 * @param outerModel outerModel.
 * @param entityHandleDto entityHandleDto.
 * @param entityId entityId.
 */
private void createRelEntity(final BaseModel outerModel,final EntityHandleDto entityHandleDto,final Long entityId){
  final List<String> roles=entityHandleDto.getRoles();
  if (roles == null || roles.size() == 0) {
    return;
  }
  final String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str";
  jdbcTemplate.batchUpdate(sql,new BatchPreparedStatementSetter(){
    public int getBatchSize(){
      return roles.size();
    }
    @Override public void setValues(    PreparedStatement ps,    int i) throws SQLException {
      ps.setLong(1,outerModel.getId());
      ps.setString(2,outerModel.getObjectType().getName());
      ps.setLong(3,entityId);
      ps.setString(4,roles.get(i));
    }
  }
);
}
Program: 37094
Project: 37094
Buggy source:
/** 
 * @param nsDto nsDto.
 * @param request request.
 * @return ResponseEntity ResponseEntity.
 */
@SuppressWarnings("String_Node_Str") @RequestMapping(value={"String_Node_Str"},method=RequestMethod.POST) @ResponseBody public ResponseEntity create(@RequestBody NameserverDto nsDto,HttpServletRequest request){
  LOGGER.debug("String_Node_Str");
  UpdateResponse response=createService.execute(nsDto);
  return RestResponse.createUpdateResponse(response);
}

Fixed version (ground truth):
/** 
 * create nameserver.
 * @param nsDto nsDto.
 * @param request HttpServletRequest
 * @return JSON formated result,with HTTP code.
 * @throws DecodeException
 */
@SuppressWarnings("String_Node_Str") @RequestMapping(value={"String_Node_Str"},method=RequestMethod.POST) @ResponseBody public ResponseEntity create(@RequestBody NameserverDto nsDto,HttpServletRequest request){
  LOGGER.debug("String_Node_Str");
  UpdateResponse response=createService.execute(nsDto);
  return RestResponse.createUpdateResponse(response);
}
Program: 37095
Project: 37095
Buggy source:
/** 
 * @param nsDto nsDto.
 * @param handle handle.
 * @param request request.
 * @return ResponseEntity ResponseEntity.
 */
@SuppressWarnings("String_Node_Str") @RequestMapping(value={"String_Node_Str"},method=RequestMethod.PUT) @ResponseBody public ResponseEntity update(@RequestBody NameserverDto nsDto,@PathVariable String handle,HttpServletRequest request){
  LOGGER.debug("String_Node_Str");
  nsDto.setHandle(handle);
  UpdateResponse response=updateService.execute(nsDto);
  return RestResponse.createUpdateResponse(response);
}

Fixed version (ground truth):
/** 
 * update nameserver.
 * @param nsDto nsDto.
 * @param handle handle.
 * @param request HttpServletRequest.
 * @return JSON formated result,with HTTP code.
 * @throws DecodeException.
 */
@SuppressWarnings("String_Node_Str") @RequestMapping(value={"String_Node_Str"},method=RequestMethod.PUT) @ResponseBody public ResponseEntity update(@RequestBody NameserverDto nsDto,@PathVariable String handle,HttpServletRequest request){
  LOGGER.debug("String_Node_Str");
  nsDto.setHandle(handle);
  UpdateResponse response=updateService.execute(nsDto);
  return RestResponse.createUpdateResponse(response);
}
Program: 37096
Project: 37096
Buggy source:
/** 
 * @param handle handle.
 * @param request request.
 * @return ResponseEntity ResponseEntity.
 */
@SuppressWarnings("String_Node_Str") @RequestMapping(value={"String_Node_Str"},method=RequestMethod.DELETE) @ResponseBody public ResponseEntity delete(@PathVariable String handle,HttpServletRequest request){
  LOGGER.debug("String_Node_Str");
  NameserverDto dto=new NameserverDto();
  dto.setHandle(handle);
  UpdateResponse response=deleteService.execute(dto);
  return RestResponse.createUpdateResponse(response);
}

Fixed version (ground truth):
/** 
 * delete nameserver.
 * @param handle handle.
 * @param request HttpServletRequest.
 * @return JSON formated result,with HTTP code.
 * @throws DecodeException
 */
@SuppressWarnings("String_Node_Str") @RequestMapping(value={"String_Node_Str"},method=RequestMethod.DELETE) @ResponseBody public ResponseEntity delete(@PathVariable String handle,HttpServletRequest request){
  LOGGER.debug("String_Node_Str");
  NameserverDto dto=new NameserverDto();
  dto.setHandle(handle);
  UpdateResponse response=deleteService.execute(dto);
  return RestResponse.createUpdateResponse(response);
}
Program: 37097
Project: 37097
Buggy source:
/** 
 * dto dto.
 */
protected Autnum convertDtoToModel(AutnumDto dto){
  Autnum autnum=convertDtoToAutnum(dto);
  super.convertCustomProperties(dto,autnum);
  return autnum;
}

Fixed version (ground truth):
/** 
 * @param dto autnumdto.
 * @return Autnum.
 */
protected Autnum convertDtoToModel(AutnumDto dto){
  Autnum autnum=convertDtoToAutnum(dto);
  super.convertCustomProperties(dto,autnum);
  return autnum;
}
Program: 37098
Project: 37098
Buggy source:
private void checkKeyData(SecureDnsDto secureDns,ValidationResult validationResult){
  List<KeyDataDto> keyDatas=secureDns.getKeyData();
  if (null == keyDatas) {
    return;
  }
  for (  KeyDataDto keyData : keyDatas) {
    checkNotNullAndMinMaxInt(keyData.getFlags(),"String_Node_Str",validationResult);
    checkNotNullAndMinMaxInt(keyData.getProtocol(),"String_Node_Str",validationResult);
    checkMaxLength(keyData.getPublicKey(),UpdateValidateUtil.MAX_LENGTH_2048,"String_Node_Str",validationResult);
    checkNotNullAndMinMaxInt(keyData.getAlgorithm(),"String_Node_Str",validationResult);
    checkEvents(keyData.getEvents(),validationResult);
    checkLinks(keyData.getLinks(),validationResult);
  }
}

Fixed version (ground truth):
/** 
 * @param secureDns secureDns.
 * @param validationResult validationResult.
 */
private void checkKeyData(SecureDnsDto secureDns,ValidationResult validationResult){
  List<KeyDataDto> keyDatas=secureDns.getKeyData();
  if (null == keyDatas) {
    return;
  }
  for (  KeyDataDto keyData : keyDatas) {
    checkNotNullAndMinMaxInt(keyData.getFlags(),"String_Node_Str",validationResult);
    checkNotNullAndMinMaxInt(keyData.getProtocol(),"String_Node_Str",validationResult);
    checkMaxLength(keyData.getPublicKey(),UpdateValidateUtil.MAX_LENGTH_2048,"String_Node_Str",validationResult);
    checkNotNullAndMinMaxInt(keyData.getAlgorithm(),"String_Node_Str",validationResult);
    checkEvents(keyData.getEvents(),validationResult);
    checkLinks(keyData.getLinks(),validationResult);
  }
}
Program: 37099
Project: 37099
Buggy source:
public UpdateDao<Variants,VariantDto> getVariantUpdateDao(){
  return variantUpdateDao;
}

Fixed version (ground truth):
/** 
 * @return variantUpdateDao.
 */
public UpdateDao<Variants,VariantDto> getVariantUpdateDao(){
  return variantUpdateDao;
}
Program: 37100
Project: 37100
Buggy source:
protected void saveVariants(DomainDto dto,Domain domain){
  LOGGER.debug("String_Node_Str");
  List<VariantDto> variantDtos=dto.getVariants();
  if (null == variantDtos || variantDtos.isEmpty()) {
    LOGGER.debug("String_Node_Str");
    return;
  }
  variantUpdateDao.saveAsInnerObjects(domain,variantDtos);
}

Fixed version (ground truth):
/** 
 * @param dto domainDto.
 * @param domain domain.
 */
protected void saveVariants(DomainDto dto,Domain domain){
  LOGGER.debug("String_Node_Str");
  List<VariantDto> variantDtos=dto.getVariants();
  if (null == variantDtos || variantDtos.isEmpty()) {
    LOGGER.debug("String_Node_Str");
    return;
  }
  variantUpdateDao.saveAsInnerObjects(domain,variantDtos);
}
Program: 37101
Project: 37101
Buggy source:
public UpdateDao<Network,IpDto> getNetworkDao(){
  return networkDao;
}

Fixed version (ground truth):
/** 
 * @return networkDao.
 */
public UpdateDao<Network,IpDto> getNetworkDao(){
  return networkDao;
}
Program: 37102
Project: 37102
Buggy source:
private void checkVariants(DomainDto domainDto,ValidationResult validationResult){
  List<VariantDto> variants=domainDto.getVariants();
  if (null == variants) {
    return;
  }
  for (  VariantDto variant : variants) {
    checkMaxLength(variant.getIdnTable(),MAX_LENGTH_255,"String_Node_Str",validationResult);
    List<String> relations=variant.getRelation();
    if (null != relations) {
      for (      String relation : relations) {
        checkMaxLength(relation,MAX_LENGTH_255,"String_Node_Str",validationResult);
      }
    }
    List<VariantNameDto> variantNames=variant.getVariantNames();
    if (null != variantNames) {
      for (      VariantNameDto variantName : variantNames) {
        checkNotEmptyAndMaxLength(variantName.getLdhName(),MAX_LENGTH_LDHNAME,"String_Node_Str",validationResult);
        checkNotEmptyAndMaxLength(variantName.getUnicodeName(),MAX_LENGTH_UNICODENAME,"String_Node_Str",validationResult);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @param domainDto domainDto.
 * @param validationResult validationResult.
 */
private void checkVariants(DomainDto domainDto,ValidationResult validationResult){
  List<VariantDto> variants=domainDto.getVariants();
  if (null == variants) {
    return;
  }
  for (  VariantDto variant : variants) {
    checkMaxLength(variant.getIdnTable(),MAX_LENGTH_255,"String_Node_Str",validationResult);
    List<String> relations=variant.getRelation();
    if (null != relations) {
      for (      String relation : relations) {
        checkMaxLength(relation,MAX_LENGTH_255,"String_Node_Str",validationResult);
      }
    }
    List<VariantNameDto> variantNames=variant.getVariantNames();
    if (null != variantNames) {
      for (      VariantNameDto variantName : variantNames) {
        checkNotEmptyAndMaxLength(variantName.getLdhName(),MAX_LENGTH_LDHNAME,"String_Node_Str",validationResult);
        checkNotEmptyAndMaxLength(variantName.getUnicodeName(),MAX_LENGTH_UNICODENAME,"String_Node_Str",validationResult);
      }
    }
  }
}
Program: 37103
Project: 37103
Buggy source:
public UpdateDao<SecureDns,SecureDnsDto> getSecureDnsUpdateDao(){
  return secureDnsUpdateDao;
}

Fixed version (ground truth):
/** 
 * @return secureDnsUpdateDao.
 */
public UpdateDao<SecureDns,SecureDnsDto> getSecureDnsUpdateDao(){
  return secureDnsUpdateDao;
}
Program: 37104
Project: 37104
Buggy source:
private void checkSecureDns(DomainDto domainDto,ValidationResult validationResult){
  SecureDnsDto secureDns=domainDto.getSecureDNS();
  if (null == secureDns) {
    return;
  }
  checkMinMaxInt(secureDns.getMaxSigLife(),"String_Node_Str",validationResult);
  checkDsData(secureDns,validationResult);
  checkKeyData(secureDns,validationResult);
}

Fixed version (ground truth):
/** 
 * @param domainDto domainDto.
 * @param validationResult validationResult.
 */
private void checkSecureDns(DomainDto domainDto,ValidationResult validationResult){
  SecureDnsDto secureDns=domainDto.getSecureDNS();
  if (null == secureDns) {
    return;
  }
  checkMinMaxInt(secureDns.getMaxSigLife(),"String_Node_Str",validationResult);
  checkDsData(secureDns,validationResult);
  checkKeyData(secureDns,validationResult);
}
Program: 37105
Project: 37105
Buggy source:
protected void updateVariants(DomainDto dto,Domain domain){
  deleteVariants(domain);
  saveVariants(dto,domain);
}

Fixed version (ground truth):
/** 
 * @param dto dto.
 * @param domain domain.
 */
protected void updateVariants(DomainDto dto,Domain domain){
  deleteVariants(domain);
  saveVariants(dto,domain);
}
Program: 37106
Project: 37106
Buggy source:
private void checkDsData(SecureDnsDto secureDns,ValidationResult validationResult){
  List<DsDataDto> dsDatas=secureDns.getDsData();
  if (null == dsDatas) {
    return;
  }
  for (  DsDataDto dsData : dsDatas) {
    checkNotNullAndMinMaxInt(dsData.getKeyTag(),"String_Node_Str",validationResult);
    checkNotNullAndMinMaxInt(dsData.getAlgorithm(),"String_Node_Str",validationResult);
    checkNotNullAndMinMaxInt(dsData.getDigestType(),"String_Node_Str",validationResult);
    checkNotEmptyAndMaxLength(dsData.getDigest(),UpdateValidateUtil.MAX_LENGTH_2048,"String_Node_Str",validationResult);
    checkEvents(dsData.getEvents(),validationResult);
    checkLinks(dsData.getLinks(),validationResult);
  }
}

Fixed version (ground truth):
/** 
 * @param secureDns secureDns.
 * @param validationResult validationResult.
 */
private void checkDsData(SecureDnsDto secureDns,ValidationResult validationResult){
  List<DsDataDto> dsDatas=secureDns.getDsData();
  if (null == dsDatas) {
    return;
  }
  for (  DsDataDto dsData : dsDatas) {
    checkNotNullAndMinMaxInt(dsData.getKeyTag(),"String_Node_Str",validationResult);
    checkNotNullAndMinMaxInt(dsData.getAlgorithm(),"String_Node_Str",validationResult);
    checkNotNullAndMinMaxInt(dsData.getDigestType(),"String_Node_Str",validationResult);
    checkNotEmptyAndMaxLength(dsData.getDigest(),UpdateValidateUtil.MAX_LENGTH_2048,"String_Node_Str",validationResult);
    checkEvents(dsData.getEvents(),validationResult);
    checkLinks(dsData.getLinks(),validationResult);
  }
}
Program: 37107
Project: 37107
Buggy source:
private Domain convertDtoToDomain(DomainDto dto){
  Domain domain=new Domain();
  BeanUtil.copyProperties(dto,domain,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  return domain;
}

Fixed version (ground truth):
/** 
 * @param dto domainDto.
 * @return domain 
 */
private Domain convertDtoToDomain(DomainDto dto){
  Domain domain=new Domain();
  BeanUtil.copyProperties(dto,domain,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  return domain;
}
Program: 37108
Project: 37108
Buggy source:
protected ValidationResult validateWithoutType(DomainDto domainDto,ValidationResult validationResult){
  checkNotEmptyAndMaxLength(domainDto.getLdhName(),MAX_LENGTH_LDHNAME,"String_Node_Str",validationResult);
  checkNotEmptyAndMaxLengthForHandle(domainDto.getHandle(),validationResult);
  checkMaxLength(domainDto.getUnicodeName(),MAX_LENGTH_UNICODENAME,"String_Node_Str",validationResult);
  checkVariants(domainDto,validationResult);
  checkSecureDns(domainDto,validationResult);
  checkPublicIds(domainDto.getPublicIds(),validationResult);
  validateBaseDto(domainDto,validationResult);
  return validationResult;
}

Fixed version (ground truth):
/** 
 * @param domainDto domainDto.
 * @param validationResult validationResult.
 * @return ValidationResult
 */
protected ValidationResult validateWithoutType(DomainDto domainDto,ValidationResult validationResult){
  checkNotEmptyAndMaxLength(domainDto.getLdhName(),MAX_LENGTH_LDHNAME,"String_Node_Str",validationResult);
  checkNotEmptyAndMaxLengthForHandle(domainDto.getHandle(),validationResult);
  checkMaxLength(domainDto.getUnicodeName(),MAX_LENGTH_UNICODENAME,"String_Node_Str",validationResult);
  checkVariants(domainDto,validationResult);
  checkSecureDns(domainDto,validationResult);
  checkPublicIds(domainDto.getPublicIds(),validationResult);
  validateBaseDto(domainDto,validationResult);
  return validationResult;
}
Program: 37109
Project: 37109
Buggy source:
protected void updateSecureDns(DomainDto dto,Domain domain){
  deleteSecureDns(domain);
  saveSecureDns(dto,domain);
}

Fixed version (ground truth):
/** 
 * @param dto domainDto.
 * @param domain  domain.
 */
protected void updateSecureDns(DomainDto dto,Domain domain){
  deleteSecureDns(domain);
  saveSecureDns(dto,domain);
}
Program: 37110
Project: 37110
Buggy source:
/** 
 * @param domain
 */
protected void deleteSecureDns(Domain domain){
  secureDnsUpdateDao.deleteAsInnerObjects(domain);
}

Fixed version (ground truth):
/** 
 * @param domain domain.       
 */
protected void deleteSecureDns(Domain domain){
  secureDnsUpdateDao.deleteAsInnerObjects(domain);
}
Program: 37111
Project: 37111
Buggy source:
protected void deleteVariants(Domain domain){
  variantUpdateDao.deleteAsInnerObjects(domain);
}

Fixed version (ground truth):
/** 
 * @param domain domain.
 */
protected void deleteVariants(Domain domain){
  variantUpdateDao.deleteAsInnerObjects(domain);
}
Program: 37112
Project: 37112
Buggy source:
public UpdateDao<Nameserver,NameserverDto> getNameserverDao(){
  return nameserverDao;
}

Fixed version (ground truth):
/** 
 * @return nameserverDao.
 */
public UpdateDao<Nameserver,NameserverDto> getNameserverDao(){
  return nameserverDao;
}
Program: 37113
Project: 37113
Buggy source:
protected void deleteEntityAddresses(Entity entity){
  LOGGER.debug("String_Node_Str");
  entityAddressDao.deleteAsInnerObjects(entity);
}

Fixed version (ground truth):
/** 
 * @param entity entity.
 */
protected void deleteEntityAddresses(Entity entity){
  LOGGER.debug("String_Node_Str");
  entityAddressDao.deleteAsInnerObjects(entity);
}
Program: 37114
Project: 37114
Buggy source:
protected void updateEntityAddresses(Entity entity){
  deleteEntityAddresses(entity);
  saveEntityAddresses(entity);
}

Fixed version (ground truth):
/** 
 * @param entity entity.
 */
protected void updateEntityAddresses(Entity entity){
  deleteEntityAddresses(entity);
  saveEntityAddresses(entity);
}
Program: 37115
Project: 37115
Buggy source:
protected void deleteEntityTels(Entity entity){
  LOGGER.debug("String_Node_Str");
  entityTelDao.deleteAsInnerObjects(entity);
}

Fixed version (ground truth):
/** 
 * @param entity entity.
 */
protected void deleteEntityTels(Entity entity){
  LOGGER.debug("String_Node_Str");
  entityTelDao.deleteAsInnerObjects(entity);
}
Program: 37116
Project: 37116
Buggy source:
protected void updateEntityTels(Entity entity){
  deleteEntityTels(entity);
  saveEntityTels(entity);
}

Fixed version (ground truth):
/** 
 * @param entity entity.
 */
protected void updateEntityTels(Entity entity){
  deleteEntityTels(entity);
  saveEntityTels(entity);
}
Program: 37117
Project: 37117
Buggy source:
private void checkEntityAddress(EntityDto dto,ValidationResult validationResult){
  List<EntityAddressDto> entityAddressList=dto.getAddresses();
  if (null == entityAddressList || entityAddressList.isEmpty()) {
    return;
  }
  for (  EntityAddressDto entityAddress : entityAddressList) {
    checkMaxLength(entityAddress.getCountry(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_ADDR + "String_Node_Str",validationResult);
    checkMaxLength(entityAddress.getExtendedAddress(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_ADDR + "String_Node_Str",validationResult);
    checkMaxLength(entityAddress.getLocality(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_ADDR + "String_Node_Str",validationResult);
    checkMaxLength(entityAddress.getPostalcode(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_ADDR + "String_Node_Str",validationResult);
    checkMaxLength(entityAddress.getPostbox(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_ADDR + "String_Node_Str",validationResult);
    checkMaxLength(entityAddress.getTypes(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_ADDR + "String_Node_Str",validationResult);
    checkMaxLength(entityAddress.getStreetAddress(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_ADDR + "String_Node_Str",validationResult);
    checkMaxLength(entityAddress.getRegion(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_ADDR + "String_Node_Str",validationResult);
    checkMinMaxInt(entityAddress.getPref(),ERROR_PROP_NAME_PREFIX_ENTITY_ADDR + "String_Node_Str",validationResult);
  }
}

Fixed version (ground truth):
/** 
 * @param dto entityDto.
 * @param validationResult validationResult.
 */
private void checkEntityAddress(EntityDto dto,ValidationResult validationResult){
  List<EntityAddressDto> entityAddressList=dto.getAddresses();
  if (null == entityAddressList || entityAddressList.isEmpty()) {
    return;
  }
  for (  EntityAddressDto entityAddress : entityAddressList) {
    checkMaxLength(entityAddress.getCountry(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_ADDR + "String_Node_Str",validationResult);
    checkMaxLength(entityAddress.getExtendedAddress(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_ADDR + "String_Node_Str",validationResult);
    checkMaxLength(entityAddress.getLocality(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_ADDR + "String_Node_Str",validationResult);
    checkMaxLength(entityAddress.getPostalcode(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_ADDR + "String_Node_Str",validationResult);
    checkMaxLength(entityAddress.getPostbox(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_ADDR + "String_Node_Str",validationResult);
    checkMaxLength(entityAddress.getTypes(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_ADDR + "String_Node_Str",validationResult);
    checkMaxLength(entityAddress.getStreetAddress(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_ADDR + "String_Node_Str",validationResult);
    checkMaxLength(entityAddress.getRegion(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_ADDR + "String_Node_Str",validationResult);
    checkMinMaxInt(entityAddress.getPref(),ERROR_PROP_NAME_PREFIX_ENTITY_ADDR + "String_Node_Str",validationResult);
  }
}
Program: 37118
Project: 37118
Buggy source:
private void checkEntityTel(EntityDto dto,ValidationResult validationResult){
  List<EntityTelephoneDto> entityTelList=dto.getTelephones();
  if (null == entityTelList || entityTelList.isEmpty()) {
    return;
  }
  for (  EntityTelephoneDto entityTelephone : entityTelList) {
    checkMaxLength(entityTelephone.getExtNumber(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_TEL + "String_Node_Str",validationResult);
    checkMaxLength(entityTelephone.getNumber(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_TEL + "String_Node_Str",validationResult);
    checkMaxLength(entityTelephone.getTypes(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_TEL + "String_Node_Str",validationResult);
    checkMinMaxInt(entityTelephone.getPref(),ERROR_PROP_NAME_PREFIX_ENTITY_TEL + "String_Node_Str",validationResult);
  }
}

Fixed version (ground truth):
/** 
 * @param dto entityDto.
 * @param validationResult validationResult.
 */
private void checkEntityTel(EntityDto dto,ValidationResult validationResult){
  List<EntityTelephoneDto> entityTelList=dto.getTelephones();
  if (null == entityTelList || entityTelList.isEmpty()) {
    return;
  }
  for (  EntityTelephoneDto entityTelephone : entityTelList) {
    checkMaxLength(entityTelephone.getExtNumber(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_TEL + "String_Node_Str",validationResult);
    checkMaxLength(entityTelephone.getNumber(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_TEL + "String_Node_Str",validationResult);
    checkMaxLength(entityTelephone.getTypes(),MAX_LENGTH_255,ERROR_PROP_NAME_PREFIX_ENTITY_TEL + "String_Node_Str",validationResult);
    checkMinMaxInt(entityTelephone.getPref(),ERROR_PROP_NAME_PREFIX_ENTITY_TEL + "String_Node_Str",validationResult);
  }
}
Program: 37119
Project: 37119
Buggy source:
protected void saveEntityTels(Entity entity){
  LOGGER.debug("String_Node_Str");
  EntityDto dto=(EntityDto)entity.getDto();
  List<EntityTelephoneDto> entityTelList=dto.getTelephones();
  if (null == entityTelList || entityTelList.isEmpty()) {
    LOGGER.debug("String_Node_Str");
    return;
  }
  entityTelDao.saveAsInnerObjects(entity,entityTelList);
}

Fixed version (ground truth):
/** 
 * @param entity entity.
 */
protected void saveEntityTels(Entity entity){
  LOGGER.debug("String_Node_Str");
  EntityDto dto=(EntityDto)entity.getDto();
  List<EntityTelephoneDto> entityTelList=dto.getTelephones();
  if (null == entityTelList || entityTelList.isEmpty()) {
    LOGGER.debug("String_Node_Str");
    return;
  }
  entityTelDao.saveAsInnerObjects(entity,entityTelList);
}
Program: 37120
Project: 37120
Buggy source:
protected Entity convertDtoToModel(EntityDto dto){
  Entity entity=convertDtoToEntity(dto);
  super.convertCustomProperties(dto,entity);
  return entity;
}

Fixed version (ground truth):
/** 
 * @param dto entityDto.
 * @return entity.
 */
protected Entity convertDtoToModel(EntityDto dto){
  Entity entity=convertDtoToEntity(dto);
  super.convertCustomProperties(dto,entity);
  return entity;
}
Program: 37121
Project: 37121
Buggy source:
private Entity convertDtoToEntity(EntityDto dto){
  Entity entity=new Entity();
  BeanUtil.copyProperties(dto,entity,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  return entity;
}

Fixed version (ground truth):
/** 
 * @param dto entityDto.
 * @return entity.
 */
private Entity convertDtoToEntity(EntityDto dto){
  Entity entity=new Entity();
  BeanUtil.copyProperties(dto,entity,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  return entity;
}
Program: 37122
Project: 37122
Buggy source:
protected void saveEntityAddresses(Entity entity){
  LOGGER.debug("String_Node_Str");
  EntityDto dto=(EntityDto)entity.getDto();
  List<EntityAddressDto> entityAddressList=dto.getAddresses();
  if (null == entityAddressList || entityAddressList.isEmpty()) {
    LOGGER.debug("String_Node_Str");
    return;
  }
  entityAddressDao.saveAsInnerObjects(entity,entityAddressList);
}

Fixed version (ground truth):
/** 
 * @param entity entity.
 */
protected void saveEntityAddresses(Entity entity){
  LOGGER.debug("String_Node_Str");
  EntityDto dto=(EntityDto)entity.getDto();
  List<EntityAddressDto> entityAddressList=dto.getAddresses();
  if (null == entityAddressList || entityAddressList.isEmpty()) {
    LOGGER.debug("String_Node_Str");
    return;
  }
  entityAddressDao.saveAsInnerObjects(entity,entityAddressList);
}
Program: 37123
Project: 37123
Buggy source:
protected ValidationResult validateForSaveAndUpdate(EntityDto dto,ValidationResult validationResult){
  checkNotEmptyAndMaxLengthForHandle(dto.getHandle(),validationResult);
  checkNotEmptyAndMaxLength(dto.getFn(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getKind(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getEmail(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getTitle(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getOrg(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getUrl(),MAX_LENGTH_PORT43,"String_Node_Str",validationResult);
  checkEntityAddress(dto,validationResult);
  checkEntityTel(dto,validationResult);
  checkPublicIds(dto.getPublicIds(),validationResult);
  validateBaseDto(dto,validationResult);
  return validationResult;
}

Fixed version (ground truth):
/** 
 * @param dto entityDto.
 * @param validationResult validationResult.
 * @return ValidationResult
 */
protected ValidationResult validateForSaveAndUpdate(EntityDto dto,ValidationResult validationResult){
  checkNotEmptyAndMaxLengthForHandle(dto.getHandle(),validationResult);
  checkNotEmptyAndMaxLength(dto.getFn(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getKind(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getEmail(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getTitle(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getOrg(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getUrl(),MAX_LENGTH_PORT43,"String_Node_Str",validationResult);
  checkEntityAddress(dto,validationResult);
  checkEntityTel(dto,validationResult);
  checkPublicIds(dto.getPublicIds(),validationResult);
  validateBaseDto(dto,validationResult);
  return validationResult;
}
Program: 37124
Project: 37124
Buggy source:
private AutnumDto generateAutnumDto(){
  AutnumDto autnum=new AutnumDto();
  autnum.setHandle("String_Node_Str");
  autnum.setStartAutnum(1L);
  autnum.setEndAutnum(1L);
  autnum.setName("String_Node_Str");
  autnum.setPort43("String_Node_Str");
  autnum.setCountry("String_Node_Str");
  autnum.setLang("String_Node_Str");
  autnum.setType("String_Node_Str");
  Map<String,String> customProperties=new HashMap<String,String>();
  customProperties.put("String_Node_Str","String_Node_Str");
  customProperties.put("String_Node_Str","String_Node_Str");
  autnum.setCustomProperties(customProperties);
  List<String> status=new ArrayList<String>();
  status.add("String_Node_Str");
  status.add("String_Node_Str");
  autnum.setStatus(status);
  return autnum;
}

Fixed version (ground truth):
private AutnumDto generateAutnumDto(){
  AutnumDto autnum=new AutnumDto();
  autnum.setHandle("String_Node_Str");
  autnum.setStartAutnum(1L);
  autnum.setEndAutnum(1L);
  autnum.setName("String_Node_Str");
  autnum.setPort43("String_Node_Str");
  autnum.setCountry("String_Node_Str");
  autnum.setLang("String_Node_Str");
  autnum.setType("String_Node_Str");
  Map<String,String> customProperties=new LinkedHashMap<String,String>();
  customProperties.put("String_Node_Str","String_Node_Str");
  customProperties.put("String_Node_Str","String_Node_Str");
  autnum.setCustomProperties(customProperties);
  List<String> status=new ArrayList<String>();
  status.add("String_Node_Str");
  status.add("String_Node_Str");
  autnum.setStatus(status);
  return autnum;
}
Program: 37125
Project: 37125
Buggy source:
private DomainDto generateDomainDto(){
  DomainDto domain=new DomainDto();
  domain.setHandle("String_Node_Str");
  domain.setLdhName("String_Node_Str");
  domain.setUnicodeName("String_Node_Str");
  domain.setPort43("String_Node_Str");
  domain.setLang("String_Node_Str");
  domain.setType(DomainType.DNR.getName());
  Map<String,String> customProperties=new HashMap<String,String>();
  customProperties.put("String_Node_Str","String_Node_Str");
  customProperties.put("String_Node_Str","String_Node_Str");
  domain.setCustomProperties(customProperties);
  return domain;
}

Fixed version (ground truth):
private DomainDto generateDomainDto(){
  DomainDto domain=new DomainDto();
  domain.setHandle("String_Node_Str");
  domain.setLdhName("String_Node_Str");
  domain.setUnicodeName("String_Node_Str");
  domain.setPort43("String_Node_Str");
  domain.setLang("String_Node_Str");
  domain.setType(DomainType.DNR.getName());
  Map<String,String> customProperties=new LinkedHashMap<String,String>();
  customProperties.put("String_Node_Str","String_Node_Str");
  customProperties.put("String_Node_Str","String_Node_Str");
  domain.setCustomProperties(customProperties);
  return domain;
}
Program: 37126
Project: 37126
Buggy source:
private EntityDto generateEntityDto(){
  EntityDto entity=new EntityDto();
  entity.setHandle("String_Node_Str");
  entity.setEmail("String_Node_Str");
  entity.setFn("String_Node_Str");
  entity.setKind("String_Node_Str");
  entity.setOrg("String_Node_Str");
  entity.setPort43("String_Node_Str");
  entity.setLang("String_Node_Str");
  entity.setTitle("String_Node_Str");
  entity.setUrl("String_Node_Str");
  Map<String,String> customProperties=new HashMap<String,String>();
  customProperties.put("String_Node_Str","String_Node_Str");
  customProperties.put("String_Node_Str","String_Node_Str");
  entity.setCustomProperties(customProperties);
  List<String> status=new ArrayList<String>();
  status.add("String_Node_Str");
  status.add("String_Node_Str");
  entity.setStatus(status);
  return entity;
}

Fixed version (ground truth):
private EntityDto generateEntityDto(){
  EntityDto entity=new EntityDto();
  entity.setHandle("String_Node_Str");
  entity.setEmail("String_Node_Str");
  entity.setFn("String_Node_Str");
  entity.setKind("String_Node_Str");
  entity.setOrg("String_Node_Str");
  entity.setPort43("String_Node_Str");
  entity.setLang("String_Node_Str");
  entity.setTitle("String_Node_Str");
  entity.setUrl("String_Node_Str");
  Map<String,String> customProperties=new LinkedHashMap<String,String>();
  customProperties.put("String_Node_Str","String_Node_Str");
  customProperties.put("String_Node_Str","String_Node_Str");
  entity.setCustomProperties(customProperties);
  List<String> status=new ArrayList<String>();
  status.add("String_Node_Str");
  status.add("String_Node_Str");
  entity.setStatus(status);
  return entity;
}
Program: 37127
Project: 37127
Buggy source:
private NameserverDto generateNsDto(){
  NameserverDto nameserver=new NameserverDto();
  nameserver.setHandle("String_Node_Str");
  nameserver.setLdhName("String_Node_Str");
  nameserver.setUnicodeName("String_Node_Str");
  nameserver.setPort43("String_Node_Str");
  nameserver.setLang("String_Node_Str");
  List<String> status=new ArrayList<String>();
  status.add("String_Node_Str");
  status.add("String_Node_Str");
  nameserver.setStatus(status);
  Map<String,String> customProperties=new HashMap<String,String>();
  customProperties.put("String_Node_Str","String_Node_Str");
  customProperties.put("String_Node_Str","String_Node_Str");
  nameserver.setCustomProperties(customProperties);
  return nameserver;
}

Fixed version (ground truth):
private NameserverDto generateNsDto(){
  NameserverDto nameserver=new NameserverDto();
  nameserver.setHandle("String_Node_Str");
  nameserver.setLdhName("String_Node_Str");
  nameserver.setUnicodeName("String_Node_Str");
  nameserver.setPort43("String_Node_Str");
  nameserver.setLang("String_Node_Str");
  List<String> status=new ArrayList<String>();
  status.add("String_Node_Str");
  status.add("String_Node_Str");
  nameserver.setStatus(status);
  Map<String,String> customProperties=new LinkedHashMap<String,String>();
  customProperties.put("String_Node_Str","String_Node_Str");
  customProperties.put("String_Node_Str","String_Node_Str");
  nameserver.setCustomProperties(customProperties);
  return nameserver;
}
Program: 37128
Project: 37128
Buggy source:
private boolean checkContentTypeForUpdate(HttpServletRequest request){
  String contentTypeHeader=request.getHeader("String_Node_Str");
  LOGGER.debug("String_Node_Str",contentTypeHeader);
  if (StringUtils.isBlank(contentTypeHeader)) {
    return false;
  }
  List<MediaType> mediaTypes=StringUtil.parseMediaTypes(contentTypeHeader);
  if (null == mediaTypes) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
private boolean checkContentTypeForUpdate(HttpServletRequest request){
  String contentTypeHeader=request.getHeader("String_Node_Str");
  LOGGER.debug("String_Node_Str",contentTypeHeader);
  if (StringUtils.isBlank(contentTypeHeader)) {
    return false;
  }
  MediaType mediaType=StringUtil.parseMediaType(contentTypeHeader);
  if (null == mediaType) {
    return false;
  }
  return true;
}
Program: 37129
Project: 37129
Buggy source:
@Test @DatabaseSetup("String_Node_Str") @DatabaseTearDown("String_Node_Str") public void test_invalid_handle_already_exist() throws Exception {
  AutnumDto autnum=generateAutnumDto();
  String content=JsonHelper.serialize(autnum);
  mockMvc.perform(post(URI_AUTNUM_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isOk()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(autnum.getHandle()));
  mockMvc.perform(post(URI_AUTNUM_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isBadRequest()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(400)).andExpect(jsonPath("String_Node_Str").value(4091)).andExpect(jsonPath("String_Node_Str").value(CoreMatchers.hasItems(String.format(ServiceErrorCode.ERROR_4091.getMessage(),autnum.getHandle()))));
}

Fixed version (ground truth):
@Test @DatabaseSetup("String_Node_Str") @DatabaseTearDown("String_Node_Str") public void test_invalid_handle_already_exist() throws Exception {
  AutnumDto autnum=generateAutnumDto();
  String content=JsonHelper.serialize(autnum);
  mockMvc.perform(post(URI_AUTNUM_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isOk()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(autnum.getHandle()));
  mockMvc.perform(post(URI_AUTNUM_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isConflict()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(409)).andExpect(jsonPath("String_Node_Str").value(4091)).andExpect(jsonPath("String_Node_Str").value(CoreMatchers.hasItems(String.format(ServiceErrorCode.ERROR_4091.getMessage(),autnum.getHandle()))));
}
Program: 37130
Project: 37130
Buggy source:
@Test @DatabaseSetup("String_Node_Str") @DatabaseTearDown("String_Node_Str") public void test_invalid_handle_already_exist() throws Exception {
  DomainDto domain=generateDomainDto();
  String content=JsonHelper.serialize(domain);
  mockMvc.perform(post(URI_DOMAIN_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isOk()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(domain.getHandle()));
  mockMvc.perform(post(URI_DOMAIN_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isBadRequest()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(400)).andExpect(jsonPath("String_Node_Str").value(4091)).andExpect(jsonPath("String_Node_Str").value(CoreMatchers.hasItems(String.format(ServiceErrorCode.ERROR_4091.getMessage(),domain.getHandle()))));
}

Fixed version (ground truth):
@Test @DatabaseSetup("String_Node_Str") @DatabaseTearDown("String_Node_Str") public void test_invalid_handle_already_exist() throws Exception {
  DomainDto domain=generateDomainDto();
  String content=JsonHelper.serialize(domain);
  mockMvc.perform(post(URI_DOMAIN_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isOk()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(domain.getHandle()));
  mockMvc.perform(post(URI_DOMAIN_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isConflict()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(409)).andExpect(jsonPath("String_Node_Str").value(4091)).andExpect(jsonPath("String_Node_Str").value(CoreMatchers.hasItems(String.format(ServiceErrorCode.ERROR_4091.getMessage(),domain.getHandle()))));
}
Program: 37131
Project: 37131
Buggy source:
@Test @DatabaseSetup("String_Node_Str") @DatabaseTearDown("String_Node_Str") public void test_invalid_handle_already_exist() throws Exception {
  EntityDto entity=generateEntityDto();
  String content=JsonHelper.serialize(entity);
  mockMvc.perform(post(URI_ENTITY_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isOk()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(entity.getHandle()));
  mockMvc.perform(post(URI_ENTITY_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isBadRequest()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(400)).andExpect(jsonPath("String_Node_Str").value(4091)).andExpect(jsonPath("String_Node_Str").value(CoreMatchers.hasItems(String.format(ServiceErrorCode.ERROR_4091.getMessage(),entity.getHandle()))));
}

Fixed version (ground truth):
@Test @DatabaseSetup("String_Node_Str") @DatabaseTearDown("String_Node_Str") public void test_invalid_handle_already_exist() throws Exception {
  EntityDto entity=generateEntityDto();
  String content=JsonHelper.serialize(entity);
  mockMvc.perform(post(URI_ENTITY_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isOk()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(entity.getHandle()));
  mockMvc.perform(post(URI_ENTITY_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isConflict()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(409)).andExpect(jsonPath("String_Node_Str").value(4091)).andExpect(jsonPath("String_Node_Str").value(CoreMatchers.hasItems(String.format(ServiceErrorCode.ERROR_4091.getMessage(),entity.getHandle()))));
}
Program: 37132
Project: 37132
Buggy source:
@Test @DatabaseSetup("String_Node_Str") @DatabaseTearDown("String_Node_Str") public void test_invalid_handle_already_exist() throws Exception {
  NameserverDto ns=generateNsDto();
  String content=JsonHelper.serialize(ns);
  mockMvc.perform(post(URI_NS_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isOk()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(ns.getHandle()));
  mockMvc.perform(post(URI_NS_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isBadRequest()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(400)).andExpect(jsonPath("String_Node_Str").value(4091)).andExpect(jsonPath("String_Node_Str").value(CoreMatchers.hasItems(String.format(ServiceErrorCode.ERROR_4091.getMessage(),ns.getHandle()))));
}

Fixed version (ground truth):
@Test @DatabaseSetup("String_Node_Str") @DatabaseTearDown("String_Node_Str") public void test_invalid_handle_already_exist() throws Exception {
  NameserverDto ns=generateNsDto();
  String content=JsonHelper.serialize(ns);
  mockMvc.perform(post(URI_NS_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isOk()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(ns.getHandle()));
  mockMvc.perform(post(URI_NS_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isConflict()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(409)).andExpect(jsonPath("String_Node_Str").value(4091)).andExpect(jsonPath("String_Node_Str").value(CoreMatchers.hasItems(String.format(ServiceErrorCode.ERROR_4091.getMessage(),ns.getHandle()))));
}
Program: 37133
Project: 37133
Buggy source:
@Test @DatabaseSetup("String_Node_Str") @DatabaseTearDown("String_Node_Str") public void test_invalid_handle_already_exist() throws Exception {
  IpDto ipDto=generateIpDto();
  String content=JsonHelper.serialize(ipDto);
  mockMvc.perform(post(URI_IP_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isOk()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(ipDto.getHandle()));
  mockMvc.perform(post(URI_IP_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isBadRequest()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(400)).andExpect(jsonPath("String_Node_Str").value(4091)).andExpect(jsonPath("String_Node_Str").value(CoreMatchers.hasItems(String.format(ServiceErrorCode.ERROR_4091.getMessage(),ipDto.getHandle()))));
}

Fixed version (ground truth):
@Test @DatabaseSetup("String_Node_Str") @DatabaseTearDown("String_Node_Str") public void test_invalid_handle_already_exist() throws Exception {
  IpDto ipDto=generateIpDto();
  String content=JsonHelper.serialize(ipDto);
  mockMvc.perform(post(URI_IP_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isOk()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(ipDto.getHandle()));
  mockMvc.perform(post(URI_IP_U).contentType(MediaType.parseMediaType(rdapJson)).content(content)).andExpect(status().isConflict()).andExpect(content().contentType(rdapJson)).andExpect(jsonPath("String_Node_Str").value(409)).andExpect(jsonPath("String_Node_Str").value(4091)).andExpect(jsonPath("String_Node_Str").value(CoreMatchers.hasItems(String.format(ServiceErrorCode.ERROR_4091.getMessage(),ipDto.getHandle()))));
}
Program: 37134
Project: 37134
Buggy source:
private boolean checkContentTypeForUpdate(HttpServletRequest request){
  String contentTypeHeader=request.getHeader("String_Node_Str");
  LOGGER.debug("String_Node_Str",contentTypeHeader);
  if (StringUtils.isBlank(contentTypeHeader)) {
    return false;
  }
  List<MediaType> mediaTypes=StringUtil.parseMediaTypes(contentTypeHeader);
  if (null == mediaTypes) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
private boolean checkContentTypeForUpdate(HttpServletRequest request){
  String contentTypeHeader=request.getHeader("String_Node_Str");
  LOGGER.debug("String_Node_Str",contentTypeHeader);
  if (StringUtils.isBlank(contentTypeHeader)) {
    return false;
  }
  MediaType mediaType=StringUtil.parseMediaType(contentTypeHeader);
  if (null == mediaType) {
    return false;
  }
  return true;
}
Program: 37135
Project: 37135
Buggy source:
/** 
 * parse string IP to byte array.
 * @param ipPrefix ipPrefix.
 * @param ipVersion ipVersion.
 * @return bytes.
 */
public static byte[] ipToByteArray(String ipPrefix,IpVersion ipVersion){
  if (null == ipVersion || ipVersion.isNotValidIp()) {
    return null;
  }
  if (ipVersion.isV4()) {
    return IpV4.toByteArray(ipPrefix);
  }
  if (ipVersion.isV6()) {
    return IpV6.toByteArray(ipPrefix);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * ipToByteArray.
 * @param ipPrefix IP.
 * @return bytes.
 */
public static byte[] ipToByteArray(String ipPrefix){
  IpVersion ipVersion=getIpVersionOfIp(ipPrefix);
  if (null == ipVersion || ipVersion.isNotValidIp()) {
    return null;
  }
  if (ipVersion.isV4()) {
    return IpV4.toByteArray(ipPrefix);
  }
  if (ipVersion.isV6()) {
    return IpV6.toByteArray(ipPrefix);
  }
  return null;
}