<commit_before>import React, { Component, PropTypes } from 'react';
import {
  StyleSheet,
  View,
  Text,
  TouchableOpacity
} from 'react-native';

class Button extends Component {
    static propTypes = {
        ...TouchableOpacity.propTypes,
        text: React.PropTypes.string.isRequired,
        backgroundColor: React.PropTypes.string.isRequired,
        borderColor: React.PropTypes.string.isRequired,
        borderRadius: React.PropTypes.number,
        shadowHeight: React.PropTypes.number,
        activeOpacity: React.PropTypes.number,
        containerStyle: View.propTypes.style,
        contentStyle: Text.propTypes.style
    }

    static defaultProps = {
        borderRadius: 8,
        shadowHeight: 4,
        activeOpacity: 0.9
    }


    constructor(props){
        super(props)

        this._pressIn = this._pressIn.bind(this)
        this._pressOut = this._pressOut.bind(this)

        this.state = {
            borderBottomWidth: this.props.shadowHeight,
            borderColor: this.props.borderColor,
            borderRadius: this.props.borderRadius,
            borderLeftWidth: 0.5,
            borderRightWidth: 0.5
        }
    }

    _pressIn(){
        this.setState({
            borderBottomWidth: 0,
            borderColor: 'transparent',
            borderRadius: this.props.borderRadius,
            borderLeftWidth: 0,
            borderRightWidth: 0
        })
    }

    _pressOut(){
        this.setState({
            borderBottomWidth: this.props.shadowHeight,
            borderColor: this.props.borderColor,
            borderRadius: this.props.borderRadius,
            borderLeftWidth: 0.5,
            borderRightWidth: 0.5
        })
    }


  render() {
    return (
      <TouchableOpacity
        onPress={() => console.log("onPress")}
        onPressIn={this._pressIn}
        onPressOut={this._pressOut}
        activeOpacity={this.props.activeOpacity}
        style={[styles.buttonContainer, this.props.containerStyle, {borderBottomWidth: this.state.borderBottomWidth, borderColor: this.state.borderColor, borderRadius: this.state.borderRadius, borderLeftWidth: this.state.borderLeftWidth, borderRightWidth: this.state.borderRightWidth}]}>
        <Text style={[styles.text, this.props.contentStyle]}>
            {this.props.text}
        </Text>
      </TouchableOpacity>
    );
  }
}

const styles = StyleSheet.create({
  buttonContainer: {
      justifyContent: 'center',
      alignItems: 'center',
      width: 150,
      height: 50,
      backgroundColor: '#1abc9c',
      paddingVertical: 10,
      paddingHorizontal: 20
  },
  text:{
      color: 'white',
      fontSize: 18,
      fontWeight: 'bold'
  }
});

export default Button;
<commit_msg>make up<commit_after>import React, { Component } from 'react';
import {
  StyleSheet,
  View,
  Text,
  TouchableOpacity
} from 'react-native';

class Button extends Component {
    static propTypes = {
        ...TouchableOpacity.propTypes,
        text: React.PropTypes.string.isRequired,
        backgroundColor: React.PropTypes.string,
        borderColor: React.PropTypes.string,
        borderRadius: React.PropTypes.number,
        shadowHeight: React.PropTypes.number,
        activeOpacity: React.PropTypes.number,
        containerStyle: View.propTypes.style,
        contentStyle: Text.propTypes.style
    }

    static defaultProps = {
        borderRadius: 8,
        shadowHeight: 4,
        activeOpacity: 0.9,
        backgroundColor: '#1abc9c',
        borderColor: '#16a085'
    }


    constructor(props){
        super(props)

        this._pressIn = this._pressIn.bind(this)
        this._pressOut = this._pressOut.bind(this)

        this.state = {
            borderBottomWidth: this.props.shadowHeight,
            borderColor: this.props.borderColor,
            borderRadius: this.props.borderRadius,
            borderLeftWidth: 0.5,
            borderRightWidth: 0.5
        }
    }

    _pressIn(){
        this.setState({
            borderBottomWidth: 0,
            borderColor: 'transparent',
            borderRadius: this.props.borderRadius,
            borderLeftWidth: 0,
            borderRightWidth: 0
        })
    }

    _pressOut(){
        this.setState({
            borderBottomWidth: this.props.shadowHeight,
            borderColor: this.props.borderColor,
            borderRadius: this.props.borderRadius,
            borderLeftWidth: 0.5,
            borderRightWidth: 0.5
        })
    }


  render() {
    return (
      <TouchableOpacity
        onPress={this.props.onPress}
        onPressIn={this._pressIn}
        onPressOut={this._pressOut}
        activeOpacity={this.props.activeOpacity}
        style={[styles.buttonContainer, this.props.containerStyle, {backgroundColor: this.props.backgroundColor, borderBottomWidth: this.state.borderBottomWidth, borderColor: this.state.borderColor, borderRadius: this.state.borderRadius, borderLeftWidth: this.state.borderLeftWidth, borderRightWidth: this.state.borderRightWidth}]}>
        <Text style={[styles.text, this.props.contentStyle]}>
            {this.props.text}
        </Text>
      </TouchableOpacity>
    );
  }
}

const styles = StyleSheet.create({
  buttonContainer: {
      justifyContent: 'center',
      alignItems: 'center',
  },
  text:{
      color: 'white',
      fontSize: 18,
      fontWeight: 'bold'
  }
});

export default Button;

{'fraction_non_alphanumeric': 0.10596765197992192, 'fraction_numerical': 0.009667224391150772, 'mean_word_length': 2.3292079207920793, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 12, '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': '5054943', 'n_tokens_mistral': 1568, 'n_tokens_neox': 1521, 'n_words': 273}