<commit_before>package fabricator.j.tests;

import org.testng.annotations.Test;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;

import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;

public class JavaInternetTestSuite extends JavaBaseTest {

    @Test
    public void testUrl() {
        final HashMap<String, Object> stringStringHashMap = new HashMap<>();
        stringStringHashMap.put("hello", "test");
        stringStringHashMap.put("hello2", "test2");
        stringStringHashMap.put("hello3", "test 3");
        final String url = internet.urlBuilder().host("test.ru").paramsinJava(stringStringHashMap).toString();
        assertTrue(url.matches("^(.*:)//([A-Za-z0-9\\-\\.]+)(:[0-9]+)?(.*)$"));
        String params = url.split("/")[3];
        List<String> stringList = Arrays.asList(params.split("&"));
        assertTrue(stringList.contains("getEntity?hello=test"));
        assertTrue(stringList.contains("hello2=test2"));
        assertTrue(stringList.contains("hello3=test+3"));
    }
}<commit_msg>make JavaInternetTestSuite work with Java8<commit_after>package fabricator.j.tests;

import org.testng.annotations.Test;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;

import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertTrue;

public class JavaInternetTestSuite extends JavaBaseTest {

    @Test
    public void testUrl() {
        final HashMap<String, Object> stringStringHashMap = new HashMap<>();
        stringStringHashMap.put("hello", "test");
        stringStringHashMap.put("hello2", "test2");
        stringStringHashMap.put("hello3", "test 3");
        final String url = internet.urlBuilder().host("test.ru").paramsinJava(stringStringHashMap).toString();
        assertTrue(url.matches("^(.*:)//([A-Za-z0-9\\-\\.]+)(:[0-9]+)?(.*)$"));
        String params = url.split("/")[3];
        List<String> paramsList = Arrays.asList(params.replaceAll("getEntity\\?","").split("&"));
        assertTrue(paramsList.contains("hello=test"));
        assertTrue(paramsList.contains("hello2=test2"));
        assertTrue(paramsList.contains("hello3=test+3"));
    }
}
{'fraction_non_alphanumeric': 0.16976849750340445, 'fraction_numerical': 0.012256014525646845, 'mean_word_length': 4.125581395348838, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2766805', 'n_tokens_mistral': 655, 'n_tokens_neox': 661, 'n_words': 108}