<commit_before>package com.daspilker.mvnrepo;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxBinary;
import org.openqa.selenium.firefox.FirefoxDriver;

import static org.junit.Assert.assertEquals;
import static org.openqa.selenium.By.linkText;
import static org.openqa.selenium.By.tagName;

public class IndexPageIT {
    private static final String BASE_URL = "http://localhost:8080/";

    private WebDriver driver;

    @Before
    public void setUp() {
        FirefoxBinary firefoxBinary = new FirefoxBinary();
        String display = System.getenv("DISPLAY");
        System.out.println("DISPLAY=" + display);
        if (display != null) {
            firefoxBinary.setEnvironmentProperty("DISPLAY", display);
        }
        driver = new FirefoxDriver(firefoxBinary, null);
    }

    @After
    public void tearDown() {
        driver.quit();
    }

    @Test
    public void test() {
        driver.get(BASE_URL);

        WebElement headline = driver.findElement(tagName("h1"));
        assertEquals("Maven Repository Browser", headline.getText());

        WebElement releasesLink = driver.findElement(linkText("Browse Release Repository"));
        assertEquals(BASE_URL + "browser/releases/", releasesLink.getAttribute("href"));

        WebElement snapshotsLink = driver.findElement(linkText("Browse Snapshot Repository"));
        assertEquals(BASE_URL + "browser/snapshots/", snapshotsLink.getAttribute("href"));
    }
}<commit_msg>do we really need to set the DISPLAY variable?<commit_after>package com.daspilker.mvnrepo;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

import static org.junit.Assert.assertEquals;
import static org.openqa.selenium.By.linkText;
import static org.openqa.selenium.By.tagName;

public class IndexPageIT {
    private static final String BASE_URL = "http://localhost:8080/";

    private WebDriver driver;

    @Before
    public void setUp() {
        driver = new FirefoxDriver();
    }

    @After
    public void tearDown() {
        driver.quit();
    }

    @Test
    public void test() {
        driver.get(BASE_URL);

        WebElement headline = driver.findElement(tagName("h1"));
        assertEquals("Maven Repository Browser", headline.getText());

        WebElement releasesLink = driver.findElement(linkText("Browse Release Repository"));
        assertEquals(BASE_URL + "browser/releases/", releasesLink.getAttribute("href"));

        WebElement snapshotsLink = driver.findElement(linkText("Browse Snapshot Repository"));
        assertEquals(BASE_URL + "browser/snapshots/", snapshotsLink.getAttribute("href"));
    }
}
{'fraction_non_alphanumeric': 0.114305507447177, 'fraction_numerical': 0.0034638032559750607, 'mean_word_length': 3.734426229508197, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1786026', 'n_tokens_mistral': 861, 'n_tokens_neox': 816, 'n_words': 175}