<commit_before>(function($m) {

    "use strict";

    /**
     * @controller ProductController
     * @contributors <NAME>
     */
    $m.controller('ProductController',

        ['$scope', '$http', '$parameters', '$productHelper', '$window', '$location', '$rootScope',

            function ProductController($scope, $http, $parameters, $productHelper, $window, $location,
                                       $rootScope) {

                /**
                 * @property product
                 * @type {}
                 */
                $scope.product = null;

                /**
                 * @property adding
                 * @type {Boolean}
                 * @default false
                 */
                $scope.adding = false;

                /**
                 * @method dismiss
                 * Responsible for closing the product in focus.
                 * @return {void}
                 */
                $scope.dismiss = function dismiss() {
                    var url = $location.$$path.replace($scope.product.ident, '');
                    $location.path(url);
                };

                /**
                 * @on mao/product/loaded
                 * @param event {Object}
                 * @param ident {String}
                 * Responsible for changing the URL and opening up the product's modal window
                 * when the user selects a product.
                 * @return {void}
                 */
                $scope.$on('mao/product/loaded', function onProductLoaded(event, ident) {

                    // Finds the product by its ident once the content has been loaded.
                    $productHelper.hasLoaded().then(function() {

                        $scope.product = $productHelper.pluckBy('ident', ident);
<commit_msg>Added ability to close modal<commit_after>(function($m) {

    "use strict";

    /**
     * @controller ProductController
     * @contributors <NAME>
     */
    $m.controller('ProductController',

        ['$scope', '$http', '$parameters', '$productHelper', '$window', '$location', '$rootScope',

            function ProductController($scope, $http, $parameters, $productHelper, $window, $location,
                                       $rootScope) {

                /**
                 * @property product
                 * @type {}
                 */
                $scope.product = null;

                /**
                 * @property adding
                 * @type {Boolean}
                 * @default false
                 */
                $scope.adding = false;

                /**
                 * @method dismiss
                 * Responsible for closing the product in focus.
                 * @return {void}
                 */
                $scope.dismiss = function dismiss() {
                    var url = $location.$$path;
                    $location.search('product', null);
//                    $location.path(url);
                };

                /**
                 * @on mao/product/loaded
                 * @param event {Object}
                 * @param event {String}
                 * Responsible for changing the URL and opening up the product's modal window
                 * when the user selects a product.
                 * @return {void}
                 */
                $scope.$on('mao/product/loaded', function onProductLoaded(event, ident) {

                    // Finds the product by its ident once the content has been loaded.
                    $productHelper.hasLoaded().then(function() {

                        $scope.product = $productHelper.pluckBy('ident', ident);

{'fraction_non_alphanumeric': 0.11332605133806663, 'fraction_numerical': 0.0, 'mean_word_length': 1.1855608591885443, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6528640', 'n_tokens_mistral': 852, 'n_tokens_neox': 788, 'n_words': 210}