<commit_before>package icapurro.org.smartdns.data.model;


import java.util.ArrayList;
import java.util.List;

import icapurro.org.smartdns.data.remote.SmartDnsService;
import rx.Observable;

public class SmartDns extends Service {

    private String serviceId;
    private LocationIp dns1, dns2;
    private Boolean updateIp;

    public SmartDns(String serviceId) {
        super("SmartDns");
        ips = createLocationIps();
        this.dns1 = ips.get(21);
        this.dns2 = ips.get(23);
        this.serviceId = serviceId;
        this.updateIp = true;
    }

    private List<LocationIp> createLocationIps() {
        return new ArrayList<LocationIp>() {{
            add(new LocationIp("Australia, Melbourne", "172.16.58.3"));
            add(new LocationIp("Australia, Sydney", "192.168.127.12"));
            add(new LocationIp("Brazil, Sao Paulo", "172.16.31.10"));
            add(new LocationIp("Canada, Montreal", "172.16.31.10"));
            add(new LocationIp("Canada, Toronto", "192.168.3.11"));
            add(new LocationIp("Germany, Frankfurt", "192.168.127.12"));
            add(new LocationIp("India, Pune", "172.16.31.10"));
            add(new LocationIp("Ireland, Dublin", "172.16.58.3"));
            add(new LocationIp("Israel", "172.16.17.32"));
            add(new LocationIp("Italy, Milan", "192.168.127.12"));
            add(new LocationIp("Japan, Tokyo", "172.16.58.3"));
            add(new LocationIp("Mexico", "172.16.58.3"));
            add(new LocationIp("Netherlands, Amsterdam", "172.16.17.32"));
            add(new LocationIp("New Zealand", "192.168.127.12"));
            add(new LocationIp("Singapore", "192.168.127.12"));
            add(new LocationIp("South Africa 1", "192.168.3.11"));
            add(new LocationIp("South Africa 2", "172.16.31.10"));
            add(new LocationIp("Spain, Valencia", "192.168.3.11"));
            add(new LocationIp("Sweden, Stockholm", "172.16.31.10"));
            add(new LocationIp("Switzerland", "192.168.127.12"));
            add(new LocationIp("Turkey, Istanbul", "172.16.17.32"));
            add(new LocationIp("US East - N. Virginia", "192.168.127.12"));
            add(new LocationIp("US Center - Dallas", "172.16.58.3"));
            add(new LocationIp("US West - Los Angeles", "172.16.17.32"));
        }};
    }

    private LocationIp searchDns(String name) {
        for (LocationIp locationIp : ips) {
            if (locationIp.toString().equals(name)) {
                return locationIp;
            }
        }
        return null;
    }

    public Boolean shouldUpdateIp() {
        return updateIp;
    }

    public void setUpdateIp(Boolean updateIp) {
        this.updateIp = updateIp;
    }

    public void setDns1(int i) {
        this.dns1 = ips.get(i);
    }

    public void setDns1(String dns1) {
        LocationIp res = searchDns(dns1);
        if (res != null) {
            this.dns1 = res;
        }
    }

    public void setDns2(int i) {
        this.dns2 = ips.get(i);
    }

    public void setDns2(String dns2) {
        LocationIp res = searchDns(dns2);
        if (res != null) {
            this.dns2 = res;
        }
    }

    public LocationIp getDns1() {
        return dns1;
    }

    public LocationIp getDns2() {
        return dns2;
    }

    public String getServiceId() {
        return serviceId;
    }

    public Boolean hasServiceId() {
        return serviceId != null && !serviceId.equals("");
    }

    public void setServiceId(String serviceId) {
        this.serviceId = serviceId;
    }

    public List<String> getLocationStrings() {
        List<String> results = new ArrayList<String>();
        for (LocationIp locationIp : ips) {
            results.add(locationIp.toString());
        }
        return results;
    }

    public Observable<SmartDnsService.Response> serviceUpdate() {
        return SmartDnsService.Creator.newSmartDnsService().getIpUpdate(this.serviceId);
    }
}
<commit_msg>Updated servers list<commit_after>package icapurro.org.smartdns.data.model;


import java.util.ArrayList;
import java.util.List;

import icapurro.org.smartdns.data.remote.SmartDnsService;
import rx.Observable;

public class SmartDns extends Service {

    private String serviceId;
    private LocationIp dns1, dns2;
    private Boolean updateIp;

