<commit_before>import React, { Component, PropTypes } from 'react'
const { shape, string, number, func } = PropTypes

import Product from './Product'

class ProductItem extends Component {
    static propTypes = {
        product: shape({
            title: string.isRequired,
            price: number.isRequired,
            inventory: number.isRequired,
        }).isRequired,
        onAddToCartClicked: func.isRequired,
    }

    onButtonClick = () => this.props.onAddToCartClicked(this.props.product.id);

    render() {
        const { product } = this.props

        return (
            <div style={{ marginBottom: 20 }}>
                <Product
                    title={product.title}
                    price={product.price}
                    quantity={product.inventory}
                />
                <button
                    onClick={this.onButtonClick}
                    disabled={product.inventory > 0 ? '' : 'disabled'}
                >
                    {product.inventory > 0 ? 'Add to cart' : 'Sold Out'}
                </button>
            </div>
        )
    }
}

export default ProductItem

<commit_msg>Remove extra semi-colon<commit_after>import React, { Component, PropTypes } from 'react'
const { shape, string, number, func } = PropTypes

import Product from './Product'

class ProductItem extends Component {
    static propTypes = {
        product: shape({
            title: string.isRequired,
            price: number.isRequired,
            inventory: number.isRequired,
        }).isRequired,
        onAddToCartClicked: func.isRequired,
    }

    onButtonClick = () => this.props.onAddToCartClicked(this.props.product.id)

    render() {
        const { product } = this.props

        return (
            <div style={{ marginBottom: 20 }}>
                <Product
                    title={product.title}
                    price={product.price}
                    quantity={product.inventory}
                />
                <button
                    onClick={this.onButtonClick}
                    disabled={product.inventory > 0 ? '' : 'disabled'}
                >
                    {product.inventory > 0 ? 'Add to cart' : 'Sold Out'}
                </button>
            </div>
        )
    }
}

export default ProductItem


{'fraction_non_alphanumeric': 0.10585683297180043, 'fraction_numerical': 0.0034707158351409977, 'mean_word_length': 1.539647577092511, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 19, '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': '3308391', 'n_tokens_mistral': 605, 'n_tokens_neox': 577, 'n_words': 132}