<commit_before>package com.rhcloud.igorbotian.rsskit.rest;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.io.IOUtils;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.impl.client.HttpClientBuilder;

import java.io.IOException;
import java.util.List;
import java.util.Objects;

/**
 * @author <NAME> <<EMAIL>>
 */
public abstract class AbstractRestEndpoint implements RestEndpoint {

    private static final int CONNECTION_TIMEOUT = 10000;
    private static final int SOCKET_TIMEOUT = 5000;

    private static final ObjectMapper JSON_MAPPER = new ObjectMapper();
    protected static final HttpClient HTTP_CLIENT;

    static {
        RequestConfig.Builder rcBuilder = RequestConfig.custom();

        rcBuilder.setConnectTimeout(CONNECTION_TIMEOUT);
        rcBuilder.setSocketTimeout(SOCKET_TIMEOUT);
        rcBuilder.setConnectionRequestTimeout(CONNECTION_TIMEOUT);

        HttpClientBuilder builder = HttpClientBuilder.create();
        builder.setDefaultRequestConfig(rcBuilder.build());

        HTTP_CLIENT = builder.build();
    }<commit_msg>Connection timeout has been increased<commit_after>package com.rhcloud.igorbotian.rsskit.rest;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.io.IOUtils;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.impl.client.HttpClientBuilder;

import java.io.IOException;
import java.util.List;
import java.util.Objects;

/**
 * @author <NAME> <<EMAIL>>
 */
public abstract class AbstractRestEndpoint implements RestEndpoint {

    private static final int CONNECTION_TIMEOUT = 30000;
    private static final int SOCKET_TIMEOUT = 60000;

    private static final ObjectMapper JSON_MAPPER = new ObjectMapper();
    protected static final HttpClient HTTP_CLIENT;

    static {
        RequestConfig.Builder rcBuilder = RequestConfig.custom();

        rcBuilder.setConnectTimeout(CONNECTION_TIMEOUT);
        rcBuilder.setSocketTimeout(SOCKET_TIMEOUT);
        rcBuilder.setConnectionRequestTimeout(CONNECTION_TIMEOUT);

        HttpClientBuilder builder = HttpClientBuilder.create();
        builder.setDefaultRequestConfig(rcBuilder.build());

        HTTP_CLIENT = builder.build();
    }
{'fraction_non_alphanumeric': 0.09066253390158853, 'fraction_numerical': 0.007361487795428129, 'mean_word_length': 4.674725274725275, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '3022725', 'n_tokens_mistral': 732, 'n_tokens_neox': 699, 'n_words': 144}