<commit_before>(function (context, localforage) {
	var event = new Event('network-ready'),
		queue = [],
		obj = {},
		startedAt = new Date().getTime(),
		storageKey = 'latencyStore',
		origin = 'unknown';

        context.addEventListener("network-ready", function () {
            for (var i = 0; i < queue.length; ++i) {
                    processRequest(queue[i][0], queue[i][1], queue[i][2], false);
            }
            queue = [];
        });
        
	obj.ajax = function (url, data, callback) {
                processRequest (url, data, callback, true);
        };
        
        function processRequest (url, data, callback, critical) {
                if (typeof data === 'function') {
			callback = data;
			data = null;
		}
		if (data && typeof data !== 'string' && JSON) {
			data = JSON.stringify(data);
		}
		data = data ? data.toString() : null;
		var xhr = new XMLHttpRequest(),
			successCallback = function () {
				if (xhr.status === null || xhr.status === 0 || xhr.status === 404) {
					return errorCallback();
				}
				recordLatency(data ? data.length : 0, startedAt, function () {
					if (typeof callback === 'function') {
						callback(xhr.response, xhr.status, xhr);<commit_msg>Fixed tabbing to match with standard<commit_after>(function (context, localforage) {
	var event = new Event('network-ready'),
		queue = [],
		obj = {},
		startedAt = new Date().getTime(),
		storageKey = 'latencyStore',
		origin = 'unknown';

        context.addEventListener("network-ready", function () {
                for (var i = 0; i < queue.length; ++i) {
                        processRequest(queue[i][0], queue[i][1], queue[i][2], false);
                }
                queue = [];
        });
        
	obj.ajax = function (url, data, callback) {
                processRequest (url, data, callback, true);
        };
        
        function processRequest (url, data, callback, critical) {
                if (typeof data === 'function') {
			callback = data;
			data = null;
		}
		if (data && typeof data !== 'string' && JSON) {
			data = JSON.stringify(data);
		}
		data = data ? data.toString() : null;
		var xhr = new XMLHttpRequest(),
			successCallback = function () {
				if (xhr.status === null || xhr.status === 0 || xhr.status === 404) {
					return errorCallback();
				}
				recordLatency(data ? data.length : 0, startedAt, function () {
					if (typeof callback === 'function') {
						callback(xhr.response, xhr.status, xhr);
{'fraction_non_alphanumeric': 0.15932066316215124, 'fraction_numerical': 0.007278608976951072, 'mean_word_length': 2.334231805929919, 'pattern_counts': {'":': 0, '<': 5, '<?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': '572225', 'n_tokens_mistral': 822, 'n_tokens_neox': 716, 'n_words': 190}