<commit_before>var DataClass = (function (DateUtils, CommonUtils, YearsUtils, MonthUtils, DaysUtils, DateModel) {

    function DataClass(selected, startDateTime, endDateTime) {
        selected.datetime = CommonUtils.isValidNumber(selected.datetime) ? selected.datetime : null;
        startDateTime = CommonUtils.isValidNumber(startDateTime) ? startDateTime : null;
        endDateTime = CommonUtils.isValidNumber(endDateTime) ? endDateTime : null;

        this.selected = this._getSelected(selected, startDateTime, endDateTime);
        var selectedYear = DateUtils.getYear(this.selected.datetime);
        var selectedMonth = DateUtils.getMonth(this.selected.datetime);

        this._limitDates = new LimitsModel(startDateTime, endDateTime);
        this._startDateTime = startDateTime;
        this._endDateTime = endDateTime;
        this.years = YearsUtils.getYearsList(startDateTime, endDateTime, this._limitDates);
        this.month = MonthUtils.getMonthList(startDateTime, endDateTime, this._limitDates, selectedYear);
        this.days = DaysUtils.getDaysList(startDateTime, endDateTime, this._limitDates, selectedYear, selectedMonth);

        return this;
    }

    _getSelected = function (selected, startDateTime, endDateTime) {
        var result;

        var isBiggerThenStart = (selected.datetime > startDateTime);
        var isEqualToStart = (selected.datetime === startDateTime);
        var isLowerThenEnd = (selected.datetime > endDateTime);
        var isEqualToEnd = (selected.datetime === endDateTime);

        //start == 1; selected == 1 or 2 or 3; end == 3;
        if ((isBiggerThenStart || isEqualToStart) || (isLowerThenEnd || isEqualToEnd)) {
            result = new DateModel(selected.datetime);
        } else
        //start == 1; selected == 0
        if (!isBiggerThenStart) {
            result = new DateModel(startDateTime);
        } else
        //selected == 4; end == 3;
        if (!isBiggerThenStart) {
            result = new DateModel(endDateTime);
        }
        //paranoid case
        else {
            result = new DateModel(new Date().getTime());
        }

        return result;
    };

    reloadYearsList = function () {
        this.years = YearsUtils.getYearsList(this._startDateTime, this._endDateTime, this._limitDates);
        return this;
    };

    reloadMonthList = function () {
        var selectedYear = DateUtils.getYear(this.selected.datetime);
        this.month = MonthUtils.getMonthList(this._startDateTime, this._endDateTime, this._limitDates, selectedYear);
        return this;
    };

    reloadDaysList = function () {
        var selectedYear = DateUtils.getYear(this.selected.datetime);
        var selectedMonth = DateUtils.getMonth(this.selected.datetime);
        this.days = DaysUtils.getDaysList(this._startDateTime, this._endDateTime, this._limitDates, selectedYear, selectedMonth);
        return this;
    };

})(DateUtils, CommonUtils, YearsUtils, MonthUtils, DaysUtils, DateModel);<commit_msg>refactor hardcoded js order<commit_after>var DataClass = (function (DateUtils, CommonUtils, YearsUtils, MonthUtils, DaysUtils, DateModel) {

    function DataClass(selected, startDateTime, endDateTime) {
        selected.datetime = CommonUtils.isValidNumber(selected.datetime) ? selected.datetime : null;
        startDateTime = CommonUtils.isValidNumber(startDateTime) ? startDateTime : null;
        endDateTime = CommonUtils.isValidNumber(endDateTime) ? endDateTime : null;

        this.selected = this._getSelected(selected, startDateTime, endDateTime);
        var selectedYear = DateUtils.getYear(this.selected.datetime);
        var selectedMonth = DateUtils.getMonth(this.selected.datetime);

        this._limitDates = new LimitsModel(startDateTime, endDateTime);
        this._startDateTime = startDateTime;
        this._endDateTime = endDateTime;
        this.years = YearsUtils.getYearsList(startDateTime, endDateTime);
        this.month = MonthUtils.getMonthList(startDateTime, endDateTime, selectedYear);
        this.days = DaysUtils.getDaysList(startDateTime, endDateTime, selectedYear, selectedMonth);

        return this;
    }

    _getSelected = function (selected, startDateTime, endDateTime) {
        var result;

        var isBiggerThenStart = (selected.datetime > startDateTime);
        var isEqualToStart = (selected.datetime === startDateTime);
        var isLowerThenEnd = (selected.datetime > endDateTime);
        var isEqualToEnd = (selected.datetime === endDateTime);

        //start == 1; selected == 1 or 2 or 3; end == 3;
        if ((isBiggerThenStart || isEqualToStart) || (isLowerThenEnd || isEqualToEnd)) {
            result = new DateModel(selected.datetime);
        } else
        //start == 1; selected == 0
        if (!isBiggerThenStart) {
            result = new DateModel(startDateTime);
        } else
        //selected == 4; end == 3;
        if (!isBiggerThenStart) {
            result = new DateModel(endDateTime);
        }
        //paranoid case
        else {
            result = new DateModel(new Date().getTime());
        }

        return result;
    };

    reloadYearsList = function () {
        this.years = YearsUtils.getYearsList(this._startDateTime, this._endDateTime);
        return this;
    };

    reloadMonthList = function () {
        var selectedYear = DateUtils.getYear(this.selected.datetime);
        this.month = MonthUtils.getMonthList(this._startDateTime, this._endDateTime, selectedYear);
        return this;
    };

    reloadDaysList = function () {
        var selectedYear = DateUtils.getYear(this.selected.datetime);
        var selectedMonth = DateUtils.getMonth(this.selected.datetime);
        this.days = DaysUtils.getDaysList(this._startDateTime, this._endDateTime, selectedYear, selectedMonth);
        return this;
    };

})(DateUtils, CommonUtils, YearsUtils, MonthUtils, DaysUtils, DateModel);
{'fraction_non_alphanumeric': 0.10305084745762712, 'fraction_numerical': 0.0030508474576271187, 'mean_word_length': 3.0752762430939224, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2332549', 'n_tokens_mistral': 1583, 'n_tokens_neox': 1537, 'n_words': 340}