<commit_before>import React from 'react';
import firebase, { reference, signIn } from '../firebase';
import { pick } from 'lodash';

export default class MessageBar extends React.Component {
  constructor() {
    super();
    this.state = {
      messages: [],
      draftMessage: '',
      length: 0,
    };
  }

  // submitMessage() {
  //   const { draftMessage } = this.state;
  //   reference.push({
  //     user: pick(user, 'displayName', 'email', 'uid'),
  //     content: draftMessage,
  //     createdAt: Date.now(),
  //   });
  //   this.setState({ draftMessage: '' });
  // }

  eraseMessage() {
    ;
  }

  render() {
    const user = this.state;
    return (
      <div>
        <div className="logged-in">
          {user ? <p>Logged in as {user.displayName} ({user.email})</p> : <button onClick={() => signIn()}>Sign In</button> }
      </div>
        <div className="type-here">
          <input type="text"
            placeholder="Message"
            onChange={ (e) => this.setState({ draftMessage: e.target.value, length: e.target.value.length})}
          />
        </div>
        <div>{this.state.length}</div>
        <button className="submit" onClick={ () => addNewMessage() }>
          Submit</button>
        <button className="clear" onClick={ () => this.setState({ draftMessage: '' }) }>
          Clear</button>
    </div>
    )
  }
}
<commit_msg>add classname to counter<commit_after>import React from 'react';
import firebase, { reference, signIn } from '../firebase';
import { pick } from 'lodash';

export default class MessageBar extends React.Component {
  constructor() {
    super();
    this.state = {
      length: 0,
    };
  }

  // submitMessage() {
  //   const { draftMessage } = this.state;
  //   reference.push({
  //     user: pick(user, 'displayName', 'email', 'uid'),
  //     content: draftMessage,
  //     createdAt: Date.now(),
  //   });
  //   this.setState({ draftMessage: '' });
  // }

  render() {
    const user = this.state;
    return (
      <div>
        <div className="logged-in">
          {user ? <p>Logged in as {user.displayName} ({user.email})</p> : <button onClick={() => signIn()}>Sign In</button> }
      </div>
        <div className="type-here">
          <input type="text"
            placeholder="Message"
            onChange={ (e) => this.setState({ draftMessage: e.target.value, length: e.target.value.length })}
          />
        </div>
        <div className="counter">{this.state.length}</div>
        <button className="submit" onClick={ () => addNewMessage() }>
          Submit</button>
        <button className="clear" onClick={ () => this.setState({ draftMessage: '' }) }>
          Clear</button>
    </div>
    )
  }
}

{'fraction_non_alphanumeric': 0.18295371050698017, 'fraction_numerical': 0.0007347538574577516, 'mean_word_length': 2.261077844311377, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 45, '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': '788654', 'n_tokens_mistral': 835, 'n_tokens_neox': 833, 'n_words': 179}