<commit_before>package nl.dvberkel.demonstration;

import nl.dvberkel.demonstration.grammar.CalculatorParser;
import org.junit.Before;
import org.junit.Test;
import org.parboiled.Parboiled;
import org.parboiled.parserunners.ReportingParseRunner;
import org.parboiled.support.ParsingResult;

import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsNot.not;
import static org.hamcrest.core.IsNull.nullValue;
import static org.junit.Assert.assertThat;

public class ParboiledTest {

    private CalculatorParser parser;

    @Before
    public void createParser() {
        parser = Parboiled.createParser(CalculatorParser.class);
    }

    @Test
    public void shouldCorrectlyDetermineResult() {
        ParsingResult<?> result = ReportingParseRunner.run(parser.Expression(), "1+2");

        Object value = result.parseTreeRoot.getValue();

        assertThat(value, is(not(nullValue())));
    }
}
<commit_msg>do not use the deprecated run method of ReportingParseRunner<commit_after>package nl.dvberkel.demonstration;

import nl.dvberkel.demonstration.grammar.CalculatorParser;
import org.junit.Before;
import org.junit.Test;
import org.parboiled.Parboiled;
import org.parboiled.parserunners.ReportingParseRunner;
import org.parboiled.support.ParsingResult;

import static org.hamcrest.core.Is.is;
import static org.hamcrest.core.IsNot.not;
import static org.hamcrest.core.IsNull.nullValue;
import static org.junit.Assert.assertThat;

public class ParboiledTest {

    private CalculatorParser parser;

    @Before
    public void createParser() {
        parser = Parboiled.createParser(CalculatorParser.class);
    }

    @Test
    public void shouldCorrectlyDetermineResult() {
        ParsingResult<?> result = new ReportingParseRunner(parser.Expression()).run("1+2");

        Object value = result.parseTreeRoot.getValue();

        assertThat(value, is(not(nullValue())));
    }
}

{'fraction_non_alphanumeric': 0.10225485055060304, 'fraction_numerical': 0.002097535395909806, 'mean_word_length': 4.562682215743441, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2273505', 'n_tokens_mistral': 595, 'n_tokens_neox': 570, 'n_words': 110}