<commit_before>var State = require('ampersand-state');
var _ = require('underscore');
var sync = require('ampersand-sync');


function Model(attrs, options) {
    options || (options = {});
    this.cid = _.uniqueId('model');
    // grab collection/registry if passed in
    _.extend(this, _.pick(options, attributeOptions));
    BaseState.call(this, attrs, options);
    if (attrs && attrs[this.idAttribute] && this.registry) _.result(this, 'registry').store(this);
}

var attributeOptions = ['collection', 'registry'];
var BaseState = State.extend({});

Model.prototype = Object.create(BaseState.prototype, {
    constructor: Model
});

// Set up all inheritable properties and methods.
_.extend(Model.prototype, {
    idAttribute: 'id',

    namespaceAttribute: 'namespace',

    typeAttribute: 'modelType',

    // Get ID of model per configuration.
    // Should *always* be how ID is determined by other code.
    getId: function () {
        return this[this.idAttribute];
    },
<commit_msg>BBTest - constructor being improperly set on models.<commit_after>var State = require('ampersand-state');
var _ = require('underscore');
var sync = require('ampersand-sync');


function Model(attrs, options) {
    options || (options = {});
    this.cid = _.uniqueId('model');
    // grab collection/registry if passed in
    _.extend(this, _.pick(options, attributeOptions));
    BaseState.call(this, attrs, options);
    if (attrs && attrs[this.idAttribute] && this.registry) _.result(this, 'registry').store(this);
}

var attributeOptions = ['collection', 'registry'];
var BaseState = State.extend({});

Model.prototype = Object.create(BaseState.prototype);

// Set up all inheritable properties and methods.
_.extend(Model.prototype, {
    idAttribute: 'id',

    namespaceAttribute: 'namespace',

    typeAttribute: 'modelType',

    // Get ID of model per configuration.
    // Should *always* be how ID is determined by other code.
    getId: function () {
        return this[this.idAttribute];
    },

{'fraction_non_alphanumeric': 0.1453459432553509, 'fraction_numerical': 0.0, 'mean_word_length': 3.902439024390244, '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': '3260278', 'n_tokens_mistral': 573, 'n_tokens_neox': 566, 'n_words': 158}