<commit_before>package com.netcracker.repositories.impl;

import com.netcracker.entities.City;
import com.netcracker.queries.IQueriesRepository;
import com.netcracker.repositories.IRepository;
import com.netcracker.repositories.rowmappers.CityRowMapper;
import com.netcracker.specifications.Specification;
import com.netcracker.specifications.SqlSpecification;
import oracle.net.aso.q;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;

import java.util.List;

/**
 * Created by dima_2 on 30.11.2016.
 */
public class CityRepositoryImpl implements IRepository<City> {

    private final static Logger LOGGER = LogManager.getLogger(CountryRepositoryImpl.class.getName());

    @Autowired
    private JdbcTemplate template;

    @Autowired
    private CityRowMapper cityRowMapper;

    public void add(City item) {

        String query = IQueriesRepository.INSERT_CITY;
        int out = template.update(query, new Object[]{item.getState().getId(), item.getName()});
        if(out == 0) {
            LOGGER.warn("Cannot insert " + item.toString());
        }
    }

    @Override
    public void update(City item) {
<commit_msg>corrected class name in logger<commit_after>package com.netcracker.repositories.impl;

import com.netcracker.entities.City;
import com.netcracker.queries.IQueriesRepository;
import com.netcracker.repositories.IRepository;
import com.netcracker.repositories.rowmappers.CityRowMapper;
import com.netcracker.specifications.Specification;
import com.netcracker.specifications.SqlSpecification;
import oracle.net.aso.q;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;

import java.util.List;

/**
 * Created by dima_2 on 30.11.2016.
 */
public class CityRepositoryImpl implements IRepository<City> {

    private final static Logger LOGGER = LogManager.getLogger(CityRepositoryImpl.class.getName());

    @Autowired
    private JdbcTemplate template;

    @Autowired
    private CityRowMapper cityRowMapper;

    public void add(City item) {

        String query = IQueriesRepository.INSERT_CITY;
        int out = template.update(query, new Object[]{item.getState().getId(), item.getName()});
        if(out == 0) {
            LOGGER.warn("Cannot insert " + item.toString());
        }
    }

    @Override
    public void update(City item) {

{'fraction_non_alphanumeric': 0.10252365930599369, 'fraction_numerical': 0.00946372239747634, 'mean_word_length': 4.318658280922432, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1467489', 'n_tokens_mistral': 769, 'n_tokens_neox': 750, 'n_words': 150}