nus-yam/ex-repair huggingface dataset:
Program: 37043
Project: 37043
Buggy source:
/** 
 * parse command string to Command.
 * @param commandStr command string.
 * @return Command.
 * @throws ServiceException ServiceException.
 */
public static Command parse(String commandStr) throws ServiceException {
  LOGGER.debug("String_Node_Str",commandStr);
  commandStr=validateAndFormatCommandStr(commandStr);
  String[] commandSplits=StringUtils.split(commandStr);
  Options supportedOptions=initSupportedOptions();
  CommandLine line=null;
  CommandLineParser parser=new GnuParser();
  try {
    line=parser.parse(supportedOptions,commandSplits,false);
  }
 catch (  ParseException e) {
    LOGGER.error("String_Node_Str",e);
    throw new ServiceException("String_Node_Str");
  }
  return doParseCommand(line.getArgList());
}

Fixed version (ground truth):
/** 
 * parse command string to Command.
 * @param commandStr command string.
 * @return Command. ServiceException.
 */
@SuppressWarnings("String_Node_Str") public static Command parse(String commandStr){
  LOGGER.debug("String_Node_Str",commandStr);
  commandStr=validateAndFormatCommandStr(commandStr);
  String[] commandSplits=StringUtils.split(commandStr);
  Options supportedOptions=initSupportedOptions();
  CommandLine line=null;
  CommandLineParser parser=new GnuParser();
  try {
    line=parser.parse(supportedOptions,commandSplits,false);
  }
 catch (  ParseException e) {
    LOGGER.error("String_Node_Str",e);
    throw new ServiceException("String_Node_Str");
  }
  return doParseCommand(line.getArgList());
}
Program: 37044
Project: 37044
Buggy source:
@Override protected String getRelativeRequestURI(Command command){
  List<String> argumentList=command.getArgumentList();
  throwExceptionIfArguementIsEmpty(argumentList);
  String uri="String_Node_Str";
  String OPTION_NAME=CommandOption.DOMAIN_SEARCH_BY_NAME.getOption();
  String OPTION_NSLDHNAME=CommandOption.DOMAIN_SEARCH_BY_NSLDHNAME.getOption();
  String OPTION_NSIP=CommandOption.DOMAIN_SEARCH_BY_NSIP.getOption();
  if (isPrefixedArgument(argumentList.get(0),OPTION_NSLDHNAME + PARAM_SEPARATOR)) {
    String argumentWithoutPrefix=removePrefix(argumentList.get(0),OPTION_NSLDHNAME);
    argumentWithoutPrefix=urlEncode(argumentWithoutPrefix);
    uri=uri + OPTION_NSLDHNAME + "String_Node_Str"+ argumentWithoutPrefix;
    System.out.println(uri);
  }
 else   if (isPrefixedArgument(argumentList.get(0),OPTION_NSIP + PARAM_SEPARATOR)) {
    String argumentWithoutPrefix=removePrefix(argumentList.get(0),OPTION_NSIP);
    argumentWithoutPrefix=urlEncode(argumentWithoutPrefix);
    uri=uri + OPTION_NSIP + "String_Node_Str"+ argumentWithoutPrefix;
  }
 else {
    uri=uri + OPTION_NAME + "String_Node_Str"+ urlEncode(argumentList.get(0));
  }
  return uri;
}

Fixed version (ground truth):
@Override protected String getRelativeRequestURI(Command command){
  List<String> argumentList=command.getArgumentList();
  throwExceptionIfArguementIsEmpty(argumentList);
  String uri="String_Node_Str";
  String optionName=CommandOption.DOMAIN_SEARCH_BY_NAME.getOption();
  String optionNsLdhName=CommandOption.DOMAIN_SEARCH_BY_NSLDHNAME.getOption();
  String optionNsIp=CommandOption.DOMAIN_SEARCH_BY_NSIP.getOption();
  if (isPrefixedArgument(argumentList.get(0),optionNsLdhName + PARAM_SEPARATOR)) {
    String argumentWithoutPrefix=removePrefix(argumentList.get(0),optionNsLdhName);
    argumentWithoutPrefix=urlEncode(argumentWithoutPrefix);
    uri=uri + optionNsLdhName + "String_Node_Str"+ argumentWithoutPrefix;
    System.out.println(uri);
  }
 else   if (isPrefixedArgument(argumentList.get(0),optionNsIp + PARAM_SEPARATOR)) {
    String argumentWithoutPrefix=removePrefix(argumentList.get(0),optionNsIp);
    argumentWithoutPrefix=urlEncode(argumentWithoutPrefix);
    uri=uri + optionNsIp + "String_Node_Str"+ argumentWithoutPrefix;
  }
 else {
    uri=uri + optionName + "String_Node_Str"+ urlEncode(argumentList.get(0));
  }
  return uri;
}
Program: 37045
Project: 37045
Buggy source:
@Override protected String getRelativeRequestURI(Command command){
  List<String> argumentList=command.getArgumentList();
  throwExceptionIfArguementIsEmpty(argumentList);
  String uri="String_Node_Str";
  String OPTION_FN=CommandOption.ENTITY_SEARCH_FN.getOption();
  String OPTION_HANDLE=CommandOption.ENTITY_SEARCH_HANDLE.getOption();
  if (isPrefixedArgument(argumentList.get(0),OPTION_FN + PARAM_SEPARATOR)) {
    String argumentWithoutPrefix=removePrefix(argumentList.get(0),OPTION_FN);
    argumentWithoutPrefix=urlEncode(argumentWithoutPrefix);
    uri=uri + OPTION_FN + PARAM_SEPARATOR+ argumentWithoutPrefix;
  }
 else   if (isPrefixedArgument(argumentList.get(0),OPTION_HANDLE + PARAM_SEPARATOR)) {
    String argumentWithoutPrefix=removePrefix(argumentList.get(0),OPTION_HANDLE);
    argumentWithoutPrefix=urlEncode(argumentWithoutPrefix);
    uri=uri + OPTION_HANDLE + PARAM_SEPARATOR+ argumentWithoutPrefix;
  }
 else {
    throw new ServiceException("String_Node_Str");
  }
  return uri;
}

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

Fixed version (ground truth):
@Override protected String getRelativeRequestURI(Command command){
  List<String> argumentList=command.getArgumentList();
  throwExceptionIfArguementIsEmpty(argumentList);
  String uri="String_Node_Str";
  String optionIp=CommandOption.NAMESERVER_SEARCH_BY_IP.getOption();
  String optionName=CommandOption.NAMESERVER_SEARCH_BY_NAME.getOption();
  if (isPrefixedArgument(argumentList.get(0),optionIp + PARAM_SEPARATOR)) {
    String argumentWithoutPrefix=removePrefix(argumentList.get(0),optionIp);
    argumentWithoutPrefix=urlEncode(argumentWithoutPrefix);
    uri=uri + optionIp + "String_Node_Str"+ argumentWithoutPrefix;
  }
 else {
    List<String> argumntList=command.getArgumentList();
    throwExceptionIfArguementIsEmpty(argumntList);
    uri=uri + optionName + "String_Node_Str"+ urlEncode(argumntList.get(0));
  }
  return uri;
}
Program: 37047
Project: 37047
Buggy source:
/** 
 * write response for responseEntity.
 * @param responseEntity response entity for error message.
 * @param response HttpServletResponse.
 * @throws IOException IOException.
 */
public static void writeResponse(ResponseEntity responseEntity,HttpServletResponse response) throws IOException {
  response.setHeader("String_Node_Str","String_Node_Str");
  HttpHeaders headers=responseEntity.getHeaders();
  Set<String> headerKeys=headers.keySet();
  for (  String headerKey : headerKeys) {
    List<String> headerValues=headers.get(headerKey);
    for (    String headerValue : headerValues) {
      response.setHeader(headerKey,headerValue);
    }
  }
  response.setCharacterEncoding(StringUtil.CHAR_SET_UTF8);
  PrintWriter writer=response.getWriter();
  response.setStatus(responseEntity.getStatusCode().value());
  String jsonStr=beanToJSON(responseEntity.getBody());
  writer.print(jsonStr);
}

Fixed version (ground truth):
/** 
 * write response for responseEntity.
 * @param responseEntity response entity for error message.
 * @param response HttpServletResponse.
 * @throws IOException IOException.
 */
public static void writeResponse(ResponseEntity responseEntity,HttpServletResponse response) throws IOException {
  response.setHeader("String_Node_Str",RdapProperties.RESPONSE_CONTENT_TYPE);
  HttpHeaders headers=responseEntity.getHeaders();
  Set<String> headerKeys=headers.keySet();
  for (  String headerKey : headerKeys) {
    List<String> headerValues=headers.get(headerKey);
    for (    String headerValue : headerValues) {
      response.setHeader(headerKey,headerValue);
    }
  }
  response.setCharacterEncoding(StringUtil.CHAR_SET_UTF8);
  PrintWriter writer=response.getWriter();
  response.setStatus(responseEntity.getStatusCode().value());
  String jsonStr=beanToJSON(responseEntity.getBody());
  writer.print(jsonStr);
}
Program: 37048
Project: 37048
Buggy source:
/** 
 * create error response.
 * @param errorStatus HttpStatus of error message
 * @return ResponseEntity
 */
public static ResponseEntity<ErrorMessage> createCommonErrorResponse(HttpStatus errorStatus){
  ErrorMessage errorMessage=getErrorMessageByErrorCode(errorStatus.toString());
  HttpHeaders headers=generateCrossOriginHeader();
  ResponseEntity<ErrorMessage> responseEntity=new ResponseEntity<ErrorMessage>(errorMessage,headers,errorStatus);
  queryFilterManager.postQuery(null,responseEntity,queryFilters);
  return responseEntity;
}

Fixed version (ground truth):
/** 
 * create error response.
 * @param errorStatus HttpStatus of error message
 * @return ResponseEntity
 */
public static ResponseEntity<ErrorMessage> createCommonErrorResponse(HttpStatus errorStatus){
  ErrorMessage errorMessage=getErrorMessageByErrorCode(errorStatus.toString());
  HttpHeaders headers=generateContentTypeAndCrossOriginHeader();
  ResponseEntity<ErrorMessage> responseEntity=new ResponseEntity<ErrorMessage>(errorMessage,headers,errorStatus);
  queryFilterManager.postQuery(null,responseEntity,queryFilters);
  return responseEntity;
}
Program: 37049
Project: 37049
Buggy source:
/** 
 * create response with HTTP status code 200.
 * @param response model T of response.
 * @param < T > a model
 * @return ResponseEntity<T> ResponseEntity model.
 */
public static <T>ResponseEntity<T> createResponse200(T response){
  HttpHeaders headers=generateCrossOriginHeader();
  return new ResponseEntity<T>(response,headers,HttpStatus.OK);
}

Fixed version (ground truth):
/** 
 * create response with HTTP status code 200.
 * @param response model T of response.
 * @param < T > a model
 * @return ResponseEntity<T> ResponseEntity model.
 */
public static <T>ResponseEntity<T> createResponse200(T response){
  HttpHeaders headers=generateContentTypeAndCrossOriginHeader();
  return new ResponseEntity<T>(response,headers,HttpStatus.OK);
}
Program: 37050
Project: 37050
Buggy source:
@Override public void validate(QueryParam queryParam,ValidationResult validationResult){
  String q=queryParam.getQ();
  String[] splits=StringUtils.split(q,"String_Node_Str");
  for (  String split : splits) {
    if (2 != StringUtils.indexOf(split,"String_Node_Str")) {
      return;
    }
    if (!IdnaUtil.checkIfValidALabelDomain(q)) {
      validationResult.addError(QueryValidationError.build400Error());
      return;
    }
  }
}

Fixed version (ground truth):
@Override public void validate(QueryParam queryParam,ValidationResult validationResult){
  String q=queryParam.getQ();
  String[] splits=StringUtils.split(q,"String_Node_Str");
  for (  String split : splits) {
    if (2 != StringUtils.indexOf(split,"String_Node_Str")) {
      continue;
    }
    if (!IdnaUtil.checkIfValidALabelDomain(q)) {
      validationResult.addError(QueryValidationError.build400Error());
      return;
    }
  }
}
Program: 37051
Project: 37051
Buggy source:
protected Long findIdByHandle(final String handle,String idColumnName,String tableName){
  final String sql=String.format(TPL_FIND_ID_BY_HANDLE,idColumnName,tableName);
  LOGGER.debug("String_Node_Str",sql);
  List<Long> ids=jdbcTemplate.query(new PreparedStatementCreator(){
    public PreparedStatement createPreparedStatement(    Connection connection) throws SQLException {
      PreparedStatement ps=connection.prepareStatement(sql);
      ps.setString(1,handle);
      return ps;
    }
  }
,new RowMapper<Long>(){
    public Long mapRow(    ResultSet rs,    int rowNum) throws SQLException {
      return rs.getLong("String_Node_Str");
    }
  }
);
  if (ids.size() > 0) {
    return ids.get(0);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * query id by handle.
 * @param handle handle.
 * @param idColumnName idColumnName.
 * @param tableName tableName.
 * @return id
 */
protected Long findIdByHandle(final String handle,String idColumnName,String tableName){
  final String sql=String.format(TPL_FIND_ID_BY_HANDLE,idColumnName,tableName);
  LOGGER.debug("String_Node_Str",sql);
  List<Long> ids=jdbcTemplate.query(new PreparedStatementCreator(){
    public PreparedStatement createPreparedStatement(    Connection connection) throws SQLException {
      PreparedStatement ps=connection.prepareStatement(sql);
      ps.setString(1,handle);
      return ps;
    }
  }
,new RowMapper<Long>(){
    public Long mapRow(    ResultSet rs,    int rowNum) throws SQLException {
      return rs.getLong("String_Node_Str");
    }
  }
);
  if (ids.size() > 0) {
    return ids.get(0);
  }
  return null;
}
Program: 37052
Project: 37052
Buggy source:
protected void delete(final String ids,final String tableName,final String idColumnName){
  final String sql=String.format(TPL_DELETE_BY_ID,tableName,idColumnName,ids);
  jdbcTemplate.update(sql);
}

Fixed version (ground truth):
/** 
 * delete data.
 * @param ids ids.
 * @param tableName table name.
 * @param idColumnName idColumnName.
 */
protected void delete(final String ids,final String tableName,final String idColumnName){
  final String sql=String.format(TPL_DELETE_BY_ID,tableName,idColumnName,ids);
  jdbcTemplate.update(sql);
}
Program: 37053
Project: 37053
Buggy source:
protected void deleteRel(final BaseModel outerModel,String tableName){
  final String sql=String.format(TPL_DELETE_REL_BY_OUTERIDANDTYPE,tableName);
  jdbcTemplate.update(sql,new PreparedStatementSetter(){
    public void setValues(    PreparedStatement ps) throws SQLException {
      ps.setLong(1,outerModel.getId());
      ps.setString(2,outerModel.getObjectType().getName());
    }
  }
);
}

Fixed version (ground truth):
/** 
 * delete relation.
 * @param outerModel outer object. 
 * @param tableName table name.
 */
protected void deleteRel(final BaseModel outerModel,String tableName){
  final String sql=String.format(TPL_DELETE_REL_BY_OUTERIDANDTYPE,tableName);
  jdbcTemplate.update(sql,new PreparedStatementSetter(){
    public void setValues(    PreparedStatement ps) throws SQLException {
      ps.setLong(1,outerModel.getId());
      ps.setString(2,outerModel.getObjectType().getName());
    }
  }
);
}
Program: 37054
Project: 37054
Buggy source:
protected void saveStatus(final T model,final List<String> statusList,String tableName,String outerModelIdColumnName){
  final List<String> notEmptyStatusList=StringUtil.getNotEmptyStringList(statusList);
  if (notEmptyStatusList.isEmpty()) {
    LOGGER.debug("String_Node_Str");
    return;
  }
  String sql=String.format(TPL_CREATE_STATUS,tableName,outerModelIdColumnName);
  jdbcTemplate.batchUpdate(sql,new BatchPreparedStatementSetter(){
    public int getBatchSize(){
      return notEmptyStatusList.size();
    }
    @Override public void setValues(    PreparedStatement ps,    int i) throws SQLException {
      ps.setLong(1,model.getId());
      ps.setString(2,notEmptyStatusList.get(i));
    }
  }
);
}

Fixed version (ground truth):
/** 
 * save status.
 * @param model object derived from BaseModel. 
 * @param statusList status list.
 * @param tableName table name.
 * @param outerModelIdColumnName outerModelIdColumnName.
 */
protected void saveStatus(final T model,final List<String> statusList,String tableName,String outerModelIdColumnName){
  final List<String> notEmptyStatusList=StringUtil.getNotEmptyStringList(statusList);
  if (notEmptyStatusList.isEmpty()) {
    LOGGER.debug("String_Node_Str");
    return;
  }
  String sql=String.format(TPL_CREATE_STATUS,tableName,outerModelIdColumnName);
  jdbcTemplate.batchUpdate(sql,new BatchPreparedStatementSetter(){
    public int getBatchSize(){
      return notEmptyStatusList.size();
    }
    @Override public void setValues(    PreparedStatement ps,    int i) throws SQLException {
      ps.setLong(1,model.getId());
      ps.setString(2,notEmptyStatusList.get(i));
    }
  }
);
}
Program: 37055
Project: 37055
Buggy source:
protected void deleteStatus(final T model,String tableName,String modelIdColumnName){
  if (null == model || null == model.getId()) {
    LOGGER.debug("String_Node_Str");
    return;
  }
  String sql=String.format(TPL_DELETE_STATUS,tableName,modelIdColumnName);
  jdbcTemplate.update(sql,new PreparedStatementSetter(){
    public void setValues(    PreparedStatement ps) throws SQLException {
      ps.setLong(1,model.getId());
    }
  }
);
}

Fixed version (ground truth):
/** 
 * delete status.
 * @param model object extends BaseModel.
 * @param tableName table name.
 * @param modelIdColumnName modelIdColumnName.
 */
protected void deleteStatus(final T model,String tableName,String modelIdColumnName){
  if (null == model || null == model.getId()) {
    LOGGER.debug("String_Node_Str");
    return;
  }
  String sql=String.format(TPL_DELETE_STATUS,tableName,modelIdColumnName);
  jdbcTemplate.update(sql,new PreparedStatementSetter(){
    public void setValues(    PreparedStatement ps) throws SQLException {
      ps.setLong(1,model.getId());
    }
  }
);
}
Program: 37056
Project: 37056
Buggy source:
protected List<Long> findIdsByOuterIdAndType(final BaseModel outerModel,String idColumnName,String tableName){
  final String sql=String.format(TPL_FINDIDS_BY_OUTERIDANDTYPE,idColumnName,tableName);
  LOGGER.debug("String_Node_Str",sql);
  List<Long> ids=jdbcTemplate.query(new PreparedStatementCreator(){
    public PreparedStatement createPreparedStatement(    Connection connection) throws SQLException {
      PreparedStatement ps=connection.prepareStatement(sql);
      ps.setLong(1,outerModel.getId());
      ps.setString(2,outerModel.getObjectType().getName());
      return ps;
    }
  }
,new RowMapper<Long>(){
    public Long mapRow(    ResultSet rs,    int rowNum) throws SQLException {
      return rs.getLong("String_Node_Str");
    }
  }
);
  if (ids.size() > 0) {
    return ids;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * query id by outer id and type.
 * @param outerModel outer object.
 * @param idColumnName idColumnName.
 * @param tableName tableName. 
 * @return  id list
 */
protected List<Long> findIdsByOuterIdAndType(final BaseModel outerModel,String idColumnName,String tableName){
  final String sql=String.format(TPL_FINDIDS_BY_OUTERIDANDTYPE,idColumnName,tableName);
  LOGGER.debug("String_Node_Str",sql);
  List<Long> ids=jdbcTemplate.query(new PreparedStatementCreator(){
    public PreparedStatement createPreparedStatement(    Connection connection) throws SQLException {
      PreparedStatement ps=connection.prepareStatement(sql);
      ps.setLong(1,outerModel.getId());
      ps.setString(2,outerModel.getObjectType().getName());
      return ps;
    }
  }
,new RowMapper<Long>(){
    public Long mapRow(    ResultSet rs,    int rowNum) throws SQLException {
      return rs.getLong("String_Node_Str");
    }
  }
);
  if (ids.size() > 0) {
    return ids;
  }
  return null;
}
Program: 37057
Project: 37057
Buggy source:
void updateRel(BaseModel outerModel);

Fixed version (ground truth):
/** 
 * update the relation between entity and other object.
 * @param outerModel outer object.
 */
void updateRel(BaseModel outerModel);
Program: 37058
Project: 37058
Buggy source:
void saveAsInnerObjects(BaseModel outerModel,List<DTO> models);

Fixed version (ground truth):
/** 
 * save model list, as nested models of other Model.
 * @param outerModel outer object.
 * @param models object list.
 */
void saveAsInnerObjects(BaseModel outerModel,List<DTO> models);
Program: 37059
Project: 37059
Buggy source:
void updateAsInnerObjects(BaseModel outerModel,List<DTO> models);

Fixed version (ground truth):
/** 
 * update model list, as nested models of other Model.
 * @param outerModel outer object.
 * @param models object list.
 */
void updateAsInnerObjects(BaseModel outerModel,List<DTO> models);
Program: 37060
Project: 37060
Buggy source:
T save(T model);

Fixed version (ground truth):
/** 
 * save method.
 * @param model model.
 * @return object.
 */
T save(T model);
Program: 37061
Project: 37061
Buggy source:
Long findIdByHandle(String handle);

Fixed version (ground truth):
/** 
 * @param handle handle.
 * @return long
 */
Long findIdByHandle(String handle);
Program: 37062
Project: 37062
Buggy source:
void update(T model);

Fixed version (ground truth):
/** 
 * update method.
 * @param model model
 */
void update(T model);
Program: 37063
Project: 37063
Buggy source:
void delete(T model);

Fixed version (ground truth):
/** 
 * delete method.
 * @param model model.
 */
void delete(T model);
Program: 37064
Project: 37064
Buggy source:
void deleteRel(BaseModel outerModel);

Fixed version (ground truth):
/** 
 * delete the relation between entity and other object
 * @param outerModel outer object.
 */
void deleteRel(BaseModel outerModel);
Program: 37065
Project: 37065
Buggy source:
void saveStatus(T model);

Fixed version (ground truth):
/** 
 * save status.
 * @param model model.
 */
void saveStatus(T model);
Program: 37066
Project: 37066
Buggy source:
void updateStatus(T model);

Fixed version (ground truth):
/** 
 * update status.
 * @param model model.
 */
void updateStatus(T model);
Program: 37067
Project: 37067
Buggy source:
void deleteStatus(T model);

Fixed version (ground truth):
/** 
 * delete status.
 * @param model model.
 */
void deleteStatus(T model);
Program: 37068
Project: 37068
Buggy source:
void deleteAsInnerObjects(BaseModel outerModel);

Fixed version (ground truth):
/** 
 * delete model list, as nested models of other Model.
 * @param outerModel outer object.
 */
void deleteAsInnerObjects(BaseModel outerModel);
Program: 37069
Project: 37069
Buggy source:
void saveRel(BaseModel outerModel);

Fixed version (ground truth):
/** 
 * save the relation between entity and other object.
 * @param outerModel outer object.
 */
void saveRel(BaseModel outerModel);
Program: 37070
Project: 37070
Buggy source:
/** 
 * check if is update URI.
 * @param uri URI.
 * @return true if is update URI, false if not.
 */
public static boolean isUpdateUri(HttpServletRequest request){
  String uri=request.getRequestURI();
  String contextPath=request.getContextPath();
  if (StringUtils.equals(contextPath,"String_Node_Str")) {
    contextPath=StringUtils.EMPTY;
  }
  return StringUtils.startsWith(uri,contextPath + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * check if is update URI.
 * @param request HttpServletRequest.
 * @return true if is update URI, false if not.
 */
public static boolean isUpdateUri(HttpServletRequest request){
  String uri=request.getRequestURI();
  String contextPath=request.getContextPath();
  if (StringUtils.equals(contextPath,"String_Node_Str")) {
    contextPath=StringUtils.EMPTY;
  }
  return StringUtils.startsWith(uri,contextPath + "String_Node_Str");
}
Program: 37071
Project: 37071
Buggy source:
/** 
 * create autnum.
 * @param autnumDto autnumDto
 * @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 AutnumDto autnumDto,HttpServletRequest request){
  LOGGER.debug("String_Node_Str");
  UpdateResponse response=createService.execute(autnumDto);
  return RestResponse.createUpdateResponse(response);
}

Fixed version (ground truth):
/** 
 * create as number.
 * @param autnumDto autnumDto
 * @param request HttpServletRequest
 * @return JSON formated result,with HTTP code.
 */
@SuppressWarnings("String_Node_Str") @RequestMapping(value={"String_Node_Str"},method=RequestMethod.POST) @ResponseBody public ResponseEntity create(@RequestBody AutnumDto autnumDto,HttpServletRequest request){
  LOGGER.debug("String_Node_Str");
  UpdateResponse response=createService.execute(autnumDto);
  return RestResponse.createUpdateResponse(response);
}
Program: 37072
Project: 37072
Buggy source:
/** 
 * update autnum.
 * @param autnumDto autnumDto
 * @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 AutnumDto autnumDto,@PathVariable String handle,HttpServletRequest request){
  LOGGER.debug("String_Node_Str");
  autnumDto.setHandle(handle);
  UpdateResponse response=updateService.execute(autnumDto);
  return RestResponse.createUpdateResponse(response);
}

Fixed version (ground truth):
/** 
 * update as number.
 * @param autnumDto autnumDto
 * @param handle handle
 * @param request HttpServletRequest
 * @return JSON formated result,with HTTP code.
 */
@SuppressWarnings("String_Node_Str") @RequestMapping(value={"String_Node_Str"},method=RequestMethod.PUT) @ResponseBody public ResponseEntity update(@RequestBody AutnumDto autnumDto,@PathVariable String handle,HttpServletRequest request){
  LOGGER.debug("String_Node_Str");
  autnumDto.setHandle(handle);
  UpdateResponse response=updateService.execute(autnumDto);
  return RestResponse.createUpdateResponse(response);
}
Program: 37073
Project: 37073
Buggy source:
/** 
 * delete autnum.
 * @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");
  AutnumDto dto=new AutnumDto();
  dto.setHandle(handle);
  UpdateResponse response=deleteService.execute(dto);
  return RestResponse.createUpdateResponse(response);
}

Fixed version (ground truth):
/** 
 * delete as number.
 * @param handle handle
 * @param request HttpServletRequest
 * @return JSON formated result,with HTTP code.
 */
@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");
  AutnumDto dto=new AutnumDto();
  dto.setHandle(handle);
  UpdateResponse response=deleteService.execute(dto);
  return RestResponse.createUpdateResponse(response);
}
Program: 37074
Project: 37074
Buggy source:
/** 
 * @param typeStr typeStr.
 * @param fieldName fieldName.
 * @param validationResult validationResult.
 */
protected void checkDomainTypeNotEmptyAndValid(String typeStr,ValidationResult validationResult){
  String fieldName="String_Node_Str";
  checkNotEmpty(typeStr,fieldName,validationResult);
  checkDomainTypeValid(typeStr,fieldName,validationResult);
}

Fixed version (ground truth):
/** 
 * @param typeStr typeStr.
 * @param validationResult validationResult.
 */
protected void checkDomainTypeNotEmptyAndValid(String typeStr,ValidationResult validationResult){
  String fieldName="String_Node_Str";
  checkNotEmpty(typeStr,fieldName,validationResult);
  checkDomainTypeValid(typeStr,fieldName,validationResult);
}
Program: 37075
Project: 37075
Buggy source:
/** 
 * extract telephone from ResultSet.
 * @param rs ResultSet.
 * @param entityTel entityTel.
 * @return EntityTelephone EntityTelephone.
 * @throws SQLException SQLException.
 */
private EntityTelephone extractEntityTelFromRs(ResultSet rs) throws SQLException {
  EntityTelephone telephone=EntityTelephone.buildTextTel(rs.getString("String_Node_Str"),rs.getString("String_Node_Str"));
  telephone.setTypes(rs.getString("String_Node_Str"));
  telephone.setPref(getIntegerFromRs(rs,"String_Node_Str"));
  return telephone;
}

Fixed version (ground truth):
/** 
 * extract telephone from ResultSet.
 * @param rs ResultSet.
 * @return EntityTelephone EntityTelephone.
 * @throws SQLException SQLException.
 */
private EntityTelephone extractEntityTelFromRs(ResultSet rs) throws SQLException {
  EntityTelephone telephone=EntityTelephone.buildTextTel(rs.getString("String_Node_Str"),rs.getString("String_Node_Str"));
  telephone.setTypes(rs.getString("String_Node_Str"));
  telephone.setPref(getIntegerFromRs(rs,"String_Node_Str"));
  return telephone;
}
Program: 37076
Project: 37076
Buggy source:
/** 
 * build telephone URI.
 * @param tel tel.
 * @param vcard vcard.
 * @return TelUri list if tel number is valid, return null if not.
 */
private void addTelephoneToVcard(EntityTelephone tel,VCard vcard){
  if (tel.isEmpty()) {
    return;
  }
  try {
    Builder telBuilder=new TelUri.Builder(tel.getNumber());
    if (StringUtils.isNotBlank(tel.getExtNumber())) {
      telBuilder.extension(tel.getExtNumber());
    }
    TelUri telUri=telBuilder.build();
    Telephone telephone=new Telephone(telUri);
    List<TelephoneType> types=parseTelephoneTypes(tel.getTypes());
    for (    TelephoneType type : types) {
      telephone.addType(type);
    }
    addPref(tel,telephone);
    vcard.addTelephoneNumber(telephone);
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str",e.getMessage(),tel);
  }
}

Fixed version (ground truth):
/** 
 * build telephone URI.
 * @param tel tel.
 * @param vcard vcard.
 */
private void addTelephoneToVcard(EntityTelephone tel,VCard vcard){
  if (tel.isEmpty()) {
    return;
  }
  try {
    Builder telBuilder=new TelUri.Builder(tel.getNumber());
    if (StringUtils.isNotBlank(tel.getExtNumber())) {
      telBuilder.extension(tel.getExtNumber());
    }
    TelUri telUri=telBuilder.build();
    Telephone telephone=new Telephone(telUri);
    List<TelephoneType> types=parseTelephoneTypes(tel.getTypes());
    for (    TelephoneType type : types) {
      telephone.addType(type);
    }
    addPref(tel,telephone);
    vcard.addTelephoneNumber(telephone);
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str",e.getMessage(),tel);
  }
}
Program: 37077
Project: 37077
Buggy source:
protected Network convertDtoToModelWithoutIpVersion(IpDto dto){
  Network network=convertDtoToNetwork(dto);
  super.convertCustomProperties(dto,network);
  return network;
}

Fixed version (ground truth):
/** 
 * convert DTO to model without ip version.
 * @param dto dto.
 * @return Network.
 */
protected Network convertDtoToModelWithoutIpVersion(IpDto dto){
  Network network=convertDtoToNetwork(dto);
  super.convertCustomProperties(dto,network);
  return network;
}
Program: 37078
Project: 37078
Buggy source:
private Network convertDtoToNetwork(IpDto dto){
  Network network=new Network();
  BeanUtil.copyProperties(dto,network,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  return network;
}

Fixed version (ground truth):
/** 
 * convert DTO to network.
 * @param dto dto.
 * @return Network.
 */
private Network convertDtoToNetwork(IpDto dto){
  Network network=new Network();
  BeanUtil.copyProperties(dto,network,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  return network;
}
Program: 37079
Project: 37079
Buggy source:
protected ValidationResult validateWithoutIpVersion(IpDto dto,ValidationResult validationResult){
  LOGGER.debug("String_Node_Str");
  checkIpNotEmptyAndValid(dto.getStartAddress(),validationResult,"String_Node_Str");
  checkIpNotEmptyAndValid(dto.getEndAddress(),validationResult,"String_Node_Str");
  checkMaxLength(dto.getName(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getType(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getCountry(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getParentHandle(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkNotEmptyAndMaxLength(dto.getCidr(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkNotEmptyAndMaxLengthForHandle(dto.getHandle(),validationResult);
  validateBaseDto(dto,validationResult);
  return validationResult;
}

Fixed version (ground truth):
/** 
 * validate without IP version.
 * @param dto dto.
 * @param validationResult validationResult.
 * @return validationResult.
 */
protected ValidationResult validateWithoutIpVersion(IpDto dto,ValidationResult validationResult){
  LOGGER.debug("String_Node_Str");
  checkIpNotEmptyAndValid(dto.getStartAddress(),validationResult,"String_Node_Str");
  checkIpNotEmptyAndValid(dto.getEndAddress(),validationResult,"String_Node_Str");
  checkMaxLength(dto.getName(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getType(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getCountry(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getParentHandle(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkNotEmptyAndMaxLength(dto.getCidr(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkNotEmptyAndMaxLengthForHandle(dto.getHandle(),validationResult);
  validateBaseDto(dto,validationResult);
  return validationResult;
}
Program: 37080
Project: 37080
Buggy source:
private void checkIpNotEmptyAndValid(String ip,ValidationResult validationResult,String fieldName){
  checkNotEmpty(ip,fieldName,validationResult);
  checkIp(ip,fieldName,validationResult);
}

Fixed version (ground truth):
/** 
 * check if IP is notEmpty and valid.
 * @param ip IP.
 * @param validationResult validationResult.
 * @param fieldName fieldName.
 */
private void checkIpNotEmptyAndValid(String ip,ValidationResult validationResult,String fieldName){
  checkNotEmpty(ip,fieldName,validationResult);
  checkIp(ip,fieldName,validationResult);
}
Program: 37081
Project: 37081
Buggy source:
/** 
 * batch create DsData.
 * @param outerModel outer object	 
 * @param models DsData of outer Object
 */
@Override public void saveAsInnerObjects(BaseModel outerModel,List<DsDataDto> models){
  if (null == models || models.size() == 0) {
    return;
  }
  for (  DsDataDto model : models) {
    Long dsDataId=createDsData(model);
    secureDnsUpdateDao.createRelSecureDnsDskey(outerModel.getId(),ModelType.DSDATA,dsDataId);
    DsData dsDataAsOuter=new DsData();
    dsDataAsOuter.setId(dsDataId);
    linkUpdateDao.saveAsInnerObjects(dsDataAsOuter,model.getLinks());
    eventUpdateDao.saveAsInnerObjects(dsDataAsOuter,model.getEvents());
  }
}

Fixed version (ground truth):
/** 
 * batch create DsData.
 * @param outerModel outer object
 * @param models DsData of outer Object
 */
@Override public void saveAsInnerObjects(BaseModel outerModel,List<DsDataDto> models){
  if (null == models || models.size() == 0) {
    return;
  }
  for (  DsDataDto model : models) {
    Long dsDataId=createDsData(model);
    secureDnsUpdateDao.createRelSecureDnsDskey(outerModel.getId(),ModelType.DSDATA,dsDataId);
    DsData dsDataAsOuter=new DsData();
    dsDataAsOuter.setId(dsDataId);
    linkUpdateDao.saveAsInnerObjects(dsDataAsOuter,model.getLinks());
    eventUpdateDao.saveAsInnerObjects(dsDataAsOuter,model.getEvents());
  }
}
Program: 37082
Project: 37082
Buggy source:
/** 
 * @param dto dto.
 * @return Autnum.
 */
private Autnum convertDtoToAutnum(AutnumDto dto){
  Autnum autnum=new Autnum();
  BeanUtil.copyProperties(dto,autnum,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  return autnum;
}

Fixed version (ground truth):
/** 
 * covert autnumDto to autnum.
 * @param dto dto.
 * @return Autnum.
 */
private Autnum convertDtoToAutnum(AutnumDto dto){
  Autnum autnum=new Autnum();
  BeanUtil.copyProperties(dto,autnum,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  return autnum;
}
Program: 37083
Project: 37083
Buggy source:
/** 
 * @param dto autnumdto.
 * @return Autnum.
 */
protected Autnum convertDtoToModel(AutnumDto dto){
  Autnum autnum=convertDtoToAutnum(dto);
  super.convertCustomProperties(dto,autnum);
  return autnum;
}

Fixed version (ground truth):
/** 
 * covert autnumDto to autnum. meantime covert custom properties.
 * @param dto autnumdto.
 * @return Autnum.
 */
protected Autnum convertDtoToModel(AutnumDto dto){
  Autnum autnum=convertDtoToAutnum(dto);
  super.convertCustomProperties(dto,autnum);
  return autnum;
}
Program: 37084
Project: 37084
Buggy source:
/** 
 * @param dto dto.
 * @param validationResult validationResult.
 * @return ValidationResult.
 */
protected ValidationResult validateForSaveAndUpdate(AutnumDto dto,ValidationResult validationResult){
  LOGGER.debug("String_Node_Str");
  checkNotNullAndMinMaxBigInt(dto.getStartAutnum(),"String_Node_Str",validationResult);
  checkNotNullAndMinMaxBigInt(dto.getEndAutnum(),"String_Node_Str",validationResult);
  checkMaxLength(dto.getName(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getType(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getCountry(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkNotEmptyAndMaxLengthForHandle(dto.getHandle(),validationResult);
  validateBaseDto(dto,validationResult);
  return validationResult;
}

Fixed version (ground truth):
/** 
 * validate dto. 
 * @param dto dto.
 * @param validationResult validationResult.
 * @return ValidationResult.
 */
protected ValidationResult validateForSaveAndUpdate(AutnumDto dto,ValidationResult validationResult){
  LOGGER.debug("String_Node_Str");
  checkNotNullAndMinMaxBigInt(dto.getStartAutnum(),"String_Node_Str",validationResult);
  checkNotNullAndMinMaxBigInt(dto.getEndAutnum(),"String_Node_Str",validationResult);
  checkMaxLength(dto.getName(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getType(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkMaxLength(dto.getCountry(),MAX_LENGTH_255,"String_Node_Str",validationResult);
  checkNotEmptyAndMaxLengthForHandle(dto.getHandle(),validationResult);
  validateBaseDto(dto,validationResult);
  return validationResult;
}
Program: 37085
Project: 37085
Buggy source:
/** 
 * create.
 * @param domainDto domainDto.
 * @param request request.
 * @return ResponseEntity.
 */
@SuppressWarnings("String_Node_Str") @RequestMapping(value={"String_Node_Str"},method=RequestMethod.POST) @ResponseBody public ResponseEntity create(@RequestBody DomainDto domainDto,HttpServletRequest request){
  LOGGER.debug("String_Node_Str");
  UpdateResponse response=createService.execute(domainDto);
  return RestResponse.createUpdateResponse(response);
}

Fixed version (ground truth):
/** 
 * create domain.
 * @param domainDto domainDto.
 * @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 DomainDto domainDto,HttpServletRequest request){
  LOGGER.debug("String_Node_Str");
  UpdateResponse response=createService.execute(domainDto);
  return RestResponse.createUpdateResponse(response);
}
Program: 37086
Project: 37086
Buggy source:
/** 
 * @param domainDto domainDto.
 * @param handle handle.
 * @param request request.
 * @return ResponseEntity.
 */
@SuppressWarnings("String_Node_Str") @RequestMapping(value={"String_Node_Str"},method=RequestMethod.PUT) @ResponseBody public ResponseEntity update(@RequestBody DomainDto domainDto,@PathVariable String handle,HttpServletRequest request){
  LOGGER.debug("String_Node_Str");
  domainDto.setHandle(handle);
  UpdateResponse response=updateService.execute(domainDto);
  return RestResponse.createUpdateResponse(response);
}

Fixed version (ground truth):
/** 
 * update domain.
 * @param domainDto domainDto.
 * @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 DomainDto domainDto,@PathVariable String handle,HttpServletRequest request){
  LOGGER.debug("String_Node_Str");
  domainDto.setHandle(handle);
  UpdateResponse response=updateService.execute(domainDto);
  return RestResponse.createUpdateResponse(response);
}
Program: 37087
Project: 37087
Buggy source:
/** 
 * @param handle handle.
 * @param request request.
 * @return 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");
  DomainDto dto=new DomainDto();
  dto.setHandle(handle);
  UpdateResponse response=deleteService.execute(dto);
  return RestResponse.createUpdateResponse(response);
}

Fixed version (ground truth):
/** 
 * delete domain.
 * @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");
  DomainDto dto=new DomainDto();
  dto.setHandle(handle);
  UpdateResponse response=deleteService.execute(dto);
  return RestResponse.createUpdateResponse(response);
}
Program: 37088
Project: 37088
Buggy source:
/** 
 * batch create link.
 * @param outerModel outer object
 * @param models links of outer Object
 */
@Override public void saveAsInnerObjects(final BaseModel outerModel,final List<EntityAddressDto> models){
  if (null == models || models.size() == 0) {
    return;
  }
  final List<EntityAddressDto> notEmptyModels=getNotEmptyList(models);
  final String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  jdbcTemplate.batchUpdate(sql,new BatchPreparedStatementSetter(){
    public int getBatchSize(){
      return notEmptyModels.size();
    }
    @Override public void setValues(    PreparedStatement ps,    int i) throws SQLException {
      EntityAddressDto model=notEmptyModels.get(i);
      ps.setString(1,model.getPostbox());
      ps.setString(2,model.getExtendedAddress());
      ps.setString(3,model.getStreetAddress());
      ps.setString(4,model.getLocality());
      ps.setString(5,model.getRegion());
      ps.setString(6,model.getPostalcode());
      ps.setString(7,model.getCountry());
      ps.setLong(8,outerModel.getId());
      ps.setString(9,model.getTypes());
      ps.setLong(10,model.getPref());
    }
  }
);
}

Fixed version (ground truth):
/** 
 * create entityAddress.
 * @param outerModel outer object.
 * @param models entityAddressDto.
 */
@Override public void saveAsInnerObjects(final BaseModel outerModel,final List<EntityAddressDto> models){
  if (null == models || models.size() == 0) {
    return;
  }
  final List<EntityAddressDto> notEmptyModels=getNotEmptyList(models);
  final String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  jdbcTemplate.batchUpdate(sql,new BatchPreparedStatementSetter(){
    public int getBatchSize(){
      return notEmptyModels.size();
    }
    @Override public void setValues(    PreparedStatement ps,    int i) throws SQLException {
      EntityAddressDto model=notEmptyModels.get(i);
      ps.setString(1,model.getPostbox());
      ps.setString(2,model.getExtendedAddress());
      ps.setString(3,model.getStreetAddress());
      ps.setString(4,model.getLocality());
      ps.setString(5,model.getRegion());
      ps.setString(6,model.getPostalcode());
      ps.setString(7,model.getCountry());
      ps.setLong(8,outerModel.getId());
      ps.setString(9,model.getTypes());
      ps.setLong(10,model.getPref());
    }
  }
);
}
Program: 37089
Project: 37089
Buggy source:
/** 
 * @param entityAddressList entityAddressList
 * @return notEmptyList
 */
private List<EntityAddressDto> getNotEmptyList(List<EntityAddressDto> entityAddressList){
  List<EntityAddressDto> notEmptyList=new ArrayList<EntityAddressDto>();
  if (null == entityAddressList) {
    return notEmptyList;
  }
  for (  EntityAddressDto entityAddress : entityAddressList) {
    if (StringUtils.isNotBlank(entityAddress.getExtendedAddress()) || StringUtils.isNotBlank(entityAddress.getCountry()) || StringUtils.isNotBlank(entityAddress.getLocality())|| StringUtils.isNotBlank(entityAddress.getPostalcode())|| StringUtils.isNotBlank(entityAddress.getPostbox())|| StringUtils.isNotBlank(entityAddress.getRegion())|| StringUtils.isNotBlank(entityAddress.getStreetAddress())) {
      notEmptyList.add(entityAddress);
    }
  }
  return notEmptyList;
}

Fixed version (ground truth):
/** 
 * get not empty entityAddressDto list.
 * @param entityAddressList entityAddressList
 * @return notEmptyList
 */
private List<EntityAddressDto> getNotEmptyList(List<EntityAddressDto> entityAddressList){
  List<EntityAddressDto> notEmptyList=new ArrayList<EntityAddressDto>();
  if (null == entityAddressList) {
    return notEmptyList;
  }
  for (  EntityAddressDto entityAddress : entityAddressList) {
    if (StringUtils.isNotBlank(entityAddress.getExtendedAddress()) || StringUtils.isNotBlank(entityAddress.getCountry()) || StringUtils.isNotBlank(entityAddress.getLocality())|| StringUtils.isNotBlank(entityAddress.getPostalcode())|| StringUtils.isNotBlank(entityAddress.getPostbox())|| StringUtils.isNotBlank(entityAddress.getRegion())|| StringUtils.isNotBlank(entityAddress.getStreetAddress())) {
      notEmptyList.add(entityAddress);
    }
  }
  return notEmptyList;
}
Program: 37090
Project: 37090
Buggy source:
/** 
 * batch create link.
 * @param outerModel outer object
 * @param models links of outer Object
 */
@Override public void saveAsInnerObjects(final BaseModel outerModel,final List<EntityTelephoneDto> models){
  if (null == models || models.size() == 0) {
    return;
  }
  final List<EntityTelephoneDto> notEmptyModels=getNotEmptyList(models);
  final String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str";
  jdbcTemplate.batchUpdate(sql,new BatchPreparedStatementSetter(){
    public int getBatchSize(){
      return notEmptyModels.size();
    }
    @Override public void setValues(    PreparedStatement ps,    int i) throws SQLException {
      EntityTelephoneDto model=notEmptyModels.get(i);
      ps.setString(1,model.getTypes());
      ps.setString(2,model.getNumber());
      ps.setString(3,model.getExtNumber());
      ps.setLong(4,outerModel.getId());
      ps.setLong(5,model.getPref());
    }
  }
);
}

Fixed version (ground truth):
/** 
 * create entity telephone.
 * @param outerModel outer object.
 * @param models entityTelephoneDto.
 */
@Override public void saveAsInnerObjects(final BaseModel outerModel,final List<EntityTelephoneDto> models){
  if (null == models || models.size() == 0) {
    return;
  }
  final List<EntityTelephoneDto> notEmptyModels=getNotEmptyList(models);
  final String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str";
  jdbcTemplate.batchUpdate(sql,new BatchPreparedStatementSetter(){
    public int getBatchSize(){
      return notEmptyModels.size();
    }
    @Override public void setValues(    PreparedStatement ps,    int i) throws SQLException {
      EntityTelephoneDto model=notEmptyModels.get(i);
      ps.setString(1,model.getTypes());
      ps.setString(2,model.getNumber());
      ps.setString(3,model.getExtNumber());
      ps.setLong(4,outerModel.getId());
      ps.setLong(5,model.getPref());
    }
  }
);
}