<commit_before>(function () {
    angular
        .module('summary')
        .controller('SummaryInterfaceController', controller);

    controller.$inject = ['ChartService'];

    /* jshint ignore:start */
    function controller(ChartService) {
        const vm = this;
        vm.changeTab = changeTab;
        vm.registerTab = registerTab;
        vm.unregisterTab = unregisterTab;
        vm.getChartsData = getChartsData;
        vm.reloadTabs = reloadTabs;
        const tabs = [];


        function changeTab(tabName, chartsData) {
            if (tabs.find(t => t.name === tabName))
                tabs.find(t => t.name === tabName).reload(chartsData);
        }

        function reloadTabs(chartsData) {
            tabs.forEach(t => t.reload(chartsData));
        }

        function registerTab(tab) {
            tabs.push(tab);
        }

        function unregisterTab(tab) {
            _.remove(tabs, tab);
        }

        async function getChartsData(researchEntity, refresh = false) {
            const res = await ChartService.getData(researchEntity, [
                'journalsByYear',
                'conferencesByYear',
                'booksByYear',
                'bookChaptersByYear',
                'disseminationTalksByYear',
                'scientificTalksByYear',
                'documentsByType',
                'filteredAffiliatedJournalsByYear',
                'filteredAffiliatedConferencesByYear',
                'filteredAffiliatedBooksByYear',
                'filteredAffiliatedBookChaptersByYear',
                'filteredNotAffiliatedJournalsByYear',
                'filteredNotAffiliatedConferencesByYear',
                'filteredNotAffiliatedBooksByYear',
                'filteredNotAffiliatedBookChaptersByYear',
                'hindexPerYear',
                'citationsPerYear',
                'citationsPerDocumentYear',
                'totalIfPerYear',
                'totalSjrPerYear',
                'totalSnipPerYear',
                'chartDataDate'
            ], refresh && researchEntity.id === 1);
            return res[0];
        }
    }

    /* jshint ignore:end */
})();<commit_msg>Changed default refresh to true<commit_after>(function () {
    angular
        .module('summary')
        .controller('SummaryInterfaceController', controller);

    controller.$inject = ['ChartService'];

    /* jshint ignore:start */
    function controller(ChartService) {
        const vm = this;
        vm.changeTab = changeTab;
        vm.registerTab = registerTab;
        vm.unregisterTab = unregisterTab;
        vm.getChartsData = getChartsData;
        vm.reloadTabs = reloadTabs;
        const tabs = [];


        function changeTab(tabName, chartsData) {
            if (tabs.find(t => t.name === tabName))
                tabs.find(t => t.name === tabName).reload(chartsData);
        }

        function reloadTabs(chartsData) {
            tabs.forEach(t => t.reload(chartsData));
        }

        function registerTab(tab) {
            tabs.push(tab);
        }

        function unregisterTab(tab) {
            _.remove(tabs, tab);
        }

        async function getChartsData(researchEntity, refresh = true) {
            const res = await ChartService.getData(researchEntity, [
                'journalsByYear',
                'conferencesByYear',
                'booksByYear',
                'bookChaptersByYear',
                'disseminationTalksByYear',
                'scientificTalksByYear',
                'documentsByType',
                'filteredAffiliatedJournalsByYear',
                'filteredAffiliatedConferencesByYear',
                'filteredAffiliatedBooksByYear',
                'filteredAffiliatedBookChaptersByYear',
                'filteredNotAffiliatedJournalsByYear',
                'filteredNotAffiliatedConferencesByYear',
                'filteredNotAffiliatedBooksByYear',
                'filteredNotAffiliatedBookChaptersByYear',
                'hindexPerYear',
                'citationsPerYear',
                'citationsPerDocumentYear',
                'totalIfPerYear',
                'totalSjrPerYear',
                'totalSnipPerYear',
                'chartDataDate'
            ], refresh && researchEntity.id !== 1);
            return res[0];
        }
    }

    /* jshint ignore:end */
})();
{'fraction_non_alphanumeric': 0.09887330420786387, 'fraction_numerical': 0.0009197516670498966, 'mean_word_length': 1.7689369828134947, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4038771', 'n_tokens_mistral': 1221, 'n_tokens_neox': 1080, 'n_words': 174}