<commit_before>import React, {PureComponent, ReactElement} from 'react'
import {connect} from 'react-redux'
import {bindActionCreators} from 'redux'
import {ErrorHandling} from 'src/shared/decorators/errors'

import {dismissOverlay} from 'src/shared/actions/overlayTechnology'

interface Options {
  dismissOnClickOutside?: boolean
  dismissOnEscape?: boolean
  transitionTime?: number
}

interface Props {
  overlayNode?: ReactElement<any>
  options: Options
  handleDismissOverlay: () => void
}

interface State {
  visible: boolean
}

@ErrorHandling
class Overlay extends PureComponent<Props, State> {
  private animationTimer: number

  constructor(props) {
    super(props)

    this.state = {
      visible: false,
    }
  }

  public componentDidUpdate(prevProps) {
    if (prevProps.overlayNode === null && this.props.overlayNode) {
      return this.setState({visible: true})
    }
  }

  public render() {
    const {overlayNode} = this.props

    return (
      <div className={this.overlayClass}>
        <div className="overlay--dialog">
          {overlayNode &&
            React.cloneElement(overlayNode, {
              onDismissOverlay: this.handleAnimateDismiss,
            })}
        </div>
        <div className="overlay--mask" onClick={this.handleClickOutside} />
      </div>
    )
  }

  private get overlayClass(): string {
    const {visible} = this.state
    return `overlay-tech ${visible ? 'show' : ''}`
  }

  private get options(): Options {
    const {options} = this.props
    const defaultOptions = {
      dismissOnClickOutside: false,
      dismissOnEscape: false,
      transitionTime: 300,
    }

    return {...defaultOptions, ...options}
  }

  public handleClickOutside = () => {
    const {handleDismissOverlay, options: {dismissOnClickOutside}} = this.props

    if (dismissOnClickOutside) {
      handleDismissOverlay()
    }
  }
<commit_msg>Make error go bye bye<commit_after>import React, {PureComponent, ReactElement} from 'react'
import {connect} from 'react-redux'
import {bindActionCreators} from 'redux'
import {ErrorHandling} from 'src/shared/decorators/errors'

import {dismissOverlay} from 'src/shared/actions/overlayTechnology'

interface Options {
  dismissOnClickOutside?: boolean
  dismissOnEscape?: boolean
  transitionTime?: number
}

interface Props {
  overlayNode?: ReactElement<any>
  options: Options
  handleDismissOverlay: () => void
}

interface State {
  visible: boolean
}

@ErrorHandling
class Overlay extends PureComponent<Props, State> {
  private animationTimer: number

  constructor(props) {
    super(props)

    this.state = {
      visible: false,
    }
  }

  public componentDidUpdate(prevProps) {
    if (prevProps.overlayNode === null && this.props.overlayNode) {
      return this.setState({visible: true})
    }
  }

  public render() {
    const {overlayNode} = this.props

    return (
      <div className={this.overlayClass}>
        <div className="overlay--dialog">
          {overlayNode &&
            React.cloneElement(overlayNode, {
              onDismissOverlay: this.handleAnimateDismiss,
            })}
        </div>
        <div className="overlay--mask" onClick={this.handleClickOutside} />
      </div>
    )
  }

  private get overlayClass(): string {
    const {visible} = this.state
    return `overlay-tech ${visible ? 'show' : ''}`
  }

  private get options(): Options {
    const {options} = this.props
    const defaultOptions = {
      dismissOnClickOutside: false,
      dismissOnEscape: false,
      transitionTime: 300,
    }

    return {...defaultOptions, ...options}
  }

  public handleClickOutside = () => {
    const {handleDismissOverlay, options} = this.props
    const {dismissOnClickOutside} = options

    if (dismissOnClickOutside) {
      handleDismissOverlay()
    }
  }

{'fraction_non_alphanumeric': 0.11458607095926412, 'fraction_numerical': 0.0015768725361366622, 'mean_word_length': 3.182417582417582, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 21, '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': '7051088', 'n_tokens_mistral': 1140, 'n_tokens_neox': 1099, 'n_words': 252}