<commit_before>(function () {
    'use strict';

    angular
        .module('atlas')
        .factory('stateToUrlMiddleware', stateToUrlMiddlewareFactory);

    stateToUrlMiddlewareFactory.$inject = ['stateToUrl', 'ACTIONS'];

    function stateToUrlMiddlewareFactory (stateToUrl, ACTIONS) {
        var ignoreActions = [
                ACTIONS.URL_CHANGE, //Prevent infinite loops
                ACTIONS.FETCH_DETAIL, //Don't update the state before asynchronous call are finished
                ACTIONS.FETCH_STRAATBEELD//,
                //ACTIONS.SHOW_LAYER_SELECTION, //Ignore state changes that don't update the URL
                //ACTIONS.HIDE_LAYER_SELECTION
            ],
            useReplace = [
                ACTIONS.MAP_SET_BASELAYER, //Replace the URL instead of adding a new entry to the browser history
                ACTIONS.MAP_ADD_OVERLAY,
                ACTIONS.MAP_REMOVE_OVERLAY,
                ACTIONS.MAP_PAN,
                ACTIONS.MAP_ZOOM,
                ACTIONS.STRAATBEELD_SET_ORIENTATION
            ];

        return function (store) {
            return function (next) {
                return function (action) {
                    var returnValue;

                    //Update the state first
                    returnValue = next(action);

                    //Then update the URL
                    if (ignoreActions.indexOf(action.type) === -1) {
                        stateToUrl.update(
                            store.getState(),
                            useReplace.indexOf(action.type) !== -1
                        );
                    }

                    return returnValue;
                };
            };
        };
    }
})();
<commit_msg>Commend cleanup<commit_after>(function () {
    'use strict';

    angular
        .module('atlas')
        .factory('stateToUrlMiddleware', stateToUrlMiddlewareFactory);

    stateToUrlMiddlewareFactory.$inject = ['stateToUrl', 'ACTIONS'];

    function stateToUrlMiddlewareFactory (stateToUrl, ACTIONS) {
        var ignoreActions = [
                ACTIONS.URL_CHANGE, //Prevent infinite loops
                ACTIONS.FETCH_DETAIL, //Don't update the state before asynchronous call are finished
                ACTIONS.FETCH_STRAATBEELD
            ],
            useReplace = [
                ACTIONS.MAP_SET_BASELAYER, //Replace the URL instead of adding a new entry to the browser history
                ACTIONS.MAP_ADD_OVERLAY,
                ACTIONS.MAP_REMOVE_OVERLAY,
                ACTIONS.MAP_PAN,
                ACTIONS.MAP_ZOOM,
                ACTIONS.STRAATBEELD_SET_ORIENTATION
            ];

        return function (store) {
            return function (next) {
                return function (action) {
                    var returnValue;

                    //Update the state first
                    returnValue = next(action);

                    //Then update the URL
                    if (ignoreActions.indexOf(action.type) === -1) {
                        stateToUrl.update(
                            store.getState(),
                            useReplace.indexOf(action.type) !== -1
                        );
                    }

                    return returnValue;
                };
            };
        };
    }
})();

{'fraction_non_alphanumeric': 0.08093361624734768, 'fraction_numerical': 0.0012124886329190664, 'mean_word_length': 1.3272214386459802, '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': '3230398', 'n_tokens_mistral': 853, 'n_tokens_neox': 785, 'n_words': 173}