<commit_before>(function($) {
	var exports = this;

	function Resource(response) {
		var resource = this;
		var $$ = $(response);

		resource.href = $$.find('D\\:href, href').text();
		resource.initializeDisplayName();

		var p = $$.find('D\\:prop, prop');
		resource.contentType   = p.find('D\\:getcontenttype, getcontenttype').text();
		resource.contentLength = p.find('D\\:getcontentlength, getcontentlength').text() * 1;
		resource.lastModified  = new Date(p.find('D\\:getlastmodified, getlastmodified').text());

		var collection = p.find('D\\:resourcetype, resourcetype').contents().length > 0;
		resource.isCollection = function isCollection() {
			return collection;
		};
		if (resource.isCollection()) {
			resource.contentType = 'directory/directory';
		}

		return resource;
	}
	(function(proto) {
		proto.isCollection = function isCollection() {
			var value = /\/$/.test(this.href);

			this.isCollection = function isCollection() {
				return value;
			};

			return value;
		};
		proto.host = function host() {
			var value = this.href.split('/').slice(0, 3).join('/');

			this.host = function host() { return value; };

			return value;
		};
		proto.path = function path() {
			var value = '/' + this.href.split('/').slice(3).join('/');

			this.path = function path() { return value; };<commit_msg>Add content-type to broken resources.<commit_after>(function($) {
	var exports = this;

	function Resource(response) {
		var resource = this;
		var $$ = $(response);

		resource.href = $$.find('D\\:href, href').text();
		resource.initializeDisplayName(); // FIXME prefer displayname

		var p = $$.find('D\\:prop, prop');
		resource.contentType   = p.find('D\\:getcontenttype, getcontenttype').text();
		resource.contentLength = p.find('D\\:getcontentlength, getcontentlength').text() * 1;
		resource.lastModified  = new Date(p.find('D\\:getlastmodified, getlastmodified').text());

		var collection = p.find('D\\:resourcetype, resourcetype').contents().length > 0;
		resource.isCollection = function isCollection() {
			return collection;
		};
		if (resource.isCollection()) {
			resource.contentType = 'directory/directory';
		} else if (resource.contentType.length === 0) {
			resource.contentType = 'broken/file';
		}

		return resource;
	}
	(function(proto) {
		proto.isCollection = function isCollection() {
			var value = /\/$/.test(this.href);

			this.isCollection = function isCollection() {
				return value;
			};

			return value;
		};
		proto.host = function host() {
			var value = this.href.split('/').slice(0, 3).join('/');

			this.host = function host() { return value; };

			return value;
		};
		proto.path = function path() {
			var value = '/' + this.href.split('/').slice(3).join('/');

			this.path = function path() { return value; };
{'fraction_non_alphanumeric': 0.1827027027027027, 'fraction_numerical': 0.003963963963963964, 'mean_word_length': 3.7210884353741496, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '752260', 'n_tokens_mistral': 979, 'n_tokens_neox': 856, 'n_words': 183}