<commit_before>(function(angular, CLIENT_VERSION) {
    'use strict';

    angular.module('gitlabKBApp.user', ['ui.router', 'angular-storage']).config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
        $stateProvider.decorator('views', function(state, parent) {
            var result = {},
                views = parent(state);

            angular.forEach(views, function(config, name) {
                config.templateUrl = CLIENT_VERSION + "/" + config.templateUrl;
                result[name] = config;
            });

            return result;
        });

        $stateProvider
            .state('login', {
                url: '/',
                templateUrl: 'assets/html/user/views/signin.html',
                controller: 'SigninController',
                data: {
                    access: 0
                }
            })
            .state('signup', {
                url: '/signup',
                templateUrl: 'assets/html/user/views/signup.html',
                controller: 'SignupController',
                data: {
                    access: 0
                }
            });
        $urlRouterProvider.otherwise('/');
    }]).config(['$httpProvider', function($httpProvider) {
        $httpProvider.interceptors.push(['$q', '$injector', 'store', function($q, $injector, store) {
            return {
                response: function(response) {
                    if (response.status === 401) {}
                    return response || $q.when(response);
                },
                responseError: function(rejection) {
                    var $state;
                    if (rejection.status === 401) {
                        $state = $injector.get('$state');
                        store.remove('id_token');
                        $httpProvider.defaults.headers.common['X-KB-Access-Token'] = '';
                        if (!store.get('state')) {
                            store.set('state', {
                                name: $state.current.name,
                                params: $state.params
                            });
                        }
                        window.location.pathname = '/';
                    }
                    if (rejection.status === 403) {
                        alert('Access denied');
                    }<commit_msg>Fixed undefined rejection status in http interceptor<commit_after>(function(angular, CLIENT_VERSION) {
    'use strict';

    angular.module('gitlabKBApp.user', ['ui.router', 'angular-storage']).config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {
        $stateProvider.decorator('views', function(state, parent) {
            var result = {},
                views = parent(state);

            angular.forEach(views, function(config, name) {
                config.templateUrl = CLIENT_VERSION + "/" + config.templateUrl;
                result[name] = config;
            });

            return result;
        });

        $stateProvider
            .state('login', {
                url: '/',
                templateUrl: 'assets/html/user/views/signin.html',
                controller: 'SigninController',
                data: {
                    access: 0
                }
            })
            .state('signup', {
                url: '/signup',
                templateUrl: 'assets/html/user/views/signup.html',
                controller: 'SignupController',
                data: {
                    access: 0
                }
            });
        $urlRouterProvider.otherwise('/');
    }]).config(['$httpProvider', function($httpProvider) {
        $httpProvider.interceptors.push(['$q', '$injector', 'store', function($q, $injector, store) {
            return {
                response: function(response) {
                    if (response.status === 401) {}
                    return response || $q.when(response);
                },
                responseError: function(rejection) {
                    var $state;
                    if (rejection.status === 401 || rejection.status === undefined) {
                        $state = $injector.get('$state');
                        store.remove('id_token');
                        $httpProvider.defaults.headers.common['X-KB-Access-Token'] = '';
                        if (!store.get('state')) {
                            store.set('state', {
                                name: $state.current.name,
                                params: $state.params
                            });
                        }
                        window.location.pathname = '/';
                    }
                    if (rejection.status === 403) {
                        alert('Access denied');
                    }
{'fraction_non_alphanumeric': 0.12974093264248704, 'fraction_numerical': 0.004559585492227979, 'mean_word_length': 1.238404452690167, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6055482', 'n_tokens_mistral': 1202, 'n_tokens_neox': 1088, 'n_words': 186}