<commit_before>package org.jabref.model.entry.identifier;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

public class EprintTest {

    @Test
    public void acceptPlainEprint() {
        assertEquals("0706.0001", new Eprint("0706.0001").getEprint());
    }

    @Test
    public void acceptLegacyEprint() {
        assertEquals("astro-ph.GT/1234567", new Eprint("astro-ph.GT/1234567").getEprint());
        assertEquals("math/1234567", new Eprint("math/1234567").getEprint());
    }

    @Test
    public void acceptPlainEprintWithVersion() {
        assertEquals("0706.0001v1", new Eprint("0706.0001v1").getEprint());
    }

    @Test
    public void ignoreLeadingAndTrailingWhitespaces() {
        assertEquals("0706.0001v1", new Eprint("  0706.0001v1 ").getEprint());
    }

    @Test
    public void rejectEmbeddedEprint() {
        assertThrows(IllegalArgumentException.class, () -> new Eprint("other stuff 0706.0001v1 end"));
    }

    @Test
    public void rejectInvalidEprint() {
        assertThrows(IllegalArgumentException.class, () -> new Eprint("https://thisisnouri"));
    }

    @Test
    public void acceptArxivPrefix() {
        assertEquals("0706.0001v1", new Eprint("arXiv:0706.0001v1").getEprint());
    }

    @Test
    public void acceptURLEprint() {
        // http
        assertEquals("0706.0001v1", new Eprint("http://arxiv.org/abs/0706.0001v1").getEprint());
        // https
        assertEquals("0706.0001v1", new Eprint("https://arxiv.org/abs/0706.0001v1").getEprint());
        // other domains
        assertEquals("0706.0001v1", new Eprint("https://asdf.org/abs/0706.0001v1").getEprint());
    }

    @Test
    public void constructCorrectURLForEprint() {
        assertEquals("http://arxiv.org/abs/0706.0001v1", new Eprint("0706.0001v1").getURIAsASCIIString());
    }
}
<commit_msg>Adapt test to https<commit_after>package org.jabref.model.entry.identifier;

import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;

public class EprintTest {

    @Test
    public void acceptPlainEprint() {
        assertEquals("0706.0001", new Eprint("0706.0001").getEprint());
    }

    @Test
    public void acceptLegacyEprint() {
        assertEquals("astro-ph.GT/1234567", new Eprint("astro-ph.GT/1234567").getEprint());
        assertEquals("math/1234567", new Eprint("math/1234567").getEprint());
    }

    @Test
    public void acceptPlainEprintWithVersion() {
        assertEquals("0706.0001v1", new Eprint("0706.0001v1").getEprint());
    }

    @Test
    public void ignoreLeadingAndTrailingWhitespaces() {
        assertEquals("0706.0001v1", new Eprint("  0706.0001v1 ").getEprint());
    }

    @Test
    public void rejectEmbeddedEprint() {
        assertThrows(IllegalArgumentException.class, () -> new Eprint("other stuff 0706.0001v1 end"));
    }

    @Test
    public void rejectInvalidEprint() {
        assertThrows(IllegalArgumentException.class, () -> new Eprint("https://thisisnouri"));
    }

    @Test
    public void acceptArxivPrefix() {
        assertEquals("0706.0001v1", new Eprint("arXiv:0706.0001v1").getEprint());
    }

    @Test
    public void acceptURLEprint() {
        // http
        assertEquals("0706.0001v1", new Eprint("http://arxiv.org/abs/0706.0001v1").getEprint());
        // https
        assertEquals("0706.0001v1", new Eprint("https://arxiv.org/abs/0706.0001v1").getEprint());
        // other domains
        assertEquals("0706.0001v1", new Eprint("https://asdf.org/abs/0706.0001v1").getEprint());
    }

    @Test
    public void constructCorrectURLForEprint() {
        assertEquals("https://arxiv.org/abs/0706.0001v1", new Eprint("0706.0001v1").getURIAsASCIIString());
    }
}

{'fraction_non_alphanumeric': 0.1483587490307573, 'fraction_numerical': 0.09253036960454898, 'mean_word_length': 3.309576837416481, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 7, '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': '374066', 'n_tokens_mistral': 1483, 'n_tokens_neox': 1224, 'n_words': 191}