<commit_before>package tests;

import org.junit.Test;

import java.time.LocalDateTime;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;

import static org.junit.Assert.assertEquals;
import static util.Utility.*;

public class UtilityTest {

    @Test
    public void utilityTest() {
        assertEquals("test", stripQuotes("\"test\""));

        Calendar testDate = Calendar.getInstance();
        testDate.set(1994, Calendar.NOVEMBER, 15, 12, 45, 26);
        testDate.setTimeZone(TimeZone.getTimeZone("GMT"));

        assertEquals(testDate.getTime().toString(),
                parseHTTPLastModifiedDate("Tue, 15 Nov 1994 12:45:26 GMT").toString());

        assertEquals("1994-11-15T12:45Z", formatDateISO8601(testDate.getTime()));

        assertEquals(new Date(94, 10, 15, 12, 45, 26), localDateTimeToDate(LocalDateTime.of(1994, 11, 15, 12, 45, 26)));

        assertEquals(LocalDateTime.of(1994, 11, 15, 12, 45, 26), dateToLocalDateTime(new Date(94, 10, 15, 12, 45, 26)));

        assertEquals(new Date(94, 10, 15, 12, 45, 26).getTime(), localDateTimeToLong(LocalDateTime.of(1994, 11, 15, 12, 45, 26)));

        assertEquals("HelloWorldThisIsATest", snakeCaseToCamelCase("hello_world_this_is_a_test"));<commit_msg>added parseVersionNumber test in UtilityTest<commit_after>package tests;

import org.junit.Test;

import java.time.LocalDateTime;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;

import static org.junit.Assert.assertEquals;
import static util.Utility.*;

public class UtilityTest {

    @Test
    public void utilityTest() {
        assertEquals("test", stripQuotes("\"test\""));

        Calendar testDate = Calendar.getInstance();
        testDate.set(1994, Calendar.NOVEMBER, 15, 12, 45, 26);
        testDate.setTimeZone(TimeZone.getTimeZone("GMT"));

        assertEquals(testDate.getTime().toString(),
                parseHTTPLastModifiedDate("Tue, 15 Nov 1994 12:45:26 GMT").toString());

        assertEquals("1994-11-15T12:45Z", formatDateISO8601(testDate.getTime()));

        assertEquals(new Date(94, 10, 15, 12, 45, 26), localDateTimeToDate(LocalDateTime.of(1994, 11, 15, 12, 45, 26)));

        assertEquals(LocalDateTime.of(1994, 11, 15, 12, 45, 26), dateToLocalDateTime(new Date(94, 10, 15, 12, 45, 26)));

        assertEquals(new Date(94, 10, 15, 12, 45, 26).getTime(), localDateTimeToLong(LocalDateTime.of(1994, 11, 15, 12, 45, 26)));

        assertEquals("HelloWorldThisIsATest", snakeCaseToCamelCase("hello_world_this_is_a_test"));

        assertEquals(1, parseVersionNumber("1.2.3a").get()[0]);
        assertEquals(2, parseVersionNumber("1.2.3a").get()[1]);
        assertEquals(3, parseVersionNumber("1.2.3a").get()[2]);
{'fraction_non_alphanumeric': 0.14846041055718476, 'fraction_numerical': 0.09200879765395895, 'mean_word_length': 4.258188824662813, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5378938', 'n_tokens_mistral': 1065, 'n_tokens_neox': 830, 'n_words': 183}