<commit_before>import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import { Router, Route, IndexRoute, Link, browserHistory } from 'react-router';

import reducers from './reducers';

import Login from './components/login';
import Home from './components/home';
import Associations from './components/associations';
import Events from './components/events';
import Frame from './components/frame';
import Profile from './components/profile';
import UserReg from './components/usersignup';
import AssoReg from './components/associations-signup';

import Administrator from './components/administrator';
import AdministratorTableAssociations from './components/administrator-table-associations';
import AdministratorTableStudents from './components/administrator-table-students';
import AdministratorTableEvents from './components/administrator-table-events';

import ProfileAssociation from './components/profile-association';
import CreateEventForm from './components/create-event-form';

import EventsIndividual from './components/events-individual';

import Settings from './components/settings';
import HomeAssociation from './components/home-association';

import EventStats from './components/event-stats';

const createStoreWithMiddleware = applyMiddleware()(createStore);
const store = createStoreWithMiddleware(reducers);

export default class App extends Component {
  render() {
    return (
      <Provider store={store}>
        <Router history={browserHistory}>
          <Route path="/" component={Frame}>
            <IndexRoute component={Login} />
            <Route path="/home" component={Home}></Route>
            <Route path="/events" component={Events}></Route>
            <Route path="/associations" component={Associations}></Route>
            <Route path="/students/:userID" component={Profile}></Route><commit_msg>Fixed the issue of translating to different pages with window scroll location not changed. Now it will scroll up automatically when swhitching to different pages.<commit_after>import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import { Router, Route, IndexRoute, Link, browserHistory } from 'react-router';

import reducers from './reducers';

import Login from './components/login';
import Home from './components/home';
import Associations from './components/associations';
import Events from './components/events';
import Frame from './components/frame';
import Profile from './components/profile';
import UserReg from './components/usersignup';
import AssoReg from './components/associations-signup';

import Administrator from './components/administrator';
import AdministratorTableAssociations from './components/administrator-table-associations';
import AdministratorTableStudents from './components/administrator-table-students';
import AdministratorTableEvents from './components/administrator-table-events';

import ProfileAssociation from './components/profile-association';
import CreateEventForm from './components/create-event-form';

import EventsIndividual from './components/events-individual';

import Settings from './components/settings';
import HomeAssociation from './components/home-association';

import EventStats from './components/event-stats';

const createStoreWithMiddleware = applyMiddleware()(createStore);
const store = createStoreWithMiddleware(reducers);

// Function to scroll to top of window when routing
// to a new destination.
function handleUpdate() {
  let {
    action
  } = this.state.location;

  if (action === 'PUSH') {
    window.scrollTo(0, 0);
  }
}


export default class App extends Component {
  render() {
    return (
      <Provider store={store}>
        <Router history={browserHistory} onUpdate={handleUpdate}>
          <Route path="/" component={Frame}>
            <IndexRoute component={Login} />
            <Route path="/home" component={Home}></Route>
            <Route path="/events" component={Events}></Route>
            <Route path="/associations" component={Associations}></Route>
            <Route path="/students/:userID" component={Profile}></Route>
{'fraction_non_alphanumeric': 0.12455767869780608, 'fraction_numerical': 0.00047180938900684123, 'mean_word_length': 4.714285714285714, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '4753043', 'n_tokens_mistral': 1034, 'n_tokens_neox': 1009, 'n_words': 313}