<commit_before>!function ($, jQuery, window, document) {
    'use strict';

    /**
     * @public
     * @constructor
     *
     * @param $scope
     * @param $log
     * @param {CostCentersResource} CostCentersResource
     */
    function costCenterListController($scope, $log, CostCentersResource) {

        init();

        $scope.orderBy = function(predicateName) {
            if (predicateName == $scope.predicate) {
                $scope.reverse = !$scope.reverse;
            }
            else {
                $scope.predicate = predicateName;
                $scope.reverse = false;
            }
        };

        function init() {
            $scope.hasError = false;
            $scope.predicate = 'identification';
            $scope.reverse = false;
            $scope.costCenters = null;

            CostCentersResource.listAll().$promise.then(function(result) {
                $log.debug('costCenterListController.listAll OK');
                $scope.hasError = false;
                $scope.costCenters = result;
            }, function (error) {
                $log.debug('costCenterListController.listAll ERROR');
                $scope.hasError = true;
                $scope.costCenters = [];
            });
        }
    }

    app.module.controller('costCenterListController', costCenterListController);
}();<commit_msg>init function fixed<commit_after>!function ($, jQuery, window, document) {
    'use strict';

    /**
     * @public
     * @constructor
     *
     * @param $scope
     * @param $log
     * @param {CostCentersResource} CostCentersResource
     */
    function costCenterListController($scope, $log, CostCentersResource) {

        init();

        function init() {
            $scope.hasError = false;
            $scope.predicate = 'identification';
            $scope.reverse = false;
            $scope.costCenters = [];

            CostCentersResource.listAll().$promise.then(function(result) {
                $log.debug('costCenterListController.listAll OK');
                $scope.hasError = false;
                $scope.costCenters = result;
            }, function (error) {
                $log.debug('costCenterListController.listAll ERROR');
                $scope.hasError = true;
                $scope.costCenters = [];
            });
        }

        $scope.orderBy = function(predicateName) {
            if (predicateName == $scope.predicate) {
                $scope.reverse = !$scope.reverse;
            }
            else {
                $scope.predicate = predicateName;
                $scope.reverse = false;
            }
        };
    }

    app.module.controller('costCenterListController', costCenterListController);
}();
{'fraction_non_alphanumeric': 0.12141280353200883, 'fraction_numerical': 0.0, 'mean_word_length': 1.7217217217217218, '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': '4247519', 'n_tokens_mistral': 738, 'n_tokens_neox': 705, 'n_words': 117}