<commit_before>package io.sniffy.util;

import io.sniffy.test.Count;
import io.sniffy.Expectation;

public class Range {

    public final int value;
    public final int min;
    public final int max;

    public Range(int value, int min, int max) {

        if (-1 != value) {
            if (-1 != min || -1 != max) {
                throw new IllegalArgumentException("Ambiguous configuration - parameter value used together with min/max");
            } else {
                this.min = this.max = this.value = value;
            }
        } else {
            if (min > max) {
                throw new IllegalArgumentException("Min parameter cannot be larger than max parameter");
            } else if (max == min) {
                this.min = this.max = this.value = max;
            } else {
                this.value = value;
                this.min = min;
                this.max = max;
            }
        }

    }

    public static Range parse(Count count) {
        return new Range(count.value(), count.min(), count.max());
    }
<commit_msg>Fixed code<commit_after>package io.sniffy.util;

import io.sniffy.test.Count;
import io.sniffy.Expectation;

public class Range {

    public final int value;
    public final int min;
    public final int max;

    public Range(int value, int min, int max) {

        if (-1 != value) {
            if (-1 != min || -1 != max) {
                throw new IllegalArgumentException("Ambiguous configuration - parameter value used together with min/max");
            } else {
                this.min = this.max = this.value = value;
            }
        } else {
            if (min > max && -1 != max) {
                throw new IllegalArgumentException("Min parameter cannot be larger than max parameter");
            } else if (max == min) {
                this.min = this.max = this.value = max;
            } else {
                this.value = value;
                this.min = min;
                this.max = max;
            }
        }

    }

    public static Range parse(Count count) {
        return new Range(count.value(), count.min(), count.max());
    }

{'fraction_non_alphanumeric': 0.10700934579439253, 'fraction_numerical': 0.0032710280373831778, 'mean_word_length': 1.5764139590854391, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1872269', 'n_tokens_mistral': 591, 'n_tokens_neox': 564, 'n_words': 185}