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

    angular.module("Tuner")
        .factory('Menu', ["$http", "$log", menuFactory]);

    /**
     * use of promise was found in the stackoverflow thread below :
     * http://stackoverflow.com/questions/16286605/initialize-angularjs-service-with-asynchronous-data
     * */

    function menuFactory($http, $log) {
        var index = 0,
            items = [];

        $http.get("/api/menu")
            .success(function(data) { // data, status, headers, config
                $log.debug("on success", data);

                data.forEach(function (item) {
                    items.push(item);
                });
            })
            .error(function(data, status) {
                $log.debug(data, status);
            });

        return {
            items   : items,
            index   : index
        };
    }
})();<commit_msg>removed comment<commit_after>(function () {
    'use strict';

    angular.module("Tuner")
        .factory('Menu', ["$http", "$log", menuFactory]);

    function menuFactory($http, $log) {
        var index = 0,
            items = [];

        $http.get("/api/menu")
            .success(function(data) { // data, status, headers, config
                $log.debug("on success", data);

                data.forEach(function (item) {
                    items.push(item);
                });
            })
            .error(function(data, status) {
                $log.debug(data, status);
            });

        return {
            items   : items,
            index   : index
        };
    }
})();
{'fraction_non_alphanumeric': 0.15149625935162095, 'fraction_numerical': 0.006234413965087282, 'mean_word_length': 1.4616564417177915, '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': '3934616', 'n_tokens_mistral': 455, 'n_tokens_neox': 426, 'n_words': 84}