<commit_before>define('app/views/templated', ['ember'],
    /**
     *  Templated View
     *
     *  @returns Class
     */
	function() {
		return Ember.View.extend({

			/**
			 *  Initialization
			 */

            init: function() {

            	// This view exists to easily set the template
            	// of a view based on the global JS_BUILD flag
                this._super();

                // If the view doesn't specify a name, do not attempt
                // to set it's template
                if (!this.name) return;

                if (JS_BUILD) {

	                // When JS_BUILD equals to true, the app serves the 
	                // precompiled templates which have been loaded from
	                // the app/templates/build.js file
                    info('Getting precompiled template for: ' + this.name);
                	this.set('template', Ember.TEMPLATES[this.name + '/html']);

                } else {

                	// When JS_BUILD equals to false, the app compiles the
                	// templates on the client. The the compiled template
                    // is saved on the App to prevent recompilations

                    var templateSaveName = this.name + '_template';


                    if (Mist[templateSaveName]) {

                        // Template has already been compiled
                        this.setTemplate(Mist[templateSaveName]);

                    } else {

                        // Get html file, compile it, and save it
                        var that = this;
                        require(['text!app/templates/' + this.name + '.html'], function(template) {

                            var template = Ember.Handlebars.compile(template);
                            that.setTemplate(template);
                            Mist.set(templateSaveName, template);
                        });
                    }
                }
            },


            /**
             *
             *  Methods
             *
             */

            setTemplate: function(template) {
                this.set('template', template).rerender();
                Ember.run.next(this, function() {
                    $('#' + this.elementId).trigger('create');
                });
            }
		});
	}
);<commit_msg>Fix possible variable name conflig<commit_after>define('app/views/templated', ['ember'],
    /**
     *  Templated View
     *
     *  @returns Class
     */
	function() {
		return Ember.View.extend({

			/**
			 *  Initialization
			 */

            init: function() {

            	// This view exists to easily set the template
            	// of a view based on the global JS_BUILD flag
                this._super();

                // If the view doesn't specify a name, do not attempt
                // to set it's template
                if (!this.name) return;

                if (JS_BUILD) {

	                // When JS_BUILD equals to true, the app serves the 
	                // precompiled templates which have been loaded from
	                // the app/templates/build.js file
                    info('Getting precompiled template for: ' + this.name);
                	this.set('template', Ember.TEMPLATES[this.name + '/html']);

                } else {

                	// When JS_BUILD equals to false, the app compiles the
                	// templates on the client. The the compiled template
                    // is saved on the App to prevent recompilations

                    var templateSaveName = this.name + '_template';


                    if (Mist[templateSaveName]) {

                        // Template has already been compiled
                        this.setTemplate(Mist[templateSaveName]);

                    } else {

                        // Get html file, compile it, and save it
                        var that = this;
                        require(['text!app/templates/' + this.name + '.html'], function(template) {

                            var compiledTemplate = Ember.Handlebars.compile(template);
                            that.setTemplate(compiledTemplate);
                            Mist.set(templateSaveName, compiledTemplate);
                        });
                    }
                }
            },


            /**
             *
             *  Methods
             *
             */

            setTemplate: function(template) {
                this.set('template', template).rerender();
                Ember.run.next(this, function() {
                    $('#' + this.elementId).trigger('create');
                });
            }
		});
	}
);
{'fraction_non_alphanumeric': 0.09751887810140238, 'fraction_numerical': 0.0, 'mean_word_length': 1.1178620374600274, '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': '2757118', 'n_tokens_mistral': 1155, 'n_tokens_neox': 1026, 'n_words': 292}