<commit_before>import React, {Component} from 'react';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import AppBar from 'material-ui/AppBar';
import CourseList from './Courses/CourseList.js';
import SignIn from './SignInPage/SignIn.js';
import Assignments from './Assignments/Assignments.js';
import {getUsername} from './util/username.js';
import { Switch, Route, BrowserRouter } from 'react-router-dom';
import DetailPage from './Assignments/DetailPage.js';


class App extends Component {
  constructor() {
    super();
    this.state = {
      username: getUsername()
    }
  }

  logout() {
    window.localStorage.removeItem('username');
    window.location = '/';
  }

  render() {
    return   (
      <main>
        <MuiThemeProvider>
          <AppBar
            onLeftIconButtonTouchTap={() => {
              window.location = '/courses';
            }}
            onRightIconButtonTouchTap={this.logout.bind(this)}
            iconElementLeft={<img style={{width:50}} src='img/swimmingfish.jpeg'/>}
            iconElementRight={<p style={{cursor: 'pointer'}}>Logout</p>}
          />
        </MuiThemeProvider>
        <BrowserRouter>
          <Switch>
            <Route exact path='/' component={SignIn}/>
            <Route path='/courses' component={CourseList}/>
            <Route path='/assignments' component={DetailPage}/>
          </Switch>
        </BrowserRouter>
      </main><commit_msg>commit<commit_after>import React, {Component} from 'react';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import AppBar from 'material-ui/AppBar';
import CourseList from './Courses/CourseList.js';
import SignIn from './SignInPage/SignIn.js';
import Assignments from './Assignments/Assignments.js';
import {getUsername} from './util/username.js';
import { Switch, Route, BrowserRouter } from 'react-router-dom';
import DetailPage from './Assignments/DetailPage.js';


class App extends Component {
  constructor() {
    super();
    this.state = {
      username: getUsername()
    }
  }

  logout() {
    window.localStorage.removeItem('username');
    window.location = '/';
  }

  render() {
    return   (
      <main>
        <MuiThemeProvider>
          <AppBar
            onLeftIconButtonTouchTap={() => {
              window.location = '/courses';
            }}
            onRightIconButtonTouchTap={this.logout.bind(this)}
            iconElementLeft={<img style={{width:50}} src='img/swimmingfish.jpeg'/>}
            iconElementRight={<p style={{cursor: 'pointer'}}>Logout</p>}
          />
        </MuiThemeProvider>
        <BrowserRouter>
          <Switch>
            <Route exact path='/' component={SignIn}/>
            <Route path='/courses' component={CourseList}/>
            <Route path='/assignments' component={Assignments}/>
          </Switch>
        </BrowserRouter>
      </main>
{'fraction_non_alphanumeric': 0.1459346768589298, 'fraction_numerical': 0.001389854065323141, 'mean_word_length': 2.676883780332056, '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': '3972458', 'n_tokens_mistral': 840, 'n_tokens_neox': 827, 'n_words': 163}