<commit_before>$(function () {
    $("button").click(function () {

        var peopleKilled = document.getElementById('peopleKilled').value;
        var peopleInjured = document.getElementById('peopleInjured').value;
        var city = document.getElementById('city').value;
        var cityAPI = city.replace(" ", "+");
        var state = document.getElementById('state').value;
        var crime = document.getElementById('crime').value.toLowerCase();
        var streetAddress = document.getElementById('streetAddress').value;
        var addressAPI = streetAddress.replace(" ", "+");
        var lawLong = document.getElementById('lawLong').value;
        var lawShort;
        var day = document.getElementById('day').value;
        var injured = " ";
        var killed = " ";
        var tfKilled;
        var tfInjured;
        var killedTense;
        var injuredTense;
        var addAnd;
        var keyAPI = "<KEY>";
        var googleMapUrl = "https://maps.googleapis.com/maps/api/staticmap?size=400x400&markers=" + streetAddress + "+" + city + "+"
        state + "&key=" + keyAPI;

        if (peopleKilled > 0) {
            tfKilled = true;
        }

        if (peopleInjured > 0) {
            tfInjured = true;
        }

        if (peopleKilled > 1) {
            killedTense = " people were ";
        } else {
            killedTense = " person was ";
        }

        if (peopleInjured > 1) {
            injuredTense = " people were ";
        } else {
            injuredTense = " person was ";
        }

        if (tfKilled) {
            killed = peopleKilled + killedTense + " killed ";
        }

        if (tfInjured && tfKilled) {
            addAnd = " and ";
        } else {
            addAnd = " ";
        }

        if (tfInjured) {
            injured = peopleInjured + injuredTense + " injured ";
        }

        if (lawLong.indexOf("Police") > -1) {
            lawShort = "Police";
        }
        if (lawLong.indexOf("Sheriff's") > -1) {
            lawShort = "Deputies";
        }

        var generated = "<p>";
        generated += city.toUpperCase() + " - ";
        generated += lawShort + " say " + killed + addAnd + injured + " in a " + crime + " in " + city + " " + day + ".</p>";
        generated += "<p>According to the " + lawLong + ", " + killed + addAnd + injured + " in a " + crime + " at " + streetAddress + " in " + city + " " + day + ". </p>"
        generated += "<p>This is a developing story. Stay tuned to <a href ='http://www.wbrz.com/'>WBRZ News 2</a> on <a href ='https://www.facebook.com/WBRZNews2'>Facebook</a> and <a href ='https://twitter.com/wbrz'>Twitter</a> for the lastest updates as they become available.</p>";

        if ($('#mapCheck').is(':checked')) {
            generated += "<img src='" + googleMapUrl + "'>";
        }

        if ($('#htmlCheck').is(':checked')) {
            $("#generatedHTML").text(generated);
        } else {
            $("#generatedHTML").html(generated);
        }
    });
});
<commit_msg>Removed syntax errors in Javascript. Moved multiple variables to global.<commit_after>/*global $, jQuery*/
var peopleKilled;
var peopleInjured;
var city;
var cityAPI;
var state;
var crime;
var streetAddress;
var addressAPI;
var lawLong;
var lawShort;
var day;
var injured = " ";
var killed = " ";
var tfKilled;
var tfInjured;
var killedTense;
var injuredTense;
var addAnd;
var keyAPI = "<KEY>";
var googleMapUrl;
var generated = "<p>";

$(function () {
    "use strict";
    $("#generateButton").click(function () {

        peopleKilled = document.getElementById('peopleKilled').value;
        peopleInjured = document.getElementById('peopleInjured').value;
        city = document.getElementById('city').value;
        cityAPI = city.replace(" ", "+");
        state = document.getElementById('state').value;
        crime = document.getElementById('crime').value.toLowerCase();
        streetAddress = document.getElementById('streetAddress').value;
        addressAPI = streetAddress.replace(" ", "+");
        lawLong = document.getElementById('lawLong').value;
        day = document.getElementById('day').value;
        googleMapUrl = "https://maps.googleapis.com/maps/api/staticmap?size=400x400&markers=" + streetAddress + "+" + city + "+" +
            state + "&key=" + keyAPI;

        if (peopleKilled > 0) {
            tfKilled = true;
        }

        if (peopleInjured > 0) {
            tfInjured = true;
        }

        if (peopleKilled > 1) {
            killedTense = " people were ";
        } else {
            killedTense = " person was ";
        }

        if (peopleInjured > 1) {
            injuredTense = " people were ";
        } else {
            injuredTense = " person was ";
        }

        if (tfKilled) {
            killed = peopleKilled + killedTense + " killed ";
        }

        if (tfInjured && tfKilled) {
            addAnd = " and ";
        } else {
            addAnd = " ";
        }

        if (tfInjured) {
            injured = peopleInjured + injuredTense + " injured ";
        }

        if (lawLong.indexOf("Police") > -1) {
            lawShort = "Police";
        }
        if (lawLong.indexOf("Sheriff's") > -1) {
            lawShort = "Deputies";
        }

        var generated = "<p>";
        generated += city.toUpperCase() + " - ";
        generated += lawShort + " say " + killed + addAnd + injured + " in a " + crime + " in " + city + " " + day + ".</p>";
        generated += "<p>According to the " + lawLong + ", " + killed + addAnd + injured + " in a " + crime + " at " + streetAddress + " in " + city + " " + day + ". </p>";
        generated += "<p>This is a developing story. Stay tuned to <a href ='http://www.wbrz.com/'>WBRZ News 2</a> on <a href ='https://www.facebook.com/WBRZNews2'>Facebook</a> and <a href ='https://twitter.com/wbrz'>Twitter</a> for the lastest updates as they become available.</p>";

        if ($('#mapCheck').is(':checked')) {
            generated += "<img src='" + googleMapUrl + "'>";
        }

        if ($('#htmlCheck').is(':checked')) {
            $("#generatedHTML").text(generated);
        } else {
            $("#generatedHTML").html(generated);
        }
    });
});

{'fraction_non_alphanumeric': 0.15880933226065969, 'fraction_numerical': 0.004505229283990346, 'mean_word_length': 2.0470588235294116, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 44, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2668858', 'n_tokens_mistral': 1851, 'n_tokens_neox': 1805, 'n_words': 415}