<commit_before>var DashConsoleList = React.createClass({
  render: function() {
    var logItem = function(item) {
      return <li key={ item.timestamp }>{item.msg}</li>;
    };
    return (
      <ul>{this.props.items.map(logItem)}</ul>
    );
  }
});
var DashConsole = React.createClass({
  getInitialState: function() {
    return {items: []};
  },
  log: function(item) {
    var nextItems;
    if(typeof item === "string")
      nextItems = this.state.items.concat([{msg: item}]);
    else
      nextItems = this.state.items.concat([item]);

    this.setState({items: nextItems});
  },
  render: function() {
    return (
      <div>
        <DashConsoleList items={this.state.items} />
      </div><commit_msg>[Console] Fixed element keys<commit_after>var DashConsoleList = React.createClass({
  render: function() {
    var logItem = function(item) {
      return <li key={ item.id }>{item.msg}</li>;
    };
    return (
      <ul>{this.props.items.map(logItem)}</ul>
    );
  }
});
var DashConsole = React.createClass({
  getInitialState: function() {
    return {items: [], keyCount: 0};
  },
  log: function(item) {
    var nextItems;
    var key = this.state.keyCount.value;
    if(typeof item === "string")
      nextItems = this.state.items.concat([{msg: item, id: key}]);
    else
    {
      item.id = key;
      nextItems = this.state.items.concat([item]);
    }

    this.setState({items: nextItems, keyCount: key++});
  },
  render: function() {
    return (
      <div>
        <DashConsoleList items={this.state.items} />
      </div>
{'fraction_non_alphanumeric': 0.17363344051446947, 'fraction_numerical': 0.0006430868167202572, 'mean_word_length': 2.823095823095823, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '1358853', 'n_tokens_mistral': 517, 'n_tokens_neox': 509, 'n_words': 101}