<commit_before>package de.uni_potsdam.hpi.bpt.bp2014.jcomparser;

import org.apache.commons.codec.EncoderException;
import org.apache.commons.codec.binary.Base64;

import java.io.*;
import java.net.*;
import java.util.List;
import java.util.Map;

/*
As a part of the JComparser we need to retrieve XML docus from a source URL like the Repo from the Processeditor.
 */
public class Retrieval {
    private final String loginRequest = "<user>%n" +
            "<property name='name' value='%s'/>%n" +
            "<property name='pwd' value='%s'/>%n" +
            "</user>";

    public String getHTML(String urlToRead) {
        /* credits to Kalpak http://stackoverflow.com/questions/1485708/how-do-i-do-a-http-get-in-java */
        URL url;
        HttpURLConnection conn;
        BufferedReader rd;
        String line;
        String result = "";
        try {
            url = new URL(urlToRead);
            conn = (HttpURLConnection) url.openConnection();<commit_msg>JP-38 #comment:Marked old getHTML method as deprecated<commit_after>package de.uni_potsdam.hpi.bpt.bp2014.jcomparser;

import org.apache.commons.codec.EncoderException;
import org.apache.commons.codec.binary.Base64;

import java.io.*;
import java.net.*;
import java.util.List;
import java.util.Map;

/*
As a part of the JComparser we need to retrieve XML docus from a source URL like the Repo from the Processeditor.
 */
public class Retrieval {
    private final String loginRequest = "<user>%n" +
            "<property name='name' value='%s'/>%n" +
            "<property name='pwd' value='%s'/>%n" +
            "</user>";

    /**
     *
     * @param urlToRead
     * @return
     * @Deprecated Use this method only if you don't want any authentification
     */
    @Deprecated
    public String getHTML(String urlToRead) {
        /* credits to Kalpak http://stackoverflow.com/questions/1485708/how-do-i-do-a-http-get-in-java */
        URL url;
        HttpURLConnection conn;
        BufferedReader rd;
        String line;
        String result = "";
        try {
            url = new URL(urlToRead);
            conn = (HttpURLConnection) url.openConnection();
{'fraction_non_alphanumeric': 0.12232558139534884, 'fraction_numerical': 0.013023255813953489, 'mean_word_length': 2.633445945945946, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3437281', 'n_tokens_mistral': 678, 'n_tokens_neox': 656, 'n_words': 172}