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

import java.io.IOException;
import java.io.Reader;
import java.io.Serializable;
import java.util.Collection;
import java.util.Locale;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringEscapeUtils;
import org.jvnet.localizer.Localizable;

import hudson.ExtensionPoint;
import hudson.plugins.analysis.util.model.FileAnnotation;
import hudson.plugins.analysis.util.model.Priority;
import hudson.plugins.warnings.Messages;
import hudson.plugins.warnings.WarningsDescriptor;

/**
 * Parses an input stream for compiler warnings and returns the found
 * warnings. If your parser is based on a regular expression you can extend
 * from the existing base classes {@link RegexpLineParser} or
 * {@link RegexpDocumentParser}.
 *
 * @see RegexpLineParser Parses files line by line
 * @see RegexpDocumentParser Parses files using mulit-line regular expression
 * @see GccParser example
 * @see JavacParser example
 *
 * @author <NAME>
 * @since 4.0
 */
public abstract class AbstractWarningsParser implements ExtensionPoint, Serializable {
    private static final long serialVersionUID = 8466657735514387654L;

    private final Localizable parserName;
    private final Localizable linkName;
    private final Localizable trendName;
    private final String name;

    /**
     * Creates a {@link Localizable} for the specified string value.
     *
     * @param string
     *            the string to wrap
     * @return localized string
     */
    protected static Localizable localize(final String string) {
        return hudson.plugins.warnings.parser.Messages._Warnings_NotLocalizedName(string);
    }

    /**
     * Creates a new instance of {@link AbstractWarningsParser}.
     *
     * @param parserName
     *            name of the parser<commit_msg>Mark base class deprecated.<commit_after>package hudson.plugins.warnings.parser;

import java.io.IOException;
import java.io.Reader;
import java.io.Serializable;
import java.util.Collection;
import java.util.Locale;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringEscapeUtils;
import org.jvnet.localizer.Localizable;

import hudson.ExtensionPoint;
import hudson.plugins.analysis.util.model.FileAnnotation;
import hudson.plugins.analysis.util.model.Priority;
import hudson.plugins.warnings.Messages;
import hudson.plugins.warnings.WarningsDescriptor;

/**
 * Parses an input stream for compiler warnings and returns the found
 * warnings. If your parser is based on a regular expression you can extend
 * from the existing base classes {@link RegexpLineParser} or
 * {@link RegexpDocumentParser}.
 *
 * @see RegexpLineParser Parses files line by line
 * @see RegexpDocumentParser Parses files using mulit-line regular expression
 * @see GccParser example
 * @see JavacParser example
 *
 * @author <NAME>
 * @since 4.0
 * @deprecated use the new analysis-model library
 */
@Deprecated
public abstract class AbstractWarningsParser implements ExtensionPoint, Serializable {
    private static final long serialVersionUID = 8466657735514387654L;

    private final Localizable parserName;
    private final Localizable linkName;
    private final Localizable trendName;
    private final String name;

    /**
     * Creates a {@link Localizable} for the specified string value.
     *
     * @param string
     *            the string to wrap
     * @return localized string
     */
    protected static Localizable localize(final String string) {
        return hudson.plugins.warnings.parser.Messages._Warnings_NotLocalizedName(string);
    }

    /**
     * Creates a new instance of {@link AbstractWarningsParser}.
     *
     * @param parserName
     *            name of the parser
{'fraction_non_alphanumeric': 0.07632978723404256, 'fraction_numerical': 0.011702127659574468, 'mean_word_length': 3.890767230169051, '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': '7152387', 'n_tokens_mistral': 1048, 'n_tokens_neox': 1006, 'n_words': 319}