<commit_before>var attrs = [ 
	"source",
	"protocol",
	"authority",
	"userInfo",
	"user",
	"password",
	"host",
	"port",
	"relative",
	"path",
	"directory",
	"file",
	"query",
	"anchor"
];

var URI = exports = Class(function(supr) {
	this.init = function(url, isStrict) {
		if (url instanceof URI) {
			for (var i = 0, attr; attr = attrs[i]; ++i) {
				this['_' + attr] = url['_' + attr];
			}
			return;
		}
		
		this._isStrict = isStrict;
		
		var uriData = exports.parse(url, isStrict);
		for (var attr in uriData) {
			this['_' + attr] = uriData[attr];
		};
	}
  
	for (var i = 0, attr; attr = attrs[i]; ++i) {
		(function(attr) {
			var fNameSuffix = attr.charAt(0).toUpperCase() + attr.slice(1);
			this['get' + fNameSuffix] = function() {
				return this['_' + attr];
			};
			this['set' + fNameSuffix] = function(val) {
				this['_' + attr] = val;
				return this;
			};
		}).call(this, attr);
	};
	
	this.query = function(key) { return exports.parseQuery(this._query)[key]; }
	this.hash = function(key) { return exports.parseQuery(this._anchor)[key]; }
	
	this.addHash = function(kvp) {
		var hash = exports.parseQuery(this._anchor);
		for (var i in kvp) { hash[i] = kvp[i]; }
		this._anchor = exports.buildQuery(hash);
		return this;
	}
	
	this.push = function(path) {
		if (path) {
			this._path = (this._path + '/' + path).replace(/\/\//g, '/');
		}
		return this;
	}
	
	this.addQuery = function(kvp) {
		var query = exports.parseQuery(this._query);
		for (var i in kvp) { query[i] = kvp[i]; }
		this._query = exports.buildQuery(query);
		return this;
	}<commit_msg>replace multiple slashes with single slashes<commit_after>var attrs = [ 
	"source",
	"protocol",
	"authority",
	"userInfo",
	"user",
	"password",
	"host",
	"port",
	"relative",
	"path",
	"directory",
	"file",
	"query",
	"anchor"
];

var URI = exports = Class(function(supr) {
	this.init = function(url, isStrict) {
		if (url instanceof URI) {
			for (var i = 0, attr; attr = attrs[i]; ++i) {
				this['_' + attr] = url['_' + attr];
			}
			return;
		}
		
		this._isStrict = isStrict;
		
		var uriData = exports.parse(url, isStrict);
		for (var attr in uriData) {
			this['_' + attr] = uriData[attr];
		};
	}
  
	for (var i = 0, attr; attr = attrs[i]; ++i) {
		(function(attr) {
			var fNameSuffix = attr.charAt(0).toUpperCase() + attr.slice(1);
			this['get' + fNameSuffix] = function() {
				return this['_' + attr];
			};
			this['set' + fNameSuffix] = function(val) {
				this['_' + attr] = val;
				return this;
			};
		}).call(this, attr);
	};
	
	this.query = function(key) { return exports.parseQuery(this._query)[key]; }
	this.hash = function(key) { return exports.parseQuery(this._anchor)[key]; }
	
	this.addHash = function(kvp) {
		var hash = exports.parseQuery(this._anchor);
		for (var i in kvp) { hash[i] = kvp[i]; }
		this._anchor = exports.buildQuery(hash);
		return this;
	}
	
	this.push = function(path) {
		if (path) {
			this._path = (this._path + '/' + path).replace(/\/\/+/g, '/');
		}
		return this;
	}
	
	this.addQuery = function(kvp) {
		var query = exports.parseQuery(this._query);
		for (var i in kvp) { query[i] = kvp[i]; }
		this._query = exports.buildQuery(query);
		return this;
	}
{'fraction_non_alphanumeric': 0.1922835633626098, 'fraction_numerical': 0.002509410288582183, 'mean_word_length': 3.286290322580645, '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': '4397688', 'n_tokens_mistral': 1368, 'n_tokens_neox': 1235, 'n_words': 269}