<commit_before>package net.troja.eve.esi;

import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.Invocation;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Form;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;

import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.filter.LoggingFilter;
import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.media.multipart.FormDataBodyPart;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.MultiPart;
import org.glassfish.jersey.media.multipart.MultiPartFeature;

import java.io.IOException;
import java.io.InputStream;

import java.nio.file.Files;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Map.Entry;
import java.util.HashMap;
import java.util.List;
import java.util.ArrayList;
import java.util.Date;
import java.util.TimeZone;

import java.net.URLEncoder;

import java.io.File;
import java.io.UnsupportedEncodingException;

import java.text.DateFormat;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import net.troja.eve.esi.auth.Authentication;
import net.troja.eve.esi.auth.HttpBasicAuth;
import net.troja.eve.esi.auth.ApiKeyAuth;
import net.troja.eve.esi.auth.OAuth;

public class ApiClient {
    private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
    private String basePath = "https://esi.evetech.net";
    private boolean debugging = false;
    private int connectionTimeout = 0;

    private Client httpClient;
    private JSON json;
    private String tempFolderPath = null;

    private Map<String, Authentication> authentications;

    private int statusCode;
    private Map<String, List<String>> responseHeaders;

    private DateFormat dateFormat;

    public ApiClient() {
        json = new JSON();
        httpClient = buildHttpClient(debugging);

        this.dateFormat = new RFC3339DateFormat();

        // Set default User-Agent.
        setUserAgent("Swagger-Codegen/1.0.0/java");
<commit_msg>Better handling of user agents (#69)<commit_after>package net.troja.eve.esi;

import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.Invocation;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Form;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;

import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.filter.LoggingFilter;
import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.media.multipart.FormDataBodyPart;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.MultiPart;
import org.glassfish.jersey.media.multipart.MultiPartFeature;

import java.io.IOException;
import java.io.InputStream;

import java.nio.file.Files;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Map.Entry;
import java.util.HashMap;
import java.util.List;
import java.util.ArrayList;
import java.util.Date;
import java.util.TimeZone;

import java.net.URLEncoder;

import java.io.File;
import java.io.UnsupportedEncodingException;

import java.text.DateFormat;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import net.troja.eve.esi.auth.Authentication;
import net.troja.eve.esi.auth.HttpBasicAuth;
import net.troja.eve.esi.auth.ApiKeyAuth;
import net.troja.eve.esi.auth.OAuth;

public class ApiClient {
    private Map<String, String> defaultHeaderMap = new HashMap<String, String>();
    private String basePath = "https://esi.evetech.net";
    private boolean debugging = false;
    private int connectionTimeout = 0;

    private Client httpClient;
    private JSON json;
    private String tempFolderPath = null;

    private Map<String, Authentication> authentications;

    private int statusCode;
    private Map<String, List<String>> responseHeaders;

    private DateFormat dateFormat;

    public ApiClient() {
        json = new JSON();
        httpClient = buildHttpClient(debugging);

        this.dateFormat = new RFC3339DateFormat();

        // Set default User-Agent.
        String userAgent = System.getProperty("http.agent");
        if (userAgent != null && !userAgent.isEmpty()) {
            setUserAgent(userAgent);
        } else {
            setUserAgent("eve-esi/slack:@goldengnu");
        }

{'fraction_non_alphanumeric': 0.11060574736406864, 'fraction_numerical': 0.0031010957204879058, 'mean_word_length': 4.423766816143497, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '1076976', 'n_tokens_mistral': 1524, 'n_tokens_neox': 1488, 'n_words': 298}