<commit_before>import React from 'react';
import ReactDOM from 'react-dom';
import {HashRouter, Switch, Route, Link} from 'react-router-dom';

import Home from './Home';
import Login from './Login';

ReactDOM.render(
    <HashRouter>
        <div>
            <nav>
                <ul>
                    <li><Link to='/'>Home</Link></li>
                    <li><Link to='/login'>Login</Link></li>
                </ul>
            </nav>
            <main>
                <Switch>
                    <Route exact path='/' component={Home}/>
                    <Route path='/login' component={Login}/>
                </Switch>
            </main>
        </div>
    </HashRouter>,
    document.getElementById('root')
);<commit_msg>examples menu now gets created dynamically<commit_after>import React from 'react';
import ReactDOM from 'react-dom';
import {HashRouter, Link, Route, Switch} from 'react-router-dom';

import Home from './Home';
import Login from './Login';

const menuEntries = [
    {
        exact: true,
        path: '/',
        component: Home,
        text: 'Home'
    },
    {
        path: '/login',
        component: Login,
        text: 'Login'
    }
];

ReactDOM.render(
    <HashRouter>
        <div>
            <nav>
                <ul>
                    {menuEntries.map((entry, index) => {
                        let replace = entry.path === window.location.hash.replace('#', '');
                        return <li key={index}><Link to={entry.path} replace={replace}>{entry.text}</Link></li>;
                    })}
                </ul>
            </nav>
            <main>
                <Switch>
                    {menuEntries.map((entry, index) => {
                        return <Route key={index} exact={!!entry.exact} path={entry.path} component={entry.component}/>;
                    })}
                </Switch>
            </main>
        </div>
    </HashRouter>,
    document.getElementById('root')
);
{'fraction_non_alphanumeric': 0.15513733468972532, 'fraction_numerical': 0.0, 'mean_word_length': 1.4993646759847523, 'pattern_counts': {'":': 0, '<': 42, '<?xml version=': 0, '>': 44, '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': '6464932', 'n_tokens_mistral': 546, 'n_tokens_neox': 523, 'n_words': 124}