<commit_before>(function(root) {

	function StringTree(comparator) {
		this.comparator = comparator;
		this.root = {};
	}

	StringTree.prototype.get = function() {
		var root = this.root;
		for (var i=0; i<arguments.length; i++) {
			var key = arguments[i];
			if (root.hasOwnProperty(key)) {
				root = root[key];
			}
			else {
				return undefined;
			}
		}
		return root;
	};

	StringTree.prototype.set = function() {
		var root = this.root;
		var value = arguments[arguments.length-1];
		var lastKey = arguments[arguments.length-2];
		for (var i=0; i<arguments.length-2; i++) {
			var key = arguments[i];
			if (!root.hasOwnProperty(key)) {
				root[key] = {};
			}
			root = root[key];
		}
		root[lastKey] = value;
	};

	if( typeof exports !== 'undefined' ) {
		if( typeof module !== 'undefined' && module.exports ) {
			exports = module.exports = StringTree;
		}
		exports.mymodule = StringTree;
	} 
	else {
		root.mymodule = StringTree;
	}

})(this);<commit_msg>Minor refactoring<commit_after>(function(globals) {

	function StringTree(comparator) {
		this.comparator = comparator;
		this.root = {};
	}

	StringTree.prototype.get = function() {
		var root = this.root;
		for (var i=0; i<arguments.length; i++) {
			var key = arguments[i];
			if (root.hasOwnProperty(key)) {
				root = root[key];
			}
			else {
				return undefined;
			}
		}
		return root;
	};

	StringTree.prototype.set = function() {
		var root = this.root;
		var value = arguments[arguments.length-1];
		var lastKey = arguments[arguments.length-2];
		for (var i=0; i<arguments.length-2; i++) {
			var key = arguments[i];
			if (!root.hasOwnProperty(key)) {
				root[key] = {};
			}
			root = root[key];
		}
		root[lastKey] = value;
	};

	if( typeof exports !== 'undefined' ) {
		if( typeof module !== 'undefined' && module.exports ) {
			exports = module.exports = StringTree;
		}
		exports.mymodule = StringTree;
	} 
	else {
		global.mymodule = StringTree;
	}

})(this); // this will be window, if running in browser

{'fraction_non_alphanumeric': 0.16082164328657314, 'fraction_numerical': 0.00501002004008016, 'mean_word_length': 3.2130801687763713, 'pattern_counts': {'":': 0, '<': 7, '<?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': '563934', 'n_tokens_mistral': 803, 'n_tokens_neox': 706, 'n_words': 152}