<commit_before>import { Meteor } from 'meteor/meteor';
import React, { PropTypes } from 'react';
import { DropdownButton, MenuItem } from 'react-bootstrap';
import Measures from '../../../../api/measures/measures.js';
import CursorPlaceholder from './cursor-placeholder.jsx';

const Func = (props) => {
  const type = Measures.Expressions.types.get(props.expression.typeName);

  let icon;
  if (props.expression.name) {
    icon = 'fa';
  } else {
    icon = type.icon;
  }

  return (
    <div
      key={props.expression._id}
    >
      <DropdownButton
        style={props.buttonStyle}
        id={props.expression._id}
        className={icon}
        title={props.expression.name}
        noCaret
        onSelect={(name) => Meteor.call(
          'Measures.Expressions.setName',
          props.measure._id,
          props.expression._id,
          name
        )}
      >
        {type.characteristics.map((characteristic) => (
          <MenuItem
            key={characteristic.name}
            eventKey={characteristic.name}
          >
            {characteristic.name}
          </MenuItem>
        ))}
      </DropdownButton>
      <CursorPlaceholder
        cursor={props.cursor}
        setCursor={props.setCursor}
        expressionId={props.expression._id}
      />
    </div>
  );
};

Func.propTypes = {
  measure: PropTypes.object.isRequired,
  expression: PropTypes.object.isRequired,
  buttonStyle: PropTypes.object.isRequried,
  cursor: PropTypes.object.isRequired,
  setCursor: PropTypes.func.isRequired,
};

export default Func;
<commit_msg>Remove EOF newline<commit_after>import { Meteor } from 'meteor/meteor';
import React, { PropTypes } from 'react';
import { DropdownButton, MenuItem } from 'react-bootstrap';
import Measures from '../../../../api/measures/measures.js';
import CursorPlaceholder from './cursor-placeholder.jsx';

const Func = (props) => {
  const type = Measures.Expressions.types.get(props.expression.typeName);

  let icon;
  if (props.expression.name) {
    icon = 'fa';
  } else {
    icon = type.icon;
  }

  return (
    <div
      key={props.expression._id}
    >
      <DropdownButton
        style={props.buttonStyle}
        id={props.expression._id}
        className={icon}
        title={props.expression.name}
        noCaret
        onSelect={(name) => Meteor.call(
          'Measures.Expressions.setName',
          props.measure._id,
          props.expression._id,
          name
        )}
      >
        {type.characteristics.map((characteristic) => (
          <MenuItem
            key={characteristic.name}
            eventKey={characteristic.name}
          >
            {characteristic.name}
          </MenuItem>
        ))}
      </DropdownButton>
      <CursorPlaceholder
        cursor={props.cursor}
        setCursor={props.setCursor}
        expressionId={props.expression._id}
      />
    </div>
  );
};

Func.propTypes = {
  measure: PropTypes.object.isRequired,
  expression: PropTypes.object.isRequired,
  buttonStyle: PropTypes.object.isRequried,
  cursor: PropTypes.object.isRequired,
  setCursor: PropTypes.func.isRequired,
};

export default Func;
{'fraction_non_alphanumeric': 0.13112667091024824, 'fraction_numerical': 0.0, 'mean_word_length': 2.386853448275862, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 23, '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': '6645123', 'n_tokens_mistral': 938, 'n_tokens_neox': 933, 'n_words': 158}