<commit_before>
exports.__extends = function __extends(child, parent, options) {
  
  var options = options || {}
    , child_copy = undefined;

  for(var prop in parent) {
    if(typeof parent[prop] !== 'undefined' && parent[prop] !== child[prop]) {
      var dst = undefined;
      
      if(options.copyOnWrite) {
        child_copy = child_copy || __extends({}, child);
        dst = child_copy
      }else{
        dst = child;
      }
      
      dst[prop] = (!options.overwrite && typeof dst[prop] !== 'undefined' ? dst[prop] : parent[prop]);
    }
  }
  return child_copy || child;
};

/*****************************************************************************/


function __deepExtends(child, parent, options) { 
  
  var options = options || {}
    , child_copy = undefined
    ;

  for (var prop in parent) {
  
    //ignore all `undefined` and equal props
    if(typeof parent[prop] !== 'undefined' && parent[prop] !== child[prop] ) {
      var dst;
      
      if(options.copyOnWrite) {
        child_copy = child_copy || __extends({}, child);
        dst = child_copy;
      }else{
        dst = child;
      }
    
      //if the current prop is an object, and is not `null` we recurse
      if(typeof parent[prop] === 'object' 
      && parent[prop] !== null 
      && !Array.isArray(parent[prop])
      && typeof parent[prop] === dst[prop]
      )
      {        
        dst[prop] = dst[prop] || new parent[prop].constructor();
        dst[prop] = arguments.callee(dst[prop], parent[prop], options);
      }else{
        /**
         * if the prop is *not* an object (or is null)
         * copy it in the child if it doesn't already exists
         */  
        
        if(typeof parent[prop] === 'object' 
        && parent[prop] !== null 
        && Array.isArray(parent[prop])
        )
        { 
          
          if(typeof dst[prop] === 'undefined' || dst[prop] === null || options.overwrite === true){
            dst[prop] = [];
          }
              
          if( Array.isArray(dst[prop]) ) {
          
            for(var i = 0, ii = parent[prop].length; i < ii; i++) {
              dst[prop].push(arguments.callee({}, parent[prop][i], options));
            }
          }          
        }else{
          dst[prop] = (!options.overwrite && typeof dst[prop] !== 'undefined' ? dst[prop] : parent[prop]);
        }
      }
    }
  }
  return child_copy || child;
};

exports.__deepExtends = __deepExtends;

/*****************************************************************************/

function inherits(child, parent) {
  
  ///copy all members of parents to this (the child)
  __deepExtends(child, parent);
  
  //constructor helper
  function ctor() { 
    //set the constructor of the current context back to the child's
    this.constructor = child.constructor;
  }
  //set ctor prototype to the parent's
  ctor.prototype = parent.prototype;
  
  //set the child's prototype to new object such that
  //
  // (1) child.prototype.constructor = obj.contructor = child
  // (2) child.prototype.__proto__   = obj.__proto__ 
  //                                 = ctor.prototype 
  //                                 = parent.prototype
  child.prototype = __deepExtends(new ctor, child.prototype, {overwrite: true});
  
  //save the parent's prototype for direct future reference
  child.__super__ = parent;
  child.prototype.__super__ = parent.prototype;
};

exports.inherits = inherits;

/*****************************************************************************/

exports.unimplemented = function unimplemented(name) {
  return function(){
    throw "xxx function " + name + "() hasn't been implemented";
  };
};<commit_msg>Array can now merge properly<commit_after>
exports.__extends = function __extends(child, parent, options) {
  
  var options = options || {}
    , child_copy = undefined;

  for(var prop in parent) {
    if(typeof parent[prop] !== 'undefined' && parent[prop] !== child[prop]) {
      var dst = undefined;
      
      if(options.copyOnWrite) {
        child_copy = child_copy || __extends({}, child);
        dst = child_copy
      }else{
        dst = child;
      }
      
      dst[prop] = (!options.overwrite && typeof dst[prop] !== 'undefined' ? dst[prop] : parent[prop]);
    }
  }
  return child_copy || child;
};

/*****************************************************************************/


function __deepExtends(child, parent, options) { 
  
  var options = options || {}
    , child_copy = undefined
    ;

  for (var prop in parent) {
  
    //ignore all `undefined` and equal props
    if(typeof parent[prop] !== 'undefined' && parent[prop] !== child[prop] ) {
      var dst;
      
      if(options.copyOnWrite) {
        child_copy = child_copy || __extends({}, child);
        dst = child_copy;
      }else{
        dst = child;
      }
    
      //if the current prop is an object, and is not `null` we recurse
      if(typeof parent[prop] === 'object' 
      && parent[prop] !== null 
      && !Array.isArray(parent[prop])
      && typeof parent[prop] === dst[prop]
      )
      {        
        dst[prop] = dst[prop] || new parent[prop].constructor();
        dst[prop] = arguments.callee(dst[prop], parent[prop], options);
      }else{
        /**
         * if the prop is *not* an object (or is null)
         * copy it in the child if it doesn't already exists
         */  
        
        if(typeof parent[prop] === 'object' 
        && parent[prop] !== null 
        && Array.isArray(parent[prop])
        )
        { 
          
          if( !Array.isArray(dst[prop]) && 
              ( typeof dst[prop] === 'undefined' 
              || dst[prop] === null 
              || options.overwrite === true
              )
          ){
            dst[prop] = [];
          }
              
          if(Array.isArray(dst[prop])) {
          
            for(var i = 0, ii = parent[prop].length; i < ii; i++) {
              dst[prop].push(arguments.callee({}, parent[prop][i], options));
            }
          }          
        }else{
          dst[prop] = (!options.overwrite && typeof dst[prop] !== 'undefined' ? dst[prop] : parent[prop]);
        }
      }
    }
  }
  return child_copy || child;
};

exports.__deepExtends = __deepExtends;

/*****************************************************************************/

function inherits(child, parent) {
  
  ///copy all members of parents to this (the child)
  __deepExtends(child, parent);
  
  //constructor helper
  function ctor() { 
    //set the constructor of the current context back to the child's
    this.constructor = child.constructor;
  }
  //set ctor prototype to the parent's
  ctor.prototype = parent.prototype;
  
  //set the child's prototype to new object such that
  //
  // (1) child.prototype.constructor = obj.contructor = child
  // (2) child.prototype.__proto__   = obj.__proto__ 
  //                                 = ctor.prototype 
  //                                 = parent.prototype
  child.prototype = __deepExtends(new ctor, child.prototype, {overwrite: true});
  
  //save the parent's prototype for direct future reference
  child.__super__ = parent;
  child.prototype.__super__ = parent.prototype;
};

exports.inherits = inherits;

/*****************************************************************************/

exports.unimplemented = function unimplemented(name) {
  return function(){
    throw "xxx function " + name + "() hasn't been implemented";
  };
};
{'fraction_non_alphanumeric': 0.19157190635451504, 'fraction_numerical': 0.000802675585284281, 'mean_word_length': 2.2349632193855475, 'pattern_counts': {'":': 0, '<': 5, '<?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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '716586', 'n_tokens_mistral': 2135, 'n_tokens_neox': 2072, 'n_words': 525}