<commit_before>package hudson.plugins.warnings.parser;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.Collection;
import java.util.List;
import java.util.regex.Matcher;

import org.junit.Test;
import org.jvnet.hudson.test.HudsonTestCase;
import org.jvnet.hudson.test.TestExtension;
import org.jvnet.localizer.Localizable;

import hudson.plugins.analysis.util.model.FileAnnotation;

/**
 * Tests the class {@link ParserRegistry} in context of a running Jenkins instance.
 *
 * @author <NAME>
 */
public class ParserRegistryIntegrationTest extends HudsonTestCase {
    /** If you add a new parser then this value needs to be adapted. */
    private static final int NUMBER_OF_AVAILABLE_PARSERS = 47;
    private static final String OLD_ID_ECLIPSE_JAVA_COMPILER = "Eclipse Java Compiler";
    private static final String JAVA_WARNINGS_FILE = "deprecations.txt";
    private static final String OLD_ID_JAVA_COMPILER = "Java Compiler";
    private static final String MIXED_API = "Both APIs";
    private static final String NEW_API = "New Parser API";
    private static final String OLD_API = "Old Parser API";

    /**
     * Verifies the current number of parsers.
     */
    @Test
    public void testParserRegistration() {
        List<ParserDescription> groups = ParserRegistry.getAvailableParsers();
<commit_msg>Bumped NUMBER_OF_AVAILABLE_PARSERS following introduction of nagfor parser<commit_after>package hudson.plugins.warnings.parser;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.Collection;
import java.util.List;
import java.util.regex.Matcher;

import org.junit.Test;
import org.jvnet.hudson.test.HudsonTestCase;
import org.jvnet.hudson.test.TestExtension;
import org.jvnet.localizer.Localizable;

import hudson.plugins.analysis.util.model.FileAnnotation;

/**
 * Tests the class {@link ParserRegistry} in context of a running Jenkins instance.
 *
 * @author <NAME>
 */
public class ParserRegistryIntegrationTest extends HudsonTestCase {
    /** If you add a new parser then this value needs to be adapted. */
    private static final int NUMBER_OF_AVAILABLE_PARSERS = 48;
    private static final String OLD_ID_ECLIPSE_JAVA_COMPILER = "Eclipse Java Compiler";
    private static final String JAVA_WARNINGS_FILE = "deprecations.txt";
    private static final String OLD_ID_JAVA_COMPILER = "Java Compiler";
    private static final String MIXED_API = "Both APIs";
    private static final String NEW_API = "New Parser API";
    private static final String OLD_API = "Old Parser API";

    /**
     * Verifies the current number of parsers.
     */
    @Test
    public void testParserRegistration() {
        List<ParserDescription> groups = ParserRegistry.getAvailableParsers();

{'fraction_non_alphanumeric': 0.08347588094423537, 'fraction_numerical': 0.0013684570646595963, 'mean_word_length': 4.485928705440901, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '5110101', 'n_tokens_mistral': 893, 'n_tokens_neox': 860, 'n_words': 252}