<commit_before>package util;

import org.junit.Test;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

import static org.junit.Assert.*;

public class DifferenceTest {
    @Test
    public void testConstructor() {
        Map<Integer, Difference.UnaryFunction<Integer>> changeMap = new HashMap<>();
        changeMap.put(100, -> e + 1);
        changeMap.put(200, e -> e * e);

        Difference<Integer> testDifference = new Difference<>(
                Arrays.asList(1, 2, 3),
                Arrays.asList(4, 5, 6),
                changeMap);

        assertEquals(Arrays.asList(1,2,3), testDifference.added);
        assertEquals(Arrays.asList(4,5,6), testDifference.removed);
        assertEquals(changeMap, testDifference.changed);

        assertTrue(4 * 4 == changeMap.get(200).apply(4));
        assertTrue(4 + 1 == changeMap.get(100).apply(4));
    }<commit_msg>Quick bug fix...<commit_after>package util;

import org.junit.Test;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

import static org.junit.Assert.*;

public class DifferenceTest {
    @Test
    public void testConstructor() {
        Map<Integer, Difference.UnaryFunction<Integer>> changeMap = new HashMap<>();
        changeMap.put(100, e -> e + 1);
        changeMap.put(200, e -> e * e);

        Difference<Integer> testDifference = new Difference<>(
                Arrays.asList(1, 2, 3),
                Arrays.asList(4, 5, 6),
                changeMap);

        assertEquals(Arrays.asList(1,2,3), testDifference.added);
        assertEquals(Arrays.asList(4,5,6), testDifference.removed);
        assertEquals(changeMap, testDifference.changed);

        assertTrue(4 * 4 == changeMap.get(200).apply(4));
        assertTrue(4 + 1 == changeMap.get(100).apply(4));
    }
{'fraction_non_alphanumeric': 0.13905817174515236, 'fraction_numerical': 0.03434903047091413, 'mean_word_length': 2.8181818181818183, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, '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': '4203879', 'n_tokens_mistral': 585, 'n_tokens_neox': 557, 'n_words': 113}