<commit_before>'use strict'

var Duplex = require('stream').Duplex
var inherits = require('util').inherits
var PassThrough = require('stream').PassThrough
var timers = require('timers')
var winston = require('winston')
var winstonWrapper = require('winston-meta-wrapper')

function ProxyStream () {
  if (!(this instanceof ProxyStream)) {
    return new ProxyStream()
  }
  // logging
  this._log = winstonWrapper(winston)
  this._log.addMeta({
    module: '1tp:transports:streams:proxy'
  })
  // init duplex
  Duplex.call(this, ProxyStream.DEFAULTS)
  // create inbound and outbound streams
  this._outboundPassThrough = new PassThrough()
  this._inboundPassThrough = new PassThrough()
  // listen to _inboundPassThrough
  var self = this
  this._inboundPassThrough
    .on('readable', function () {
      self._readFromInboundPassThrough()
    })
    .on('end', function () {
      self.push(null) // EOF
    })
  // done
  this._log.debug('created proxy stream.')<commit_msg>fixed bug introduced by commit ccb46dc<commit_after>'use strict'

var Duplex = require('stream').Duplex
var inherits = require('util').inherits
var myUtils = require('./utils')
var PassThrough = require('stream').PassThrough
var timers = require('timers')
var winston = require('winston')
var winstonWrapper = require('winston-meta-wrapper')

function ProxyStream () {
  if (!(this instanceof ProxyStream)) {
    return new ProxyStream()
  }
  // logging
  this._log = winstonWrapper(winston)
  this._log.addMeta({
    module: '1tp:transports:streams:proxy'
  })
  // init duplex
  Duplex.call(this, ProxyStream.DEFAULTS)
  // create inbound and outbound streams
  this._outboundPassThrough = new PassThrough()
  this._inboundPassThrough = new PassThrough()
  // listen to _inboundPassThrough
  var self = this
  this._inboundPassThrough
    .on('readable', function () {
      self._readFromInboundPassThrough()
    })
    .on('end', function () {
      self.push(null) // EOF
    })
  // register _error handler
  myUtils.mixinEventEmitterErrorFunction(this)
  // done
  this._log.debug('created proxy stream.')
{'fraction_non_alphanumeric': 0.12810707456978968, 'fraction_numerical': 0.0019120458891013384, 'mean_word_length': 4.03125, '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': '2521951', 'n_tokens_mistral': 676, 'n_tokens_neox': 646, 'n_words': 147}