<commit_before>import React from 'react'
import {connect} from 'react-redux'
import {Link}  from 'react-router'
import Popover from 'material-ui/lib/popover/popover'
import PopoverAnimationFromTop from 'material-ui/lib/popover/popover-animation-from-top'
import classnames from 'classnames'

import style from './Header.style'


class UserDropdown extends React.Component {

  static propTypes = {
    onRequestClose: React.PropTypes.func
  }

  render() {
    return (
      <div style={{width: 200, overflowY: 'auto'}}>
        <Link to='/profile' className={style.dropDownItem}>Edit profile</Link>
        <Link to='/password' className={style.dropDownItem}>Change password</Link>
        <Link to='/logout' className={style.dropDownItem}>Sign out</Link>
      </div>
    )
  }
}

class UserItemRaw extends React.Component {
  state = {
    open: false
  }

  handleRequestClose = (e) => {
    this.setState({ open: false })
  }

  handleClick = (e) => {
    e.preventDefault()
    this.setState({
      open: true,
      anchorEl: e.currentTarget
    })
  }

  render() {
    const {user: {profile: {name} = {}} = {}} = this.props
    const classes = classnames({
      [style.headerItem]: true,
      [style.headerItemActive]: this.state.open
    })
    return (
      <div>
        <Link to='/profile' className={classes} onClick={this.handleClick}>
          <div style={{ marginRight: 12 }}>
            {name}
          </div>
          <img className={style.avatar} src='http://blogs.plos.org/dnascience/wp-content/plugins/all-in-one-seo-pack/images/default-user-image.png' />
        </Link>
        <Popover
          open={this.state.open}
          anchorEl={this.state.anchorEl}
          anchorOrigin={{horizontal: 'right', vertical: 'bottom'}}
          targetOrigin={{horizontal: 'right', vertical: 'top'}}
          onRequestClose={this.handleRequestClose}
          animation={PopoverAnimationFromTop}
          style={{ borderRadius: null }}<commit_msg>Showing profile picture on user menu<commit_after>import React from 'react'
import {connect} from 'react-redux'
import {Link}  from 'react-router'
import Popover from 'material-ui/lib/popover/popover'
import PopoverAnimationFromTop from 'material-ui/lib/popover/popover-animation-from-top'
import classnames from 'classnames'

import style from './Header.style'


class UserDropdown extends React.Component {

  static propTypes = {
    onRequestClose: React.PropTypes.func
  }

  render() {
    return (
      <div style={{width: 200, overflowY: 'auto'}}>
        <Link to='/profile' className={style.dropDownItem}>Edit profile</Link>
        <Link to='/password' className={style.dropDownItem}>Change password</Link>
        <Link to='/logout' className={style.dropDownItem}>Sign out</Link>
      </div>
    )
  }
}

class UserItemRaw extends React.Component {
  state = {
    open: false
  }

  handleRequestClose = (e) => {
    this.setState({ open: false })
  }

  handleClick = (e) => {
    e.preventDefault()
    this.setState({
      open: true,
      anchorEl: e.currentTarget
    })
  }

  render() {
    const {user: {profile: {name, picture} = {}} = {}} = this.props
    const classes = classnames({
      [style.headerItem]: true,
      [style.headerItemActive]: this.state.open
    })
    return (
      <div>
        <Link to='/profile' className={classes} onClick={this.handleClick}>
          <div style={{ marginRight: 12 }}>
            {name}
          </div>
          <img className={style.avatar} src={picture} />
        </Link>
        <Popover
          open={this.state.open}
          anchorEl={this.state.anchorEl}
          anchorOrigin={{horizontal: 'right', vertical: 'bottom'}}
          targetOrigin={{horizontal: 'right', vertical: 'top'}}
          onRequestClose={this.handleRequestClose}
          animation={PopoverAnimationFromTop}
          style={{ borderRadius: null }}
{'fraction_non_alphanumeric': 0.1435923829130211, 'fraction_numerical': 0.0025733401955738548, 'mean_word_length': 2.890890890890891, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 35, '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': '2458019', 'n_tokens_mistral': 1184, 'n_tokens_neox': 1176, 'n_words': 248}