<commit_before>package uk.ac.ebi.spot.goci.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

import javax.validation.constraints.NotNull;

/**
 * Created by emma on 27/04/2016.
 *
 * @author emma
 *         <p>
 *         Simple util class to build a url
 */
@Service
public class RestUrlBuilder {

    @NotNull @Value("${ensembl.server}")
    private String server;

    private final Logger log = LoggerFactory.getLogger(getClass());

    protected Logger getLog() {
        return log;
    }

    public String createUrl(String endpoint, String query) {
        String url = getServer().concat(endpoint).concat(query);
        getLog().info("Checking url: " + url);
        return url;
    }

    public RestTemplate getRestTemplate() {
        // Create a new RestTemplate instance
        RestTemplate restTemplate = new RestTemplate();

        // Add the Jackson message converter
        restTemplate.getMessageConverters().add(new MappingJackson2HttpMessageConverter());

        return restTemplate;
    }

    public String getServer() {
        return server;
    }<commit_msg>update to log message<commit_after>package uk.ac.ebi.spot.goci.utils;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

import javax.validation.constraints.NotNull;

/**
 * Created by emma on 27/04/2016.
 *
 * @author emma
 *         <p>
 *         Simple util class to build a url
 */
@Service
public class RestUrlBuilder {

    @NotNull @Value("${ensembl.server}")
    private String server;

    private final Logger log = LoggerFactory.getLogger(getClass());

    protected Logger getLog() {
        return log;
    }

    public String createUrl(String endpoint, String query) {
        String url = getServer().concat(endpoint).concat(query);
        getLog().info("Creating url: " + url);
        return url;
    }

    public RestTemplate getRestTemplate() {
        // Create a new RestTemplate instance
        RestTemplate restTemplate = new RestTemplate();

        // Add the Jackson message converter
        restTemplate.getMessageConverters().add(new MappingJackson2HttpMessageConverter());

        return restTemplate;
    }

    public String getServer() {
        return server;
    }
{'fraction_non_alphanumeric': 0.09918578830495929, 'fraction_numerical': 0.008882309400444115, 'mean_word_length': 3.276898734177215, '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': '2776004', 'n_tokens_mistral': 754, 'n_tokens_neox': 723, 'n_words': 183}