<commit_before>/**
 * jQuery DFP v2.3.0
 * http://github.com/coop182/jquery.dfp.js
 *
 * Copyright 2015 <NAME>
 * Released under the MIT license
 */

(function (window, undefined) {
    "use strict";

    /**
     * Make plugin UMD compatible
     * Uses CommonJS, AMD or browser globals to create plugin.
     */
    (function (factory) {
        if (typeof define === 'function' && define.amd) {
            // AMD. Register as an anonymous module.
            define(['jquery'], factory);
        } else if (typeof exports === 'object') {
            // Node/CommonJS
            factory(require('jquery'));
        } else {
            // Browser globals
            factory(window.jQuery || window.Zepto);
        }
    }(function ($) {

        var

        // Save Scope
        dfpScript = this || {};

        var
        // DFP account ID
        dfpID = '',

        // Init counters
        count = 0,
        uid = 0,
        rendered = 0,

        // Default DFP selector
        dfpSelector = '.adunit',

        // Keep track of if we've already tried to load gpt.js before
        dfpIsLoaded = false,

        // Store adunit on div as:
        storeAs = 'googleAdUnit',

        /**
         * Init function sets required params and loads Google's DFP script
         * @param  String id       The DFP account ID
         * @param  String selector The adunit selector
         * @param  Object options  Custom options to apply
         */
        init = function (id, selector, options) {
            var dfpOptions, $adCollection;

            // Reset counters on each call
            count = 0;
            rendered = 0;

            dfpID = id;
            $adCollection = $(selector);

            /**
             * @returns {boolean}
             */
            dfpScript.shouldCheckForAdBlockers = function(){
                return dfpOptions ? typeof dfpOptions.afterAdBlocked === 'function' : false;
            };

            // explicitly wait for loader to be completed, otherwise the googletag might not be available
            dfpLoader(options, $adCollection).then(function(){
                dfpOptions = setOptions(options);
                dfpScript.dfpOptions = options;

                $(function () {
                    createAds(dfpOptions, $adCollection);
                    displayAds(dfpOptions, $adCollection);
                });
            });

        },

        /**
         * Set the options for DFP
         * @param Object options Custom options to apply
         * @return Object extended options
         */
        setOptions = function (options) {

            // Set default options
            var dfpOptions = {
                setTargeting: {},<commit_msg>fix error that options is undefined<commit_after>/**
 * jQuery DFP v2.3.0
 * http://github.com/coop182/jquery.dfp.js
 *
 * Copyright 2015 <NAME>
 * Released under the MIT license
 */

(function (window, undefined) {
    "use strict";

    /**
     * Make plugin UMD compatible
     * Uses CommonJS, AMD or browser globals to create plugin.
     */
    (function (factory) {
        if (typeof define === 'function' && define.amd) {
            // AMD. Register as an anonymous module.
            define(['jquery'], factory);
        } else if (typeof exports === 'object') {
            // Node/CommonJS
            factory(require('jquery'));
        } else {
            // Browser globals
            factory(window.jQuery || window.Zepto);
        }
    }(function ($) {

        var

        // Save Scope
        dfpScript = this || {};

        var
        // DFP account ID
        dfpID = '',

        // Init counters
        count = 0,
        uid = 0,
        rendered = 0,

        // Default DFP selector
        dfpSelector = '.adunit',

        // Keep track of if we've already tried to load gpt.js before
        dfpIsLoaded = false,

        // Store adunit on div as:
        storeAs = 'googleAdUnit',

        /**
         * Init function sets required params and loads Google's DFP script
         * @param  String id       The DFP account ID
         * @param  String selector The adunit selector
         * @param  Object options  Custom options to apply
         */
        init = function (id, selector, options) {
            var $adCollection;

            // Reset counters on each call
            count = 0;
            rendered = 0;

            dfpID = id;
            $adCollection = $(selector);

            /**
             * @returns {boolean}
             */
            dfpScript.shouldCheckForAdBlockers = function(){
                return options ? typeof options.afterAdBlocked === 'function' : false;
            };

            // explicitly wait for loader to be completed, otherwise the googletag might not be available
            dfpLoader(options, $adCollection).then(function(){
                options = setOptions(options);
                dfpScript.dfpOptions = options;

                $(function () {
                    createAds(options, $adCollection);
                    displayAds(options, $adCollection);
                });
            });

        },

        /**
         * Set the options for DFP
         * @param Object options Custom options to apply
         * @return Object extended options
         */
        setOptions = function (options) {

            // Set default options
            var dfpOptions = {
                setTargeting: {},
{'fraction_non_alphanumeric': 0.10005507618872773, 'fraction_numerical': 0.005507618872774004, 'mean_word_length': 1.4707482993197278, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7097522', 'n_tokens_mistral': 1426, 'n_tokens_neox': 1339, 'n_words': 430}