<commit_before>import React, {Component, PropTypes} from 'react';
import lodash from 'lodash';

export function listeningTo(storeTokens = [], getter) {
    if (storeTokens.some(token => token === undefined)) {
        throw new TypeError('@listeningTo cannot handle undefined tokens');
    }

    return decorator;

    function decorator(ChildComponent) {
        class ListeningContainerComponent extends Component {
            static contextTypes = {
                dependencyCache: PropTypes.instanceOf(Map)
            }

            static Original = ChildComponent

            getStores() {
                const {dependencyCache} = this.context;
<commit_msg>Re-use child component in displayName<commit_after>import React, {Component, PropTypes} from 'react';
import lodash from 'lodash';

export function listeningTo(storeTokens = [], getter) {
    if (storeTokens.some(token => token === undefined)) {
        throw new TypeError('@listeningTo cannot handle undefined tokens');
    }

    return decorator;

    function decorator(ChildComponent) {
        class ListeningContainerComponent extends Component {
            static contextTypes = {
                dependencyCache: PropTypes.instanceOf(Map)
            }

            static Original = ChildComponent
            static displayName = `ListeningContainerComponent (${ChildComponent.displayName || ChildComponent.name})`;

            getStores() {
                const {dependencyCache} = this.context;

{'fraction_non_alphanumeric': 0.08912896691424713, 'fraction_numerical': 0.0, 'mean_word_length': 2.8493506493506495, 'pattern_counts': {'":': 0, '<': 3, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2438124', 'n_tokens_mistral': 360, 'n_tokens_neox': 349, 'n_words': 99}