<commit_before>// - Import react components
import React, { Component } from 'react'
import { CircularProgress } from 'material-ui/Progress'
import Dialog from 'material-ui/Dialog'
import red from 'material-ui/colors/red'
import { IMasterLoadingComponentProps } from './IMasterLoadingComponentProps'
import { IMasterLoadingComponentState } from './IMasterLoadingComponentState'
import Grid from 'material-ui/Grid/Grid'
import { Typography } from 'material-ui'

// - Import app components

// - Create MasterLoading component class
export default class MasterLoadingComponent extends Component<IMasterLoadingComponentProps, IMasterLoadingComponentState> {

  // Constructor
  constructor(props: IMasterLoadingComponentProps) {
    super(props)
    // Binding functions to `this`

  }

  loadProgress() {
    const { error, timedOut, pastDelay } = this.props
    if (error) {
      return (
        <Grid container>
          <Grid item> 
          <CircularProgress style={{ color: red[500] }} size={50} />
          </Grid>
          <Grid item> 
          <Typography variant='title' color='primary' style={{ marginLeft: '15px' }} >
            Unexpected Error Happened ...
          </Typography>
          </Grid>
        </Grid>
      )
    } else if (timedOut) {
      return (
        <Grid container>
          <Grid item> 
          <CircularProgress style={{ color: red[500] }} size={50} />
          </Grid>
          <Grid item> 
          <Typography variant='title' color='primary' style={{ marginLeft: '15px' }} >
            It takes long time ...
          </Typography>
          </Grid>
        </Grid>
      )
    } else if (pastDelay) {
      return (
        <Grid container>
          <Grid item> 
          <CircularProgress size={50} />
          </Grid>
          <Grid item> 
          <Typography variant='title' color='primary' style={{ marginLeft: '15px' }} >
            Loading...
          </Typography>
          </Grid>
        </Grid>
      )
    } else {
      return (
        <Grid container>
          <Grid item> 
          <CircularProgress size={50} />
          </Grid>
          <Grid item> 
          <Typography variant='title' color='primary' style={{ marginLeft: '15px' }} >
            Loading...
          </Typography>
          </Grid>
        </Grid>
      )
    }
  }

  // Render app DOM component
  render() {
    return (

      <div className='mLoading__loading'>
        {
          this.loadProgress()
        }

      </div>

    )<commit_msg>[Improvement] Show loading text.<commit_after>// - Import react components
import React, { Component } from 'react'
import { CircularProgress } from 'material-ui/Progress'
import Dialog from 'material-ui/Dialog'
import red from 'material-ui/colors/red'
import { IMasterLoadingComponentProps } from './IMasterLoadingComponentProps'
import { IMasterLoadingComponentState } from './IMasterLoadingComponentState'
import Grid from 'material-ui/Grid/Grid'
import { Typography } from 'material-ui'

// - Import app components

// - Create MasterLoading component class
export default class MasterLoadingComponent extends Component<IMasterLoadingComponentProps, IMasterLoadingComponentState> {

  // Constructor
  constructor(props: IMasterLoadingComponentProps) {
    super(props)
    // Binding functions to `this`

  }

  loadProgress() {
    const { error, timedOut, pastDelay } = this.props
    if (error) {
      return (
        <Grid container>
          <Grid item>
            <CircularProgress style={{ color: red[500] }} size={50} />
          </Grid>
          <Grid item style={{ zIndex: 1 }}>
            <Typography variant='title' color='primary' style={{ marginLeft: '15px' }} >
              Unexpected Error Happened ...
          </Typography>
          </Grid>
        </Grid>
      )
    } else if (timedOut) {
      return (
        <Grid container>
          <Grid item>
            <CircularProgress style={{ color: red[500] }} size={50} />
          </Grid>
          <Grid item style={{ zIndex: 1 }}>
            <Typography variant='title' color='primary' style={{ marginLeft: '15px' }} >
              It takes long time ...
          </Typography>
          </Grid>
        </Grid>
      )
    } else if (pastDelay) {
      return (
        <Grid container>
          <Grid item>
            <CircularProgress size={50} />
          </Grid>
          <Grid item style={{ zIndex: 1 }}>
            <Typography variant='title' color='primary' style={{ marginLeft: '15px' }} >
              Loading...
          </Typography>
          </Grid>
        </Grid>
      )
    } else {
      return (
        <Grid container>
          <Grid item>
            <CircularProgress size={50} />
          </Grid>
          <Grid item style={{ zIndex: 1 }}>
            <Typography variant='title' color='primary' style={{ marginLeft: '15px' }} >
              Loading...
          </Typography>
          </Grid>
        </Grid>
      )
    }
  }

  // Render app DOM component
  render() {
    return (

      <div className='mLoading__loading'>
        {
          this.loadProgress()
        }

      </div>

    )
{'fraction_non_alphanumeric': 0.12643678160919541, 'fraction_numerical': 0.009351256575102279, 'mean_word_length': 1.9522714203565268, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 81, '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': '6716679', 'n_tokens_mistral': 1440, 'n_tokens_neox': 1393, 'n_words': 365}