<commit_before>import React, { Component, PropTypes } from "react";
import ClassNames from "classnames";
import "./index.less";

class ControllerUnit extends Component {
    constructor() {
        super();
        this.handleClick = this.handleClick.bind(this);
    }
    handleClick(e) {
        this.props.arrange.isCenter ? this.props.inverse() : this.props.center();
        e.stopPropagation();
        e.preventDefault();
    }
    render() {
        const { arrange } = this.props;
        const { isInverse, isCenter } = arrange;
        const controllerUnitClassName = ClassNames({
            "controller-unit": true,
            "is-center": isCenter,
            "is-inverse": isInverse
        });
        return <span className={controllerUnitClassName} onClick={this.handleClick}></span>
    }
}

export default ControllerUnit;<commit_msg>modify controllerUnit<commit_after>import React, { Component, PropTypes } from "react";
import ClassNames from "classnames";
import "./index.less";

const propTypes = {
    arrange: PropTypes.object,
    inverse: PropTypes.func,
    center: PropTypes.func
};

class ControllerUnit extends Component {
    constructor() {
        super();
        this.handleClick = this.handleClick.bind(this);
    }
    handleClick(e) {
        this.props.arrange.isCenter ? this.props.inverse() : this.props.center();
        e.stopPropagation();
        e.preventDefault();
    }
    render() {
        const { arrange } = this.props;
        const { isInverse, isCenter } = arrange;
        const controllerUnitClassName = ClassNames({
            "controller-unit": true,
            "is-center": isCenter,
            "is-inverse": isInverse
        });
        return <span className={controllerUnitClassName} onClick={this.handleClick}></span>
    }
}

ControllerUnit.propTypes = propTypes;

export default ControllerUnit;
{'fraction_non_alphanumeric': 0.12366167023554604, 'fraction_numerical': 0.0, 'mean_word_length': 2.738, 'pattern_counts': {'":': 6, '<': 7, '<?xml version=': 0, '>': 7, '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': '1198871', 'n_tokens_mistral': 505, 'n_tokens_neox': 509, 'n_words': 110}