<commit_before>var Scope = require('uniscope'),
    _ = require('lodash'),
    postmanLegacyInterface = require('./postman-legacy-interface'),
    PostmanConsole = require('./console'),

    scopeLibraries = {
        JSON: require('liquid-json'),
        Buffer: require('buffer'),
        _: require('lodash3').noConflict(),
        CryptoJS: require('crypto-js'),
        atob: require('atob'),
        btoa: require('btoa'),
        tv4: require('tv4'),
        xml2Json: require('./xml2Json'),
        Backbone: require('backbone'),
        cheerio: require('cheerio')
    };

module.exports = {
    listener: function (prefix, console) {
        /**
         * @param {String} id
         * @param {Code} code
         * @param {Object} options
         * @param {Object} options.masked
         * @param {Object} options.globals
         */
        return function (id, code, options) {
            !options && (options = {});

            var bridge = this,
                cursor = _.get(options, 'masked.cursor', {}),
                scope = Scope.create({
                    jailed: false,
                    console: options.debug,
                    eval: true
                }, _.merge({}, options.globals, {
                    postman: postmanLegacyInterface.create(_.get(options, 'masked.scriptType'), options),
                    console: new PostmanConsole(bridge, cursor, options.debug ? console : null)
                }, scopeLibraries)),
                dispatchEventName = prefix + id,
                done = (function (dispatchEventName) {
                    var sealed = false;<commit_msg>Bugfix using loads merge instead of assign!<commit_after>var Scope = require('uniscope'),
    _ = require('lodash'),
    postmanLegacyInterface = require('./postman-legacy-interface'),
    PostmanConsole = require('./console'),

    scopeLibraries = {
        JSON: require('liquid-json'),
        Buffer: require('buffer'),
        _: require('lodash3').noConflict(),
        CryptoJS: require('crypto-js'),
        atob: require('atob'),
        btoa: require('btoa'),
        tv4: require('tv4'),
        xml2Json: require('./xml2Json'),
        Backbone: require('backbone'),
        cheerio: require('cheerio')
    };

module.exports = {
    listener: function (prefix, console) {
        /**
         * @param {String} id
         * @param {Code} code
         * @param {Object} options
         * @param {Object} options.masked
         * @param {Object} options.globals
         */
        return function (id, code, options) {
            !options && (options = {});

            var bridge = this,
                cursor = _.get(options, 'masked.cursor', {}),
                scope = Scope.create({
                    jailed: false,
                    console: options.debug,
                    eval: true
                }, _.assign({}, options.globals, {
                    postman: postmanLegacyInterface.create(_.get(options, 'masked.scriptType'), options),
                    console: new PostmanConsole(bridge, cursor, options.debug ? console : null)
                }, scopeLibraries)),
                dispatchEventName = prefix + id,
                done = (function (dispatchEventName) {
                    var sealed = false;
{'fraction_non_alphanumeric': 0.13596089214787657, 'fraction_numerical': 0.0030553009471432934, 'mean_word_length': 1.8494342906875545, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '1167043', 'n_tokens_mistral': 888, 'n_tokens_neox': 847, 'n_words': 189}