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

    class SearchCtrl {
        constructor($scope, $timeout, quandlService, selectionService, currentWindowService) {
            this.$scope = $scope;
            this.$timeout = $timeout;
            this.quandlService = quandlService;
            this.selectionService = selectionService;
            this.currentWindowService = currentWindowService;

            this.store = null;
            this.query = '';
            this.noResults = false;
            this.stocks = [];
            this.errors = [];
            this.isLoading = false;

            this._watch();
        }

        getStore() {
            if (!window.storeService) {
                return null;
            }

            if (!this.store) {
                this.store = window.storeService.open(window.name);
            }
            return this.store;
        }

        getFavourites() {
            if (this.getStore()) {
                return this.store.get();
            }
            return null;
        }

        selection() {
            return this.selectionService.selectedStock().code;
        }

        select(stock) {
            reportAction('searchSelect-' + stock.code);
            if (this.getStore() && !this.store.isCompact()) {
                this.selectionService.select(stock);
            }
        }

        onSearchKeyDown(event) {
            if (event.keyCode === 38) {
                // Up
                this.changePointer(-1);
            } else if (event.keyCode === 40) {
                // Down<commit_msg>Fixing description for an analytics event.<commit_after>(function() {
    'use strict';

    class SearchCtrl {
        constructor($scope, $timeout, quandlService, selectionService, currentWindowService) {
            this.$scope = $scope;
            this.$timeout = $timeout;
            this.quandlService = quandlService;
            this.selectionService = selectionService;
            this.currentWindowService = currentWindowService;

            this.store = null;
            this.query = '';
            this.noResults = false;
            this.stocks = [];
            this.errors = [];
            this.isLoading = false;

            this._watch();
        }

        getStore() {
            if (!window.storeService) {
                return null;
            }

            if (!this.store) {
                this.store = window.storeService.open(window.name);
            }
            return this.store;
        }

        getFavourites() {
            if (this.getStore()) {
                return this.store.get();
            }
            return null;
        }

        selection() {
            return this.selectionService.selectedStock().code;
        }

        select(stock) {
            reportAction('Select search', stock.code);
            if (this.getStore() && !this.store.isCompact()) {
                this.selectionService.select(stock);
            }
        }

        onSearchKeyDown(event) {
            if (event.keyCode === 38) {
                // Up
                this.changePointer(-1);
            } else if (event.keyCode === 40) {
                // Down
{'fraction_non_alphanumeric': 0.11299435028248588, 'fraction_numerical': 0.003138731952291274, 'mean_word_length': 1.3262773722627736, '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': '6189112', 'n_tokens_mistral': 823, 'n_tokens_neox': 777, 'n_words': 143}