<commit_before>(function (env) {
    "use strict";
    env.ddg_spice_go_watch_it = function(data) {
        function getUrl(watchable) {
            return 'http://gowatchit.com' + (watchable.url ? watchable.url : "");
        }

        function getName(watchable) {
            var name = "Watch " + watchable.title;
            if (!watchable.url) {
                name += " (TV)"
            }
            name += " ("+watchable.year+")";

            return name;
        }

        function getAlertAvailability(watchable) {
            var avail = {
                provider_format_logos: {
                    dark: 'http://s3.amazonaws.com/gowatchit/partner_logos/gowatchit_logo_white_bars.jpg'
                },
                buy_line: watchable.title,
                format_line: "Set Alerts",
                watch_now_url: getUrl(watchable)
            }
            return avail;
        }

        if (!data || data.error || data.search.movies.length === 0 && data.search.shows.length === 0) {
            return Spice.failed('GoWatchIt');
        }

        var movie = data.search.movies[0],
            show  = data.search.shows[0],
            watchable = movie || show;<commit_msg>moved function declarations out of the callback<commit_after>(function (env) {
    "use strict";

    function getName(watchable) {
        var name = "Watch " + watchable.title;
        if (!watchable.url) {
            name += " (TV)"
        }
        name += " ("+watchable.year+")";

        return name;
    }

    function getAlertAvailability(watchable) {
        var avail = {
            provider_format_logos: {
                dark: 'http://s3.amazonaws.com/gowatchit/partner_logos/gowatchit_logo_white_bars.jpg'
            },
            buy_line: watchable.title,
            format_line: "Set Alerts",
            watch_now_url: getUrl(watchable)
        }
        return avail;
    }

    env.ddg_spice_go_watch_it = function(data) {
        function getUrl(watchable) {
            return 'http://gowatchit.<EMAIL>' + (watchable.url ? watchable.url : "");
        }

        if (!data || data.error || data.search.movies.length === 0 && data.search.shows.length === 0) {
            return Spice.failed('GoWatchIt');
        }

        var movie = data.search.movies[0],
            show  = data.search.shows[0],
            watchable = movie || show;
{'fraction_non_alphanumeric': 0.1271578947368421, 'fraction_numerical': 0.004210526315789474, 'mean_word_length': 1.7123287671232876, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '3817178', 'n_tokens_mistral': 725, 'n_tokens_neox': 697, 'n_words': 123}