<commit_before>(function (angular) {

    angular.module('refigureAuth')
        .directive('passwordValidator', Controller);

    Controller.$inject = [];

    function Controller() {
        return {
            restrict: 'A',
            require: 'ngModel',
            link: function (scope, element, attrs, ngModel) {
                ngModel.$parsers.push(function (value) {
                    if (value) {
                        if (value.length < 8) {
                            console.log('pass-length', false);
                            ngModel.$setValidity('pass-length', false);
                        } else {
                            console.log('pass-length', true);
                            ngModel.$setValidity('pass-length', true);
                        }

                        if (value === value.toLowerCase()) {
                            console.log('pass-uppercase', false);
                            ngModel.$setValidity('pass-uppercase', false);
                        } else {
                            console.log('pass-uppercase', true);
                            ngModel.$setValidity('pass-uppercase', true);
                        }

                        if (value === value.toUpperCase()) {
                            console.log('pass-lowercase', false);
                            ngModel.$setValidity('pass-lowercase', false);
                        } else {
                            console.log('pass-lowercase', true);
                            ngModel.$setValidity('pass-lowercase', true);
                        }

                        if (!value.match(/.*[\W\d]+.*/)) {
                            console.log('pass-chars', false);
                            ngModel.$setValidity('pass-chars', false);
                        } else {
                            console.log('pass-chars', true);
                            ngModel.$setValidity('pass-chars', true);
                        }
                    }

                    return value;
                });
            }
        };
    }

})(window.angular);<commit_msg>- console.log<commit_after>(function (angular) {

    angular.module('refigureAuth')
        .directive('passwordValidator', Controller);

    Controller.$inject = [];

    function Controller() {
        return {
            restrict: 'A',
            require: 'ngModel',
            link: function (scope, element, attrs, ngModel) {
                ngModel.$parsers.push(function (value) {
                    if (value) {
                        if (value.length < 8) {
                            ngModel.$setValidity('pass-length', false);
                        } else {
                            ngModel.$setValidity('pass-length', true);
                        }

                        if (value === value.toLowerCase()) {
                            ngModel.$setValidity('pass-uppercase', false);
                        } else {
                            ngModel.$setValidity('pass-uppercase', true);
                        }

                        if (value === value.toUpperCase()) {
                            ngModel.$setValidity('pass-lowercase', false);
                        } else {
                            ngModel.$setValidity('pass-lowercase', true);
                        }

                        if (!value.match(/.*[\W\d]+.*/)) {
                            ngModel.$setValidity('pass-chars', false);
                        } else {
                            ngModel.$setValidity('pass-chars', true);
                        }
                    }

                    return value;
                });
            }
        };
    }

})(window.angular);
{'fraction_non_alphanumeric': 0.12217438105489774, 'fraction_numerical': 0.0005382131324004305, 'mean_word_length': 0.9563157894736842, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '5395169', 'n_tokens_mistral': 860, 'n_tokens_neox': 816, 'n_words': 130}