<commit_before>function DroongaProtocolConnectionWrapper(connection, callback, options) { // or (connection, options)
  this._connection = connection;
  if (typeof callback == 'function') {
    this._callback = callback;
    this._options = options;
  } else {
    this._callback = null;
    this._options = callback;
  }
  this._logger = this._options.logger || console;
}
DroongaProtocolConnectionWrapper.prototype = {
  get tag() {
    return this._connection.tag;
  },
  get hostName() {
    return this._connection.hostName;
  },
  get port() {
    return this._connection.port;
  },
  get routeToSelf() {
    return this._routeToSelf ||
           (this._routeToSelf = this._connection.getRouteToSelf(this._options));
  },
  emit: function(event, data, callback, options) {
    if (this._connection.closed) {
      this._logger.warn('connection is already closed.');
      return;
    }

    // support emitMessage(type, body, options)
    if (callback && typeof callback != 'function') {
      options = callback;
      callback = null;
    }

    var unifiedOptions = this._options;
    if (options && typeof options == 'object') {
      unifiedOptions = {};
      Object.keys(this._options).forEach(key) {
        unifiedOptions[key] = this._options[key];
      }, this);
      Object.keys(options).forEach(key) {
        options[key] = this._options[key];
      }, this);
    }

    if (callback) {
      var originalCallback = callback;
      callback = function(error, response) {
        originalCallback(error, response && response.body);
      };
    } else {
      callback = this._callback;
    }
    if (callback)
      this._connection.emitMessage(event, data, callback, unifiedOptions);
    else
      this._connection.emitMessage(event, data, unifiedOptions);
  },
  on: function(event, listener) {
    this._connection.on(event, listener);
  },
  once: function(event, listener) {
    this._connection.once(event, listener);
  },
  addListener: function(event, listener) {
    this._connection.addListener(event, listener);
  },<commit_msg>Fix syntax error<commit_after>function DroongaProtocolConnectionWrapper(connection, callback, options) { // or (connection, options)
  this._connection = connection;
  if (typeof callback == 'function') {
    this._callback = callback;
    this._options = options;
  } else {
    this._callback = null;
    this._options = callback;
  }
  this._logger = this._options.logger || console;
}
DroongaProtocolConnectionWrapper.prototype = {
  get tag() {
    return this._connection.tag;
  },
  get hostName() {
    return this._connection.hostName;
  },
  get port() {
    return this._connection.port;
  },
  get routeToSelf() {
    return this._routeToSelf ||
           (this._routeToSelf = this._connection.getRouteToSelf(this._options));
  },
  emit: function(event, data, callback, options) {
    if (this._connection.closed) {
      this._logger.warn('connection is already closed.');
      return;
    }

    // support emitMessage(type, body, options)
    if (callback && typeof callback != 'function') {
      options = callback;
      callback = null;
    }

    var unifiedOptions = this._options;
    if (options && typeof options == 'object') {
      unifiedOptions = {};
      Object.keys(this._options).forEach(function (key) {
        unifiedOptions[key] = this._options[key];
      }, this);
      Object.keys(options).forEach(function (key) {
        options[key] = this._options[key];
      }, this);
    }

    if (callback) {
      var originalCallback = callback;
      callback = function(error, response) {
        originalCallback(error, response && response.body);
      };
    } else {
      callback = this._callback;
    }
    if (callback)
      this._connection.emitMessage(event, data, callback, unifiedOptions);
    else
      this._connection.emitMessage(event, data, unifiedOptions);
  },
  on: function(event, listener) {
    this._connection.on(event, listener);
  },
  once: function(event, listener) {
    this._connection.once(event, listener);
  },
  addListener: function(event, listener) {
    this._connection.addListener(event, listener);
  },
{'fraction_non_alphanumeric': 0.13069688931757897, 'fraction_numerical': 0.0, 'mean_word_length': 3.07866273352999, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6114107', 'n_tokens_mistral': 1191, 'n_tokens_neox': 1178, 'n_words': 254}