<commit_before>/**
 *
 */
package org.javarosa.xml.util;

/**
 * @author ctsims
 */
public class UnfullfilledRequirementsException extends Exception {

    private int severity;
    private int requirement;
    private boolean isDuplicateApp;

    /**
     * Version Numbers if version is incompatible *
     */
    private int maR, miR, maA, miA;

    public UnfullfilledRequirementsException(String message, int severity) {
        this(message, severity, -1, -1, -1, -1, -1);
    }

    public UnfullfilledRequirementsException(String message, int severity, int requirement) {
        this(message, severity, requirement, -1, -1, -1, -1);
    }

    public UnfullfilledRequirementsException(String message, int severity, boolean isDuplicateApp) {
        this(message, severity, -1, -1, -1, -1, -1);
        this.isDuplicateApp = isDuplicateApp;
    }

    /**
     * Constructor for unfulfilled version requirements.
     *
     * @param message
     * @param severity
     * @param requirement
     * @param requiredMajor
     * @param requiredMinor
     * @param availableMajor
     * @param availableMinor
     */
    public UnfullfilledRequirementsException(String message, int severity,
                                             int requirement,
                                             int requiredMajor, int requiredMinor, int availableMajor, int availableMinor) {
        super(message);
        this.severity = severity;
        this.requirement = requirement;

        this.maR = requiredMajor;
        this.miR = requiredMinor;

        this.maA = availableMajor;
        this.miA = availableMinor;
    }

    /**
     * @return A human readable version string describing the required version
     */
    public String getRequiredVersionString() {
        return maR + "." + miR;
    }

    /**
     * @return A human readable version string describing the available version
     */
    public String getAvailableVesionString() {
        return maA + "." + miA;
    }

    public int getSeverity() {
        return severity;
    }

    public int getRequirementCode() {
        return requirement;
    }

    public boolean isDuplicateException() {
        return this.isDuplicateApp;
    }
}<commit_msg>revert accidental changes on master<commit_after>/**
 *
 */
package org.javarosa.xml.util;

/**
 * @author ctsims
 */
public class UnfullfilledRequirementsException extends Exception {

    private int severity;
    private int requirement;

    /**
     * Version Numbers if version is incompatible *
     */
    private int maR, miR, maA, miA;

    public UnfullfilledRequirementsException(String message, int severity) {
        this(message, severity, -1, -1, -1, -1, -1);
    }

    public UnfullfilledRequirementsException(String message, int severity, int requirement) {
        this(message, severity, requirement, -1, -1, -1, -1);
    }

    /**
     * Constructor for unfulfilled version requirements.
     *
     * @param message
     * @param severity
     * @param requirement
     * @param requiredMajor
     * @param requiredMinor
     * @param availableMajor
     * @param availableMinor
     */
    public UnfullfilledRequirementsException(String message, int severity,
                                             int requirement,
                                             int requiredMajor, int requiredMinor, int availableMajor, int availableMinor) {
        super(message);
        this.severity = severity;
        this.requirement = requirement;

        this.maR = requiredMajor;
        this.miR = requiredMinor;

        this.maA = availableMajor;
        this.miA = availableMinor;
    }

    /**
     * @return A human readable version string describing the required version
     */
    public String getRequiredVersionString() {
        return maR + "." + miR;
    }

    /**
     * @return A human readable version string describing the available version
     */
    public String getAvailableVesionString() {
        return maA + "." + miA;
    }

    public int getSeverity() {
        return severity;
    }

    public int getRequirementCode() {
        return requirement;
    }
}
{'fraction_non_alphanumeric': 0.08928571428571429, 'fraction_numerical': 0.00555019305019305, 'mean_word_length': 2.205723124516628, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 11, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1116777', 'n_tokens_mistral': 1146, 'n_tokens_neox': 1067, 'n_words': 314}