<commit_before>'use strict'
const EventEmitter = require('events')
const logger = require('../../lib/logger.js')
const RpcHubError = require('./RpcHubError.js')
const gwcidGroup = require('./gwcidGroup.js')
class RpcBaseServer extends EventEmitter {
  constructor (options, req, res, next) {
    super()
    this.baseInit(options, req, res, next)
    this.rpcHeadersBaseInit()
    this.bodyDataListenerBaseInit()
  }
  // 初始化
  baseInit (options, req, res, next) {
    this.processRequest = Object.create(null)
    this.options = options
    this.req = req
    this.res = res
    this.next = next
    this.connId = req.connId
    this.connTime = req.connTime
    this.workerId = req.workerId
    this.serverGuid = req.serverGuid
    this.gwcidTimeStamp = req.gwcidTimeStamp
    this.gwcid = req.gwcid
    // 默认头
    this.xRpc = 'x-rpc-'.toString().replace(/-/g, '_')
  }
  // 初始化
  rpcHeadersBaseInit () {
    var xRpc, xRpcLen, rpcHeaders
    // rpc调用头
    rpcHeaders = Object.create(null)
    // 转字符串 转小写
    xRpc = this.xRpc
    // 计算长度
    xRpcLen = xRpc.length || 0
    // 获取rpc调用头
    for (let key in this.req.headers) {
      if (Object.hasOwnProperty.call(this.req.headers, key)) {
        continue<commit_msg>fixbug<commit_after>'use strict'
const EventEmitter = require('events')
const logger = require('../../lib/logger.js')
const RpcHubError = require('./RpcHubError.js')
const gwcidGroup = require('./gwcidGroup.js')
class RpcBaseServer extends EventEmitter {
  constructor (options, req, res, next) {
    super()
    this.baseInit(options, req, res, next)
    this.rpcHeadersBaseInit()
    this.bodyDataListenerBaseInit()
  }
  // 初始化
  baseInit (options, req, res, next) {
    this.processRequest = Object.create(null)
    this.options = options
    this.req = req
    this.res = res
    this.next = next
    this.connId = req.connId
    this.connTime = req.connTime
    this.workerId = req.workerId
    this.serverGuid = req.serverGuid
    this.gwcidTimeStamp = req.gwcidTimeStamp
    this.gwcid = req.gwcid
    // 默认头
    this.xRpc = 'x-rpc-'.toString().replace(/-/g, '_')
  }
  // 初始化
  rpcHeadersBaseInit () {
    var xRpc, xRpcLen, rpcHeaders
    // rpc调用头
    rpcHeaders = Object.create(null)
    // 转字符串 转小写
    xRpc = this.xRpc
    // 计算长度
    xRpcLen = xRpc.length || 0
    // 获取rpc调用头
    for (let key in this.req.headers) {
      if (!Object.hasOwnProperty.call(this.req.headers, key)) {
        continue
{'fraction_non_alphanumeric': 0.13292181069958847, 'fraction_numerical': 0.0008230452674897119, 'mean_word_length': 2.7689922480620157, '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': '7646524', 'n_tokens_mistral': 890, 'n_tokens_neox': 919, 'n_words': 175}