<commit_before>function LicenseListCtrl($scope, $location, $routeParams, License) {

    $scope.notificationAlert = { show: false, message: '', type: 'info' };

    $scope.entityId = '';
    $scope.entity = '';
    $scope.licenseUrl = '#!/licenses';

    if ($routeParams.productId) {
        $scope.entityId = $routeParams.productId;
        $scope.entity = 'products';
        $scope.licenseUrl = '#!/' + $scope.entity + '/' + $scope.entityId + '/licenses';
    }
    else if ($routeParams.customerId) {
        $scope.entityId = $routeParams.customerId;
        $scope.entity = 'customers';
        $scope.licenseUrl = '#!/' + $scope.entity + '/' + $scope.entityId + '/licenses';
    }
    
    $scope.licenses = License.query({ findByEntity: $scope.entity, entityId: $scope.entityId },
        function(success, getResponseHeaders) {
            $scope.notificationAlert.show = false;
        },
        function(error, getResponseHeaders) {
            $scope.notificationAlert.show = true;
            $scope.notificationAlert.type = 'error';
            $scope.notificationAlert.message = error.data.responseStatus.message;
        });
    
    $scope.deleteLicense = function (license) {
        License.delete({ id: license.id },
            function(success, getResponseHeaders) {
                $scope.licenses.splice($scope.licenses.indexOf(license), 1);
                $scope.notificationAlert.show = false;
            },
            function(error, getResponseHeaders) {
                $scope.notificationAlert.show = true;
                $scope.notificationAlert.type = 'error';
                $scope.notificationAlert.message = error.data.responseStatus.message;
            });
    };
}

//LicenseListCtrl.$inject = ['$scope', '$location', '$routeParams', 'License'];
<commit_msg>fix formatting<commit_after>﻿function LicenseListCtrl($scope, $location, $routeParams, License) {

    $scope.notificationAlert = { show: false, message: '', type: 'info' };

    $scope.entityId = '';
    $scope.entity = '';
    $scope.licenseUrl = '#!/licenses';

    if ($routeParams.productId) {
        $scope.entityId = $routeParams.productId;
        $scope.entity = 'products';
        $scope.licenseUrl = '#!/' + $scope.entity + '/' + $scope.entityId + '/licenses';
    }
    else if ($routeParams.customerId) {
        $scope.entityId = $routeParams.customerId;
        $scope.entity = 'customers';
        $scope.licenseUrl = '#!/' + $scope.entity + '/' + $scope.entityId + '/licenses';
    }

    $scope.licenses = License.query({ findByEntity: $scope.entity, entityId: $scope.entityId },
        function (success, getResponseHeaders) {
            $scope.notificationAlert.show = false;
        },
        function (error, getResponseHeaders) {
            $scope.notificationAlert.show = true;
            $scope.notificationAlert.type = 'error';
            $scope.notificationAlert.message = error.data.responseStatus.message;
        });

    $scope.deleteLicense = function (license) {
        License.delete({ id: license.id },
            function (success, getResponseHeaders) {
                $scope.licenses.splice($scope.licenses.indexOf(license), 1);
                $scope.notificationAlert.show = false;
            },
            function (error, getResponseHeaders) {
                $scope.notificationAlert.show = true;
                $scope.notificationAlert.type = 'error';
                $scope.notificationAlert.message = error.data.responseStatus.message;
            });
    };
}

//LicenseListCtrl.$inject = ['$scope', '$location', '$routeParams', 'License'];

{'fraction_non_alphanumeric': 0.1506659267480577, 'fraction_numerical': 0.0005549389567147614, 'mean_word_length': 2.486460348162476, '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': '5206506', 'n_tokens_mistral': 1000, 'n_tokens_neox': 976, 'n_words': 163}