<commit_before>package org.mwg.core.utility;

import org.junit.Assert;
import org.junit.Test;
import org.mwg.core.CoreConstants;
import org.mwg.utility.HashHelper;

public class HashHelperTest {

    // Integer.MIN_VALUE == 0x80000000
    public static final int MIN_INT = -2147483648;

    // Integer.MAX_VALUE == 0x7FFFFFFF
    public static final int MAX_INT = 2147483647;

    /* MAX TESTS */

    @Test
    public void stringHash_0Test() {
        int hash = HashHelper.hash("helloMWG");
        //System.out.println("stringHash_0Test: " + hash);
        Assert.assertTrue(hash == -792688181L);
    }

    @Test
    public void longHash_0Test() {
        try {
            HashHelper.longHash(1, 0);<commit_msg>improve string hashing test<commit_after>package org.mwg.core.utility;

import org.junit.Assert;
import org.junit.Test;
import org.mwg.core.CoreConstants;
import org.mwg.utility.HashHelper;

public class HashHelperTest {

    // Integer.MIN_VALUE == 0x80000000
    public static final int MIN_INT = -2147483648;

    // Integer.MAX_VALUE == 0x7FFFFFFF
    public static final int MAX_INT = 2147483647;

    /* MAX TESTS */

    @Test
    public void stringHash_0Test() {
        int hash = HashHelper.hash("helloMWG");
        //System.out.println("stringHash_0Test: " + hash);
        Assert.assertTrue(hash == -792688181L);
    }

    @Test
    public void stringHash_1Test() {
        int hash = HashHelper.hash("aVeryLongStringThatCanGoOverTheIntegerLimitAfterAHash");
        System.out.println("stringHash_0Test: " + hash);
        Assert.assertTrue(hash == -302989728);
    }

    @Test
    public void longHash_0Test() {
        try {
            HashHelper.longHash(1, 0);
{'fraction_non_alphanumeric': 0.11196228638774308, 'fraction_numerical': 0.05951679434295816, 'mean_word_length': 2.9034482758620688, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, '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': '2979297', 'n_tokens_mistral': 624, 'n_tokens_neox': 548, 'n_words': 111}