<commit_before>'use strict';

var ObjectObserver = require('./ObjectObserver');
var ArrayObserver = require('./ArrayObserver');
var RenderHandler = require('famous-handlers').RenderHandler;

function ModelView (dispatch) {
    this._model = null;
    this._renderer = null;
    this._modelControllers = [];
    this._rendererControllers = [];
    this._dispatch = dispatch;
}

ModelView.prototype.kill = function kill () {
    if (this._childManager) this._childManager.stopObserving();
    if (this._subscriptionManager) this._subscriptionManager.stopObserving();
    return this;
};

ModelView.prototype.acceptModel = function acceptModel (model) {
    var renderer = new model.constructor.renderWith(this._dispatch, this._model);
    var Handler;
    var i;
    var len;

    this._model = model;
    this._rendererControllers.push(new RenderHandler(renderer, this._dispatch));
    this._renderer = renderer;<commit_msg>fix: Fix acceptModel<commit_after>'use strict';

var ObjectObserver = require('./ObjectObserver');
var ArrayObserver = require('./ArrayObserver');
var RenderHandler = require('famous-handlers').RenderHandler;

function ModelView (dispatch) {
    this._model = null;
    this._renderer = null;
    this._modelControllers = [];
    this._rendererControllers = [];
    this._dispatch = dispatch;
}

ModelView.prototype.kill = function kill () {
    if (this._childManager) this._childManager.stopObserving();
    if (this._subscriptionManager) this._subscriptionManager.stopObserving();
    return this;
};

ModelView.prototype.acceptModel = function acceptModel (model) {
    this._model = model;
    
    var renderer = new model.constructor.renderWith(this._dispatch, this._model);
    var Handler;
    var i;
    var len;

    this._rendererControllers.push(new RenderHandler(renderer, this._dispatch));
    this._renderer = renderer;
{'fraction_non_alphanumeric': 0.12002152852529602, 'fraction_numerical': 0.0, 'mean_word_length': 4.341954022988506, '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': '6839767', 'n_tokens_mistral': 507, 'n_tokens_neox': 525, 'n_words': 111}