<commit_before>import React, { Component, PropTypes } from 'react';
import {
    Button,
    ButtonToolbar
} from 'react-bootstrap-bk';
import { map } from 'lodash';

class Article extends Component {
    getDisplayName() {
        return 'Article';
    }

    render () {
        var moreButton;

        if (this.props.loading) {
            return (
                <div>Loading Articles...</div>
            );
        }

        if (this.props.articles.pageInfo.hasNextPage) {
            moreButton = <Button onClick={ this.props.loadMoreArticles }>More</Button>;
        } else {
            moreButton = <Button disabled>More</Button>;
        }

        return (
            <div>
                {
                    this.props.articles.edges.map(
                        (edge) => {
                            return (
                                <p key={ edge.node.id }>
                                    <span>
                                        <b>{ edge.node.title }</b>
                                    </span>
                                    <br />
                                    <span>{ edge.node.content }</span>
                                </p>
                            );
                        }
                    )
                }
                { moreButton }
            </div>
        );
    }
}

Article.propTypes = PropTypes.shape({
    loading: PropTypes.bool.isRequired,
    articles: PropTypes.shape({
        pageInfo: PropTypes.shape({<commit_msg>Render article tags and load more<commit_after>import React, { Component, PropTypes } from 'react';
import {
    Button,
    ButtonToolbar
} from 'react-bootstrap-bk';
import { map } from 'lodash';

class Article extends Component {
    getDisplayName() {
        return 'Article';
    }

    render () {
        var moreButton;

        if (this.props.loading) {
            return (
                <div>Loading Articles...</div>
            );
        }

        if (this.props.articles.pageInfo.hasNextPage) {
            moreButton = <Button onClick={ this.props.loadMoreArticles } block>More</Button>;
        } else {
            moreButton = <Button disabled block>More</Button>;
        }

        return (
            <div>
                {
                    this.props.articles.edges.map(
                        (edge) => {
                            return (
                                <p key={ edge.node.id }>
                                    <span>
                                        <b>{ edge.node.title }</b>
                                    </span>
                                    <br />
                                    <span>{ edge.node.content }</span>
                                    <div>
                                        {
                                            edge.node.tags.edges.map(
                                                (edge) => {
                                                    return (
                                                        <span>
                                                            <a href="#">
                                                                #{ edge.node.name }
                                                            </a>
                                                        </span>
                                                    )
                                                }
                                            )
                                        }
                                    </div>
                                </p>
                            );
                        }
                    )
                }
                { moreButton }
            </div>
        );
    }
}

Article.propTypes = PropTypes.shape({
    loading: PropTypes.bool.isRequired,
    articles: PropTypes.shape({
        pageInfo: PropTypes.shape({
{'fraction_non_alphanumeric': 0.0932009167303285, 'fraction_numerical': 0.0, 'mean_word_length': 0.6686491079014444, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 46, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 40, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2637171', 'n_tokens_mistral': 830, 'n_tokens_neox': 790, 'n_words': 154}