    public SmartDns(String serviceId) {
        super("SmartDns");
        ips = createLocationIps();
        this.dns1 = ips.get(21);
        this.dns2 = ips.get(23);
        this.serviceId = serviceId;
        this.updateIp = true;
    }

    private List<LocationIp> createLocationIps() {
        return new ArrayList<LocationIp>() {{

            add(new LocationIp("Australia, Melbourne", "172.16.58.3"));
            add(new LocationIp("Australia, Sydney", "192.168.127.12"));
            add(new LocationIp("Brazil, Sao Paulo", "172.16.31.10"));
            add(new LocationIp("Canada, Montreal", "172.16.31.10"));
            add(new LocationIp("Canada, Montreal 2", "172.16.58.3"));
            add(new LocationIp("Canada, Toronto", "192.168.3.11"));
            add(new LocationIp("Canada, Vancouver", "172.16.58.3"));
            add(new LocationIp("Denmark, Copenhagen", "172.16.17.32"));
            add(new LocationIp("Germany, Frankfurt", "192.168.127.12"));
            add(new LocationIp("India, Chennai", "172.16.31.10"));
            add(new LocationIp("India, Mumbai", "192.168.127.12"));
            add(new LocationIp("Ireland, Dublin", "172.16.58.3"));
            add(new LocationIp("Israel, R<NAME>", "172.16.17.32"));
            add(new LocationIp("Italy, Milan", "192.168.127.12"));
            add(new LocationIp("Japan, Tokyo", "172.16.58.3"));
            add(new LocationIp("Mexico", "172.16.58.3"));
            add(new LocationIp("Netherlands, Amsterdam", "172.16.17.32"));
            add(new LocationIp("New Zealand", "192.168.127.12"));
            add(new LocationIp("Singapore", "192.168.127.12"));
            add(new LocationIp("South Africa 1", "192.168.3.11"));
            add(new LocationIp("South Africa 2", "172.16.31.10"));
            add(new LocationIp("South Korea, Seoul", "172.16.58.3"));
            add(new LocationIp("Spain, Madrid", "172.16.31.10"));
            add(new LocationIp("Sweden, Stockholm", "172.16.31.10"));
            add(new LocationIp("Switzerland", "192.168.127.12"));
            add(new LocationIp("Turkey, Istanbul", "172.16.17.32"));
            add(new LocationIp("United Kingdom, London", "192.168.127.12"));
            add(new LocationIp("US East - N. Virginia", "192.168.127.12"));
            add(new LocationIp("US Center - Dallas", "172.16.58.3"));
            add(new LocationIp("US West - Los Angeles", "172.16.17.32"));
        }};
    }

    private LocationIp searchDns(String name) {
        for (LocationIp locationIp : ips) {
            if (locationIp.toString().equals(name)) {
                return locationIp;
            }
        }
        return null;
    }

    public Boolean shouldUpdateIp() {
        return updateIp;
    }

    public void setUpdateIp(Boolean updateIp) {
        this.updateIp = updateIp;
    }

    public void setDns1(int i) {
        this.dns1 = ips.get(i);
    }

    public void setDns1(String dns1) {
        LocationIp res = searchDns(dns1);
        if (res != null) {
            this.dns1 = res;
        }
    }

    public void setDns2(int i) {
        this.dns2 = ips.get(i);
    }

    public void setDns2(String dns2) {
        LocationIp res = searchDns(dns2);
        if (res != null) {
            this.dns2 = res;
        }
    }

    public LocationIp getDns1() {
        return dns1;
    }

    public LocationIp getDns2() {
        return dns2;
    }

    public String getServiceId() {
        return serviceId;
    }

    public Boolean hasServiceId() {
        return serviceId != null && !serviceId.equals("");
    }

    public void setServiceId(String serviceId) {
        this.serviceId = serviceId;
    }

    public List<String> getLocationStrings() {
        List<String> results = new ArrayList<String>();
        for (LocationIp locationIp : ips) {
            results.add(locationIp.toString());
        }
        return results;
    }

    public Observable<SmartDnsService.Response> serviceUpdate() {
        return SmartDnsService.Creator.newSmartDnsService().getIpUpdate(this.serviceId);
    }
}

{'fraction_non_alphanumeric': 0.14686902485659656, 'fraction_numerical': 0.06668260038240918, 'mean_word_length': 2.2948818897637797, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 54, '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': '6987902', 'n_tokens_mistral': 2980, 'n_tokens_neox': 2578, 'n_words': 536}