<commit_before>(function($) {
	
	window.subnecto = new Subnecto({
	});

	var subnectoExampleApp = function() {
	
		var self = this;
		
		this.UserModel = function(parent) {
			subnecto.BaseModel.call(this, parent);
			this.username = new subnecto.ValueModel(this);
            
            this.access = function() {
                this.push('access');
            };
		};
        
        this.PropagationModel = function(parent) {
			subnecto.BaseModel.call(this, parent);
            this.stop = new subnecto.BooleanModel(this);
            this.stop.value = false;
        };
	
		this.initModelPublishers = function() {
			$('#username-input').keyup(function(e) {
				self.superModel.models.user.username.update($(this).val());
			});
            
            $('#btn-access').click(function(e) {
                e.preventDefault();
                self.superModel.models.user.access();
            });
            
            $('#btn-stop-propagation').click(function(e) {
                self.superModel.models.propagation.stop.update(true);
            });
            
            $('#btn-resume-propagation').click(function(e) {
                self.superModel.models.propagation.stop.update(false);
            });
		};
	
		this.initModelSubscribers = function() {
			var userModel = self.superModel.models.user;
            
            userModel.on('access', function(model) {
                $('.user-update-events').append('<code>subnectoExampleApp.superModel.models.<strong>user:access</strong></code><br>');
            });
            
			userModel.username.on('update', function(model, event) {
                if (self.superModel.models.propagation.stop.value) {
                    event.stopPropagation();   
                }
				$('.username-result').html('Hello <strong>' + model.value + '</strong>!');
			});
			
			userModel.username.on('update', function(model) {
				$('.username-update-events').append('<code>subnectoExampleApp.superModel.models.<strong>user.username:update</strong></code><br>');
			});
			
			userModel.on('update', function(model) {
				$('.user-update-events').append('<code>subnectoExampleApp.superModel.models.<strong>user:update</strong></code><br>');
			});
            
            self.superModel.models.propagation.stop.on('update', function(model, event) {
                if (model.value) {
                    $('#btn-stop-propagation').addClass('hidden');
                    $('#btn-resume-propagation').removeClass('hidden');
                } else {
                    $('#btn-stop-propagation').removeClass('hidden');
                    $('#btn-resume-propagation').addClass('hidden');
                }
            });<commit_msg>Cleanup<commit_after>(function($) {
	
	window.subnecto = new Subnecto({
	});

	var subnectoExampleApp = function() {
	
		var self = this;
		
		this.UserModel = function(parent) {
			subnecto.BaseModel.call(this, parent);
			this.username = new subnecto.ValueModel(this);
            
            this.access = function() {
                this.push('access');
            };
		};
        
        this.PropagationModel = function(parent) {
			subnecto.BaseModel.call(this, parent);
            this.stop = new subnecto.BooleanModel(this);
            this.stop.value = false;
        };
	
		this.initModelPublishers = function() {
			$('#username-input').keyup(function(e) {
				self.superModel.models.user.username.update($(this).val());
			});
            
            $('#btn-access').click(function(e) {
                e.preventDefault();
                self.superModel.models.user.access();
            });
            
            $('#btn-stop-propagation').click(function(e) {
                self.superModel.models.propagation.stop.update(true);
            });
            
            $('#btn-resume-propagation').click(function(e) {
                self.superModel.models.propagation.stop.update(false);
            });
		};
	
		this.initModelSubscribers = function() {
			var userModel = self.superModel.models.user;
            
            userModel.on('access', function(model) {
                $('.user-update-events').append('<code>subnectoExampleApp.superModel.models.<strong>user:access</strong></code><br>');
            });
            
			userModel.username.on('update', function(model, event) {
                if (self.superModel.models.propagation.stop.value) {
                    event.stopPropagation();
                }
				$('.username-result').html('Hello <strong>' + model.value + '</strong>!');
			});
			
			userModel.username.on('update', function(model) {
				$('.username-update-events').append('<code>subnectoExampleApp.superModel.models.<strong>user.username:update</strong></code><br>');
			});
			
			userModel.on('update', function(model) {
				$('.user-update-events').append('<code>subnectoExampleApp.superModel.models.<strong>user:update</strong></code><br>');
			});
            
            self.superModel.models.propagation.stop.on('update', function(model, event) {
                if (model.value) {
                    $('#btn-stop-propagation').addClass('hidden');
                    $('#btn-resume-propagation').removeClass('hidden');
                } else {
                    $('#btn-stop-propagation').removeClass('hidden');
                    $('#btn-resume-propagation').addClass('hidden');
                }
            });
{'fraction_non_alphanumeric': 0.1669449081803005, 'fraction_numerical': 0.0, 'mean_word_length': 2.0428893905191874, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, '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': '7345128', 'n_tokens_mistral': 1629, 'n_tokens_neox': 1512, 'n_words': 148}