<commit_before>package com.turlir.breaklayout.layout;

import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;

public class Mode implements Incrementable, Parcelable {

    private static final NameMapper MAPPER = new NameMapper() {
        @Override
        public String map(int mode) {
            switch (mode) {
                case BreakLayout.MODE_RIGHT:
                    return "RIGHT";
                case BreakLayout.MODE_LEFT:
                    return "LEFT";
                case BreakLayout.MODE_CENTER:
                    return "CENTER";
                case BreakLayout.MODE_EDGE:
                    return "EDGE";
                case BreakLayout.MODE_AS_IS:
                    return "EDGE";
                default:
                    return "RIGHT";
            }
        }
    };

    public final String mode;
    private int mId;
    private int mInitialCount;
    private int mCount;

    public Mode(int id) {
        this(MAPPER.map(id), id);
    }

    public Mode(int id, int count) {
        this(MAPPER.map(id), id, count);
    }

    public Mode(@NonNull String mode, int id) {
        this(mode, id, 2);
    }

    public Mode(@NonNull String mode, int id, int count) {
        this.mode = mode;
        mId = id;
        if (count < 1) {
            throw new IllegalArgumentException("count must be greater 2");
        }
        mCount = count;
        mInitialCount = mCount;
    }

    //<editor-fold desc="Incrementable">

    @Override
    public boolean isInc() {
        return mCount < 6; // 0 1 2 3 4 5
    }

    @Override
    public int inc() {
        if (isInc()) {
            mCount += 1;
        }
        return mCount;
    }

    @Override
    public boolean isDec() {
        return mCount > 2; // 2 3 4 5 6 7
    }

    @Override
    public int dec() {
        if (isDec()) {
            mCount -= 1;
        }
        return mCount;
    }

    @Override
    public int getCount() {
        return mCount;
    }

    @Override
    public void reset() {
        mCount = mInitialCount;
    }<commit_msg>Extract min and max const is Mode class<commit_after>package com.turlir.breaklayout.layout;

import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.NonNull;

public class Mode implements Incrementable, Parcelable {

    private static final int
            MIN = 2,
            MAX = 6;

    private static final NameMapper MAPPER = new NameMapper() {
        @Override
        public String map(int mode) {
            switch (mode) {
                case BreakLayout.MODE_RIGHT:
                    return "RIGHT";
                case BreakLayout.MODE_LEFT:
                    return "LEFT";
                case BreakLayout.MODE_CENTER:
                    return "CENTER";
                case BreakLayout.MODE_EDGE:
                    return "EDGE";
                case BreakLayout.MODE_AS_IS:
                    return "EDGE";
                default:
                    return "RIGHT";
            }
        }
    };

    public final String mode;
    private int mId;
    private int mInitialCount;
    private int mCount;

    public Mode(int id) {
        this(MAPPER.map(id), id);
    }

    public Mode(int id, int count) {
        this(MAPPER.map(id), id, count);
    }

    public Mode(@NonNull String mode, int id) {
        this(mode, id, 2);
    }

    public Mode(@NonNull String mode, int id, int count) {
        this.mode = mode;
        mId = id;
        if (count < MIN || count > MAX) {
            throw new IllegalArgumentException("count must be greater 2");
        }
        mCount = count;
        mInitialCount = mCount;
    }

    //<editor-fold desc="Incrementable">

    @Override
    public boolean isInc() {
        return mCount < MAX; // 0 1 2 3 4 5
    }

    @Override
    public int inc() {
        if (isInc()) {
            mCount += 1;
        }
        return mCount;
    }

    @Override
    public boolean isDec() {
        return mCount > MIN; // 2 3 4 5 6 7
    }

    @Override
    public int dec() {
        if (isDec()) {
            mCount -= 1;
        }
        return mCount;
    }

    @Override
    public int getCount() {
        return mCount;
    }

    @Override
    public void reset() {
        mCount = mInitialCount;
    }
{'fraction_non_alphanumeric': 0.09241760774371975, 'fraction_numerical': 0.008527310440193593, 'mean_word_length': 1.5014409221902016, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 8, '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': '1689930', 'n_tokens_mistral': 1292, 'n_tokens_neox': 1203, 'n_words': 361}