<commit_before>define([
	'jquery',
	'underscore',
	'backbone',
	'context',
	'bases',
	'views/widget/routerstats',
	'tpl!templates/application/detail.html'
], function($, _, Backbone, context, Bases, RouterStatsView, ApplicationDetailTemplate){
	var ApplicationDetailView = Bases.BaseView.extend({
		initialize: function() {
			this.model.on('request', this.startLoadingInline, this);
			this.model.on('change', this.render, this);
			this.model.versions.on('request', this.startLoadingInline, this);
			this.model.versions.on('change', this.render, this);
			this.model.versions.on('sync', this.render, this);

			this.$el.html(ApplicationDetailTemplate({
				application: this.model,
				context: context
			}));

			this.routerStats = null;
		},
		destroy: function() {
			this.model.off('request', this.startLoadingFull, this);
			this.model.off('change', this.render, this);
			this.model.versions.off('request', this.startLoadingInline, this);
			this.model.versions.off('change', this.render, this);
			this.model.versions.off('sync', this.render, this);

			if (this.routerStats) {
				console.log("Destroy - exit");
				this.routerStats.destroy();
			}

			this.undelegateEvents();
		},
		render: function() {
			this.doneLoading();

			this.$el.html(ApplicationDetailTemplate({
				application: this.model,
				context: context
			}));

			if (this.routerStats) {
				console.log("Destroy");
				this.routerStats.destroy();
			}

			console.log("Create");
			this.routerStats = new RouterStatsView({
				el: this.$('.router-stats'),
				category: 'application',
				input_id: this.model.id
			});

			return this;
		},
		events: {
			"click a.virtual": "navigateAway",
			"click a.delete": "deleteConfirm",
			"click button.realDelete": "realDelete",
			"click button.noDelete": "deleteCancel"
		},
		deleteConfirm: function(e) {
			e.preventDefault();
			this.$('.deleteConfirm').slideDown();
		},
		deleteCancel: function(e) {
			e.preventDefault();
			this.$('.deleteConfirm').slideUp();
		},
		realDelete: function(e) {<commit_msg>Removed debugging from the application detail javascript view.<commit_after>define([
	'jquery',
	'underscore',
	'backbone',
	'context',
	'bases',
	'views/widget/routerstats',
	'tpl!templates/application/detail.html'
], function($, _, Backbone, context, Bases, RouterStatsView, ApplicationDetailTemplate){
	var ApplicationDetailView = Bases.BaseView.extend({
		initialize: function() {
			this.model.on('request', this.startLoadingInline, this);
			this.model.on('change', this.render, this);
			this.model.versions.on('request', this.startLoadingInline, this);
			this.model.versions.on('change', this.render, this);
			this.model.versions.on('sync', this.render, this);

			this.$el.html(ApplicationDetailTemplate({
				application: this.model,
				context: context
			}));

			this.routerStats = null;
		},
		destroy: function() {
			this.model.off('request', this.startLoadingFull, this);
			this.model.off('change', this.render, this);
			this.model.versions.off('request', this.startLoadingInline, this);
			this.model.versions.off('change', this.render, this);
			this.model.versions.off('sync', this.render, this);

			if (this.routerStats) {
				this.routerStats.destroy();
			}

			this.undelegateEvents();
		},
		render: function() {
			this.doneLoading();

			this.$el.html(ApplicationDetailTemplate({
				application: this.model,
				context: context
			}));

			if (this.routerStats) {
				this.routerStats.destroy();
			}

			this.routerStats = new RouterStatsView({
				el: this.$('.router-stats'),
				category: 'application',
				input_id: this.model.id
			});

			return this;
		},
		events: {
			"click a.virtual": "navigateAway",
			"click a.delete": "deleteConfirm",
			"click button.realDelete": "realDelete",
			"click button.noDelete": "deleteCancel"
		},
		deleteConfirm: function(e) {
			e.preventDefault();
			this.$('.deleteConfirm').slideDown();
		},
		deleteCancel: function(e) {
			e.preventDefault();
			this.$('.deleteConfirm').slideUp();
		},
		realDelete: function(e) {
{'fraction_non_alphanumeric': 0.16946640316205533, 'fraction_numerical': 0.0, 'mean_word_length': 4.118836915297092, 'pattern_counts': {'":': 8, '<': 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': '3306138', 'n_tokens_mistral': 1504, 'n_tokens_neox': 1274, 'n_words': 225}