<commit_before>package com.github.droidfu.testsupport;

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

import java.util.Calendar;
import java.util.Collection;
import java.util.Date;

public class DroidFuAssertions {

    public static <E> void assertEqualElements(Collection<E> expected, Collection<E> actual) {<commit_msg>DroidFuAssertions now work with both JUnit4 and JUnit3 automagically :-)<commit_after>package com.github.droidfu.testsupport;

import java.util.Calendar;
import java.util.Collection;
import java.util.Date;

public class DroidFuAssertions {

    private static boolean junit4 = true;

    static {
        try {
            Class.forName("org.junit.Assert");
        } catch (ClassNotFoundException e) {
            System.out.println("JUnit4 not found on class path, will use JUnit3 assertions!");
            junit4 = false;
        }
    }

    public static void useJUnit3() {
        junit4 = false;
    }

    private static void assertTrue(String message, boolean condition) {
        if (junit4) {
            org.junit.Assert.assertTrue(message, condition);
        } else {
            junit.framework.Assert.assertTrue(message, condition);
        }
    }

    private static void assertEquals(String message, Object expected, Object actual) {
        if (junit4) {
            org.junit.Assert.assertEquals(message, expected, actual);
        } else {
            junit.framework.Assert.assertEquals(message, expected, actual);
        }
    }

    public static <E> void assertEqualElements(Collection<E> expected, Collection<E> actual) {
{'fraction_non_alphanumeric': 0.09473684210526316, 'fraction_numerical': 0.006191950464396285, 'mean_word_length': 3.0199004975124377, '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': '1565488', 'n_tokens_mistral': 448, 'n_tokens_neox': 436, 'n_words': 114}