<commit_before>var WebSocket = require('ws'),
    _ = require('underscore'),
    util = require('util'),
    events = require('events'),
    EJSON = require('meteor-ejson');
    SRP = require('node-srp');

DDPClient = function(opts) {
  var self = this;

  // default arguments
  opts = opts || {};
  self.host = opts.host || 'localhost';
  self.port = opts.port || 3000;
  self.path = opts.path || 'websocket';
  self.use_ssl = opts.use_ssl || self.port === 443;
  self.auto_reconnect = ('auto_reconnect' in opts) ? opts.auto_reconnect : true;
  self.auto_reconnect_timer = ('auto_reconnect_timer' in opts) ? opts.auto_reconnect_timer : 500;
  self.use_ssl_strict = ('use_ssl_strict' in opts) ? opts.use_ssl_strict : true;

  // add support for EJSON, off by default to avoid breaking change
  self.use_ejson = opts.use_ejson || false;

  // very very simple collections (name -> [{id -> document}])
  self.collections = {};

  // internal stuff to track callbacks
  self._next_id = 0;
  self._callbacks = {};
};

/**
 * Inherits from EventEmitter
 */<commit_msg>Scope variables correctly.<commit_after>var WebSocket = require('ws'),
    _ = require('underscore'),
    util = require('util'),
    events = require('events'),
    EJSON = require('meteor-ejson'),
    SRP = require('node-srp'),

DDPClient = function(opts) {
  var self = this;

  // default arguments
  opts = opts || {};
  self.host = opts.host || 'localhost';
  self.port = opts.port || 3000;
  self.path = opts.path || 'websocket';
  self.use_ssl = opts.use_ssl || self.port === 443;
  self.auto_reconnect = ('auto_reconnect' in opts) ? opts.auto_reconnect : true;
  self.auto_reconnect_timer = ('auto_reconnect_timer' in opts) ? opts.auto_reconnect_timer : 500;
  self.use_ssl_strict = ('use_ssl_strict' in opts) ? opts.use_ssl_strict : true;

  // add support for EJSON, off by default to avoid breaking change
  self.use_ejson = opts.use_ejson || false;

  // very very simple collections (name -> [{id -> document}])
  self.collections = {};

  // internal stuff to track callbacks
  self._next_id = 0;
  self._callbacks = {};
};

/**
 * Inherits from EventEmitter
 */
{'fraction_non_alphanumeric': 0.1508640822045773, 'fraction_numerical': 0.010275572162540868, 'mean_word_length': 3.6565217391304348, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2310025', 'n_tokens_mistral': 735, 'n_tokens_neox': 700, 'n_words': 172}