<commit_before>({
    doInit: function(component, event) {
        function updateStoreTarget(){
            component.set("v.store", window.reduxStore);
        }

        if(window.reduxStore) {
            window.reduxStore.subscribe(updateStoreTarget);
        } else {
            if(window.reduxComponentRegistry) {
                window.reduxComponentRegistry.push(component);
            } else {
                window.reduxComponentRegistry = [component];
            }

        }
    },

    createStore: function(component, event) {
        var params = event.getParam("arguments");

        if(params && Redux) {

            var rootReducer = params.rootReducer;
            var initialState = params.initialState;
            var middleware = params.middleware;

            if(window.reducerQueue) {
                rootReducer = Redux.combineReducers(Object.assign({}, rootReducer, window.reducerQueue));
            }

            if(rootReducer && initialState && middleware) {
                if(!window.reduxStore){
                    window.reduxStore= Redux.createStore(rootReducer, initialState, Redux.compose(Redux.applyMiddleware(middleware)));
                    window.reducerRegistry = rootReducer;
                }
            } else if(rootReducer && initialState && !middleware) {
                if(!window.reduxStore){
                    window.reduxStore = Redux.createStore(rootReducer, initialState);
                    window.reducerRegistry = rootReducer;
                }
            } else if(rootReducer && !initialState && !middleware) {
                if(!window.reduxStore){
                    window.reduxStore = Redux.createStore(rootReducer);
                    window.reducerRegistry = rootReducer;
                }
            }

            if(window.subscriberQueue) {
                window.subscriberQueue.map(function(subscriber) {
                    component.connect(subscriber.mapStateToAttributes, subscriber.target);
                });
            }

            if(window.dispatchQueue) {
                window.dispatchQueue.map(function(action) {
                   component.dispatch(action);
                });
            }

            if(window.reduxComponentRegistry) {
                window.reduxComponentRegistry.map(function(cmp) {
                    window.reduxStore.subscribe(function() {
                        cmp.set("v.store", window.reduxStore);
                    });<commit_msg>Collapse checks to one place.<commit_after>({
    doInit: function(component, event) {
        function updateStoreTarget(){
            component.set("v.store", window.reduxStore);
        }

        if(window.reduxStore) {
            window.reduxStore.subscribe(updateStoreTarget);
        } else {
            if(window.reduxComponentRegistry) {
                window.reduxComponentRegistry.push(component);
            } else {
                window.reduxComponentRegistry = [component];
            }

        }
    },

    createStore: function(component, event) {
        var params = event.getParam("arguments");

        if(params && Redux) {

            var rootReducer = params.rootReducer;
            var initialState = params.initialState;
            var middleware = params.middleware;

            if(window.reducerQueue) {
                rootReducer = Redux.combineReducers(Object.assign({}, rootReducer, window.reducerQueue));
            }

            if(!window.reduxStore) {
                if (rootReducer && initialState && middleware) {
                    window.reduxStore = Redux.createStore(rootReducer, initialState, Redux.compose(Redux.applyMiddleware(middleware)));
                    window.reducerRegistry = rootReducer;
                } else if (rootReducer && initialState && !middleware) {
                    window.reduxStore = Redux.createStore(rootReducer, initialState);
                    window.reducerRegistry = rootReducer;
                } else if (rootReducer && !initialState && !middleware) {
                    window.reduxStore = Redux.createStore(rootReducer);
                    window.reducerRegistry = rootReducer;
                }
            }

            if(window.subscriberQueue) {
                window.subscriberQueue.map(function(subscriber) {
                    component.connect(subscriber.mapStateToAttributes, subscriber.target);
                });
            }

            if(window.dispatchQueue) {
                window.dispatchQueue.map(function(action) {
                   component.dispatch(action);
                });
            }

            if(window.reduxComponentRegistry) {
                window.reduxComponentRegistry.map(function(cmp) {
                    window.reduxStore.subscribe(function() {
                        cmp.set("v.store", window.reduxStore);
                    });
{'fraction_non_alphanumeric': 0.09878825220784555, 'fraction_numerical': 0.0, 'mean_word_length': 1.6772952171522815, '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': '7129517', 'n_tokens_mistral': 1269, 'n_tokens_neox': 1172, 'n_words': 163}