<commit_before>package se.kth.kthfsdashboard.communication;

import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.core.util.MultivaluedMapImpl;
import java.security.SecureRandom;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONObject;
import se.kth.kthfsdashboard.struct.NodesTableItem;
import se.kth.kthfsdashboard.utils.FormatUtils;

/**
 *
 * @author <NAME> <<EMAIL>>
 */
public class WebCommunication {

    private static boolean DISABLE_CERTIFICATE_VALIDATION = true;
    // TODO: We should get a unique agent username/password from the DB - one for each agent.
    private static String USERNAME = "<EMAIL>";
    private static String PASSWORD = "<PASSWORD>";
    private static String PROTOCOL = "https";
    private static int PORT = 8090;
    private static String NOT_AVAILABLE = "Not available.";
    private static final Logger logger = Logger.getLogger(WebCommunication.class.getName());

    public WebCommunication() {
    }

//    public String getResource(String url) {
//        return fetchContent(url);
//    }<commit_msg>changed default agent password in dashboard to hopagent<commit_after>package se.kth.kthfsdashboard.communication;

import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.core.util.MultivaluedMapImpl;
import java.security.SecureRandom;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSession;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
import org.codehaus.jettison.json.JSONArray;
import org.codehaus.jettison.json.JSONObject;
import se.kth.kthfsdashboard.struct.NodesTableItem;
import se.kth.kthfsdashboard.utils.FormatUtils;

/**
 *
 * @author <NAME> <<EMAIL>>
 */
public class WebCommunication {

    private static boolean DISABLE_CERTIFICATE_VALIDATION = true;
    // TODO: We should get a unique agent username/password from the DB - one for each agent.
    private static String USERNAME = "<EMAIL>";
    private static String PASSWORD = "<PASSWORD>";
    private static String PROTOCOL = "https";
    private static int PORT = 8090;
    private static String NOT_AVAILABLE = "Not available.";
    private static final Logger logger = Logger.getLogger(WebCommunication.class.getName());

    public WebCommunication() {
    }

//    public String getResource(String url) {
//        return fetchContent(url);
//    }
{'fraction_non_alphanumeric': 0.10742305371152686, 'fraction_numerical': 0.006035003017501509, 'mean_word_length': 4.637755102040816, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '6616220', 'n_tokens_mistral': 1044, 'n_tokens_neox': 1017, 'n_words': 231}