<commit_before>import React from 'react';

class Popular extends React.Component {
	constructor (props){
		super(props);
		this.state = {
			selectedLanguage: 'All'
		};
		this.updateLnguage = this.updateLnguage.bind(this);

	}

	updateLnguage(lang){
		this.setState(function(){
			return {
				selectedLanguage : lang
			}
		});
	}

	render(){
		
		var languages = ['All','JavaScript','Ruby','Java','CSS','Python'];
		return (
			<ul className='languages'>
			    {languages.map(function(lang){
				  return (
						<li style={lang === this.state.selectedLanguage ? {color: '#d0021b'}: null}
						 	onClick={this.updateLnguage.bind(null, lang)}
							key={lang}>
								{lang}
						</li>	
					)
				},this)}
			</ul>
		)
	}
}
module.exports = Popular;<commit_msg>rebuild Popular Component<commit_after>import React from 'react';
import ProtoTypes from 'prop-types';


//Stateless Component 
function SelectedLanguage (props){
	var languages = ['All','JavaScript','Ruby','Java','CSS','Python'];
	return (
			<ul className='languages'>
			    {languages.map(function(lang){
				  return (
						<li style={lang === props.selectedLanguage ? {color: '#d0021b'}: null}
						 	onClick={props.onSelect.bind(null, lang)}
							key={lang}>
								{lang}
						</li>	
					)
				})}
			</ul>
		)
}


SelectedLanguage.ProtoTypes = {
	selectedLanguage : ProtoTypes.string.isRequired,
	onSelect : ProtoTypes.func.isRequired
}


class Popular extends React.Component {
	constructor (props){
		super(props);
		this.state = {
			selectedLanguage: 'All'
		};
		this.updateLnguage = this.updateLnguage.bind(this);

	}

	updateLnguage(lang){
		this.setState(function(){
			return {
				selectedLanguage : lang
			}
		});
	}

	render(){

		return (
			<div>
		<SelectedLanguage 
		selectedLanguage = {this.state.selectedLanguage}
		onSelect = {this.updateLnguage}
		/>
		</div>
		)
	}
}
module.exports = Popular;
{'fraction_non_alphanumeric': 0.15675960021041557, 'fraction_numerical': 0.004208311415044713, 'mean_word_length': 3.2837837837837838, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, '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': '3068243', 'n_tokens_mistral': 794, 'n_tokens_neox': 628, 'n_words': 112}