<commit_before>;(function(window, _, $, undefined){
  
  var Class = $.mvc.Class = function(){
    
    //Define a class-factory and an actual class for this "class".
    var ClassFactory = {}
      , noop = function(){}
      , Class = noop;
      
    //Extend the factory with function that can extend the class.
    _(ClassFactory).extend({
      
      //Set a parent class.
      extends: function(parent){
        
        //Add the statics of our parent to our statics.
        Class.__proto__ = parent;
        
        //Add the prototype of our parent to our own prototype.
        Class.prototype.__proto__ = parent.prototype;
        
        //If we haven't defined our own constructor, use a function that will call the parent.
        if(Class == noop){
          this.construct(function(){
            parent.apply(this, arguments);
          });
        }
        
        //Keep an easy reference to parent.
        Class.prototype.parent = parent;
        
        //Enable chaining.
        return this;
        
      },
      
      //Add static members to the class.
      statics: function(map){
        
        //Add the members in the map to the Class object.
        _(Class).extend(map);
        
        //Enable chaining.
        return this;
        
      },
      
      //Change the constructor (default is a noop).
      construct: function(constructor){
        
        //Remember the old class properties.
        var oldMembers = Class.prototype || {};
        var oldStatics = _({}).extend(Class);
        
        //Set the new constructor.
        Class = constructor;
        Class.prototype = oldMembers;
        _(Class).extend(oldStatics);
        
        //Add a reference to the classes static members from within the classes normal members.
        _(Class.prototype).extend({
          static: Class
        });
        
        //Enable chaining.
        return this;
        
      },
      
      //Add normal members to the class.
      members: function(map){
        
        //Add the members in the map to the Class's prototype.
        _(Class.prototype).extend(map);
        
        //Enable chaining.
        return this;
        
      },
      
      //Returns the class.
      finalize: function(){
        return Class;
      }
      
    });
    
    //Add a default noop constructor.
    ClassFactory.construct(noop);
    
    //Return the class-factory.
    return ClassFactory;
    
  }
  
})(window, _, (jQuery || Zepto || $ || ($={})));
<commit_msg>Separated the ClassFactory from the Class creation function and exposed it. So that it may be extended.<commit_after>;(function(window, _, $, undefined){
  
  var ClassFactory = $.mvc.ClassFactory = function(Class){
    this.Class = this.noop = Class;
  }
  
  //Extend the factory with functions that can extend the class.
  _(ClassFactory.prototype).extend({
    
    //Set a parent class.
    extends: function(parent){
      
      //Add the statics of our parent to our statics.
      this.Class.__proto__ = this.Class.parent = parent;
      
      //Add the prototype of our parent to our own prototype.
      this.Class.prototype.__proto__ = parent.prototype;
      
      //If we haven't defined our own constructor, use a function that will call the parent.
      if(this.Class == this.noop){
        this.construct(function(){
          parent.apply(this, arguments);
        });
      }
      
      //Keep an easy reference to parent.
      this.Class.prototype.parent = parent;
      
      //Enable chaining.
      return this;
      
    },
    
    //Add static members to the class.
    statics: function(map){
      
      //Add the members in the map to the Class object.
      _(this.Class).extend(map);
      
      //Enable chaining.
      return this;
      
    },
    
    //Change the constructor (default is a noop).
    construct: function(constructor){
      
      //Remember the old class properties.
      var oldMembers = this.Class.prototype || {};
      var oldStatics = _({}).extend(this.Class);
      
      //Set the new constructor.
      this.Class = constructor;
      this.Class.prototype = oldMembers;
      _(this.Class).extend(oldStatics);
      
      //Add a reference to the class' static members from within the class' normal members.
      _(this.Class.prototype).extend({
        static: this.Class
      });
      
      //Enable chaining.
      return this;
      
    },
    
    //Add normal members to the class.
    members: function(map){
      
      //Add the members in the map to the Class' prototype.
      _(this.Class.prototype).extend(map);
      
      //Enable chaining.
      return this;
      
    },
    
    //Returns the class.
    finalize: function(){
      return this.Class;
    }
    
  });

  var Class = $.mvc.Class = function(){
    
    //Define the class and its factory.
    var noop = function(){}
      , Class = noop
      , factory = new ClassFactory(Class);
      
    //Add a default noop constructor.
    factory.construct(noop);
    
    //Return the class-factory.
    return factory;
    
  }
  
})(window, _, (jQuery || Zepto || $ || ($={})));

{'fraction_non_alphanumeric': 0.10650658404337723, 'fraction_numerical': 0.0, 'mean_word_length': 1.7013598326359833, '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': '1010364', 'n_tokens_mistral': 1390, 'n_tokens_neox': 1376, 'n_words': 444}