<commit_before>"use strict";


/**
 * Selects data from the Store.
 */
class CalculationSelector {

    /**
     * Returns calculation part of the state.
     * @param state {Object} Current store state
     * @returns {Object}
     * @private
     */
    _getCalculationState(state) {
        return state.calculation;
    }

    /**
     * Returns current version of the results.
     * @param state {Object} Current store state
     * @returns {number}
     */
    getVersion(state) {
        return this._getCalculationState(state).version;
    }

    /**
     * Returns calculated PCA.
     * @param state {Object} Current store state
     * @returns {Object}
     */
    getPca(state) {
        return this._getCalculationState(state).pca;
    }

    /**
     * Returns selected eigenpairs indexes.
     * @param state {Object} Current store state
     * @returns {[number]}
     */
    getEigens(state) {
        return this._getCalculationState(state).eigens;
    }

    /**
     * Returns calculated areas.
     * @param state {Object} Current store state
     * @returns {Object}
     */
    getAreas(state) {
        return this._getCalculationState(state).areas;
    }

    /**
     * Returns calculated areas.
     * @param state {Object} Current store state
     * @returns {Object}
     */
    getResults(state) {
        const eigens = this.getEigens(state);;;;;;;;;;;;;;;;;;
        const pca = this.getPca(state);
        const areas = this.getAreas(state);
        const k = this.getAreaCoefficient(state);
        const shown = this.areAreasShown(state);
        const version = this.getVersion(state);

        const projectedData = [];

        if (pca && eigens && areas) {
            const data = pca.data;
            for (let i = 0; i < data.length; i++) {
                const d = data[i];<commit_msg>Minor cleanup<commit_after>"use strict";


/**
 * Selects data from the Store.
 */
class CalculationSelector {

    /**
     * Returns calculation part of the state.
     * @param state {Object} Current store state
     * @returns {Object}
     * @private
     */
    _getCalculationState(state) {
        return state.calculation;
    }

    /**
     * Returns current version of the results.
     * @param state {Object} Current store state
     * @returns {number}
     */
    getVersion(state) {
        return this._getCalculationState(state).version;
    }

    /**
     * Returns calculated PCA.
     * @param state {Object} Current store state
     * @returns {Object}
     */
    getPca(state) {
        return this._getCalculationState(state).pca;
    }

    /**
     * Returns selected eigenpairs indexes.
     * @param state {Object} Current store state
     * @returns {[number]}
     */
    getEigens(state) {
        return this._getCalculationState(state).eigens;
    }

    /**
     * Returns calculated areas.
     * @param state {Object} Current store state
     * @returns {Object}
     */
    getAreas(state) {
        return this._getCalculationState(state).areas;
    }

    /**
     * Returns calculated areas.
     * @param state {Object} Current store state
     * @returns {Object}
     */
    getResults(state) {
        const eigens = this.getEigens(state);
        const pca = this.getPca(state);
        const areas = this.getAreas(state);
        const k = this.getAreaCoefficient(state);
        const shown = this.areAreasShown(state);
        const version = this.getVersion(state);

        const projectedData = [];

        if (pca && eigens && areas) {
            const data = pca.data;
            for (let i = 0; i < data.length; i++) {
                const d = data[i];
{'fraction_non_alphanumeric': 0.12050507823222618, 'fraction_numerical': 0.0005489980785067252, 'mean_word_length': 2.1145299145299146, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2127695', 'n_tokens_mistral': 1104, 'n_tokens_neox': 1047, 'n_words': 272}