<commit_before>package org.itevents.mapper;

import org.apache.ibatis.annotations.*;
import org.itevents.model.City;
import org.itevents.model.Location;

public interface CityMapper {
    @Results(value = {
            @Result(property = "id", column = "id"),
            @Result(property = "name", column = "name"),
            @Result(property = "location", javaType = Location.class,
                    column = "id", one = @One(select = "org.itevents.mapper.LocationMapper.getCityLocation"))
    })
    @Select("SELECT id, name FROM cities WHERE id = #{id}")
    City getCity(int id);

    @Insert("INSERT INTO cities(id, name, point) VALUES(#{id}, #{name}, #{point}")
    void addCity(City city);

    @Update("UPDATE cities SET id=#{id}, name=#{name}, point=#{point} WHERE id =#{id}")<commit_msg>fix CityMapper<commit_after>package org.itevents.mapper;

import org.apache.ibatis.annotations.*;
import org.itevents.model.City;
import org.itevents.model.Location;

public interface CityMapper {
    @Results(value = {
            @Result(property = "id", column = "id"),
            @Result(property = "name", column = "name"),
            @Result(property = "location", javaType = Location.class,
                    column = "id", one = @One(select = "org.itevents.mapper.LocationMapper.getCityLocation"))
    })
    @Select("SELECT id, name FROM cities WHERE id = #{id}")
    City getCity(int id);

    @Insert("INSERT INTO cities(id, name, point) " +
            "VALUES(#{id}, #{name}, ST_MakePoint(#{location.longitude},#{location.latitude}")
    void addCity(City city);

    @Update("UPDATE cities SET id=#{id}, name=#{name}, point=ST_MakePoint(#{location.longitude},#{location.latitude} " +
            "WHERE id =#{id}")
{'fraction_non_alphanumeric': 0.1659942363112392, 'fraction_numerical': 0.0, 'mean_word_length': 3.4512820512820515, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '13954', 'n_tokens_mistral': 532, 'n_tokens_neox': 525, 'n_words': 120}