<commit_before>package com.xyz.coolweather.util;

import android.text.TextUtils;

import com.xyz.coolweather.model.City;
import com.xyz.coolweather.model.CoolWeatherDB;
import com.xyz.coolweather.model.County;
import com.xyz.coolweather.model.Province;

import org.w3c.dom.Text;

/**
 * Created by yesgxy520 on 6/1/2016.
 */
public class Utility {
    public synchronized static boolean handleProvincesResponse(CoolWeatherDB coolWeatherDB, String response){
        if(!TextUtils.isEmpty(response)){
            String[] allProvinces=response.split(",");
            if(allProvinces!=null && allProvinces.length>0){
                for(String p:allProvinces){
                    String[] array=p.split("\\|");
                    Province province=new Province();
                    province.setProvinceCode(array[0]);
                    province.setProvinceName(array[1]);
                    coolWeatherDB.saveProvince(province);
                }
                return true;
            }
        }
        return false;
    }

    public static boolean handleCitiesResponse(CoolWeatherDB coolWeatherDB, String response, int provinceId){
        if(!TextUtils.isEmpty(response)){
            String[] allCities=response.split(",");
            if(allCities!=null && allCities.length>0){
                for(String c:allCities){
                    String[] array=c.split("\\|");
                    City city=new City();
                    city.setCityCode(array[0]);
                    city.setCityName(array[1]);
                    city.setProvinceId(provinceId);
                    coolWeatherDB.saveCity(city);
                }
                return true;
            }
        }
        return false;
    }

    public static boolean handleCountiesResponse(CoolWeatherDB coolWeatherDB,String response,int cityId){
        if(!TextUtils.isEmpty(response)){
            String[] allCounties=response.split(",");
            if(allCounties!=null && allCounties.length>0){
                for(String c:allCounties){
                    String[] array=c.split("\\|");
                    County county=new County();
                    county.setCountyCode(array[0]);
                    county.setCountyName(array[1]);
                    county.setCityId(cityId);
                    coolWeatherDB.saveCountry(county);
                }
                return true;
            }
        }
        return false;
    }
}<commit_msg>The third day<commit_after>package com.xyz.coolweather.util;

import android.text.TextUtils;

import com.xyz.coolweather.model.City;
import com.xyz.coolweather.model.CoolWeatherDB;
import com.xyz.coolweather.model.County;
import com.xyz.coolweather.model.Province;

import org.w3c.dom.Text;

/**
 * Created by yesgxy520 on 6/1/2016.
 */
public class Utility {
    public synchronized static boolean handleProvincesResponse(CoolWeatherDB coolWeatherDB, String response){
        if(!TextUtils.isEmpty(response)){
            String[] allProvinces=response.split(",");
            if(allProvinces!=null && allProvinces.length>0){
                for(String p:allProvinces){
                    String[] array=p.split("\\|");
                    Province province=new Province();
                    province.setProvinceCode(array[0]);
                    province.setProvinceName(array[1]);
                    coolWeatherDB.saveProvince(province);
                }
                return true;
            }
        }
        return false;
    }

    public static boolean handleCitiesResponse(CoolWeatherDB coolWeatherDB, String response, int provinceId){
        if(!TextUtils.isEmpty(response)){
            String[] allCities=response.split(",");
            if(allCities!=null && allCities.length>0){
                for(String c:allCities){
                    String[] array=c.split("\\|");
                    City city=new City();
                    city.setCityCode(array[0]);
                    city.setCityName(array[1]);
                    city.setProvinceId(provinceId);
                    coolWeatherDB.saveCity(city);
                }
                return true;
            }
        }
        return false;
    }

    public static boolean handleCountiesResponse(CoolWeatherDB coolWeatherDB,String response,int cityId){
        if(!TextUtils.isEmpty(response)){
            String[] allCounties=response.split(",");
            if(allCounties!=null && allCounties.length>0){
                int i=1;
                for(String c:allCounties){
                    if(i!=1){
                        String[] array=c.split("\\|");
                        County county=new County();
                        county.setCountyCode(array[0]);
                        county.setCountyName(array[1]);
                        county.setCityId(cityId);
                        coolWeatherDB.saveCountry(county);
                    }
                    i++;
                }
                return true;
            }
        }
        return false;
    }
}
{'fraction_non_alphanumeric': 0.11020326823435632, 'fraction_numerical': 0.007971303308090873, 'mean_word_length': 1.6925965665236051, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3956677', 'n_tokens_mistral': 1403, 'n_tokens_neox': 1301, 'n_words': 216}