<commit_before>function search() {
    const searchTable = document.getElementById('scheduleTable');
    const crn = document.getElementById('search').value;

    fetch(`api/search?crn=${crn}`)
        .then(section => section.json())
        .then(section => addRow(searchTable, section));
}

function addRow(table, section) {
    const tr = document.createElement('tr');
    const fields = [section.name, section.title, section.crn, section.professor, section.location, section.days];

    fields.forEach(field => {
        const td = document.createElement('td');
        const txt = document.createTextNode(field);
        td.appendChild(txt);
        tr.appendChild(td);
    });

    table.appendChild(tr);
}<commit_msg>Fixed instructor and times fields<commit_after>function search() {
    const searchTable = document.getElementById('scheduleTable');
    const crn = document.getElementById('search').value;

    fetch(`api/search?crn=${crn}`)
        .then(section => section.json())
        .then(section => addRow(searchTable, section));
}

function addRow(table, section) {
    const tr = document.createElement('tr');
    const fields = [
        section.name,
        section.title,
        section.crn,
        section.instructor,
        section.location,
        section.days,
        [section.start_time, section.end_time].join(' - '),
    ];

    fields.forEach(field => {
        const td = document.createElement('td');
        const txt = document.createTextNode(field);
        td.appendChild(txt);
        tr.appendChild(td);
    });

    table.appendChild(tr);
}
{'fraction_non_alphanumeric': 0.14438839848675913, 'fraction_numerical': 0.0, 'mean_word_length': 3.10077519379845, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '2387939', 'n_tokens_mistral': 443, 'n_tokens_neox': 434, 'n_words': 82}