<commit_before>import React, { PropTypes } from 'react';
import Drawer from 'material-ui/Drawer';
import AppBar from 'material-ui/AppBar';
import MenuItem from 'material-ui/MenuItem';
import IconButton from 'material-ui/IconButton';
import NavigationClose from 'material-ui/svg-icons/navigation/close';
import Link from 'react-router/lib/Link';
import { FormattedMessage } from 'react-intl';

const LayoutDrawer = ({ roles, logout, login, loggedIn, drawerOpened, toggleDrawer }) => (
  <Drawer
    docked={false}
    open={drawerOpened}
    onRequestChange={toggleDrawer}
  >
    <AppBar
      title="geekplanet"
      onLeftIconButtonTouchTap={toggleDrawer}
      iconElementLeft={<IconButton><NavigationClose /></IconButton>}
    />
    {
      roles.includes('admin') ?
        <MenuItem
          primaryText="Forms"
          containerElement={
            <Link to="/forms">
              <FormattedMessage id="NAVIGATION.FORMS" />
            </Link>
          }
          onTouchTap={toggleDrawer}
        />
        : null
    }
    {
      loggedIn ?
        <MenuItem
          primaryText={<FormattedMessage id="NAVIGATION.LOGOUT" />}
          onClick={logout}
          onTouchTap={toggleDrawer}
        />
        :
        <MenuItem primaryText={<FormattedMessage id="NAVIGATION.LOGIN" />} onClick={login} />
    }
  </Drawer>
);

LayoutDrawer.propTypes = {
  roles: PropTypes.arrayOf(PropTypes.string).isRequired,
  logout: PropTypes.func.isRequired,
  login: PropTypes.func.isRequired,
  loggedIn: PropTypes.bool.isRequired,
  drawerOpened: PropTypes.bool.isRequired,
  toggleDrawer: PropTypes.func.isRequired,
};

export default LayoutDrawer;<commit_msg>remove simultaneous use of tap and click<commit_after>import React, { PropTypes } from 'react';
import Drawer from 'material-ui/Drawer';
import AppBar from 'material-ui/AppBar';
import MenuItem from 'material-ui/MenuItem';
import IconButton from 'material-ui/IconButton';
import NavigationClose from 'material-ui/svg-icons/navigation/close';
import Link from 'react-router/lib/Link';
import { FormattedMessage } from 'react-intl';

const LayoutDrawer = ({ roles, logout, login, loggedIn, drawerOpened, toggleDrawer }) => (
  <Drawer
    docked={false}
    open={drawerOpened}
    onRequestChange={toggleDrawer}
  >
    <AppBar
      title="geekplanet"
      onLeftIconButtonTouchTap={toggleDrawer}
      iconElementLeft={<IconButton><NavigationClose /></IconButton>}
    />
    {
      roles.includes('admin') ?
        <MenuItem
          primaryText="Forms"
          containerElement={
            <Link to="/forms">
              <FormattedMessage id="NAVIGATION.FORMS" />
            </Link>
          }
          onClick={toggleDrawer}
        />
        : null
    }
    {
      loggedIn ?
        <MenuItem
          primaryText={<FormattedMessage id="NAVIGATION.LOGOUT" />}
          onClick={() => {
            toggleDrawer();
            logout();
          }}
        />
        :
        <MenuItem primaryText={<FormattedMessage id="NAVIGATION.LOGIN" />} onClick={login} />
    }
  </Drawer>
);

LayoutDrawer.propTypes = {
  roles: PropTypes.arrayOf(PropTypes.string).isRequired,
  logout: PropTypes.func.isRequired,
  login: PropTypes.func.isRequired,
  loggedIn: PropTypes.bool.isRequired,
  drawerOpened: PropTypes.bool.isRequired,
  toggleDrawer: PropTypes.func.isRequired,
};

export default LayoutDrawer;
{'fraction_non_alphanumeric': 0.1245216367382985, 'fraction_numerical': 0.0, 'mean_word_length': 2.9283236994219655, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 34, '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': '2251517', 'n_tokens_mistral': 1011, 'n_tokens_neox': 1032, 'n_words': 182}