<commit_before>(function() {
    var URLLoader_Create = function(instance) {
	var loader = ppapi.URLLoader.Create(instance)
	var uid = resources.register("url_loader", loader);
	return uid;
    };

    var URLLoader_IsURLLoader = function(resource) {
	return resources.is(resource, "url_loader");
    };

    var URLLoader_Open = function(loader, request, callback) {
	var l = resources.resolve(loader);
	var r = resources.resolve(request);
	var c = ppapi_glue.convertCompletionCallback(callback);
	return ppapi.URLLoader.Open(l, r, c);
    };

    var URLLoader_FollowRedirect = function() { NotImplemented; };
    var URLLoader_GetUploadProgress = function() { NotImplemented; };

    var URLLoader_GetDownloadProgress = function(loader, bytes_ptr, total_ptr) {
	var l = resources.resolve(loader);
	setValue(bytes_ptr, loader.progress_bytes, 'i64');
	setValue(total_ptr, loader.progress_total, 'i64');
	return 1;
    };

    var URLLoader_GetResponseInfo = function() { NotImplemented; };

    var URLLoader_ReadResponseBody = function(loader, buffer_ptr, read_size, callback) {
	var l = resources.resolve(loader);
	var c = ppapi_glue.convertCompletionCallback(callback);
	return ppapi.URLLoader.ReadResponseBody(l, read_size, function(status, data) {
	    writeStringToMemory(data, buffer_ptr, true);
	    c(status);
	});
    };

    var URLLoader_FinishStreamingToFile = function() { NotImplemented; };<commit_msg>Fix bug in URLLoader_GetDownloadProgress.<commit_after>(function() {
    var URLLoader_Create = function(instance) {
	var loader = ppapi.URLLoader.Create(instance)
	var uid = resources.register("url_loader", loader);
	return uid;
    };

    var URLLoader_IsURLLoader = function(resource) {
	return resources.is(resource, "url_loader");
    };

    var URLLoader_Open = function(loader, request, callback) {
	var l = resources.resolve(loader);
	var r = resources.resolve(request);
	var c = ppapi_glue.convertCompletionCallback(callback);
	return ppapi.URLLoader.Open(l, r, c);
    };

    var URLLoader_FollowRedirect = function() { NotImplemented; };
    var URLLoader_GetUploadProgress = function() { NotImplemented; };

    var URLLoader_GetDownloadProgress = function(loader, bytes_ptr, total_ptr) {
	var l = resources.resolve(loader);
	setValue(bytes_ptr, l.progress_bytes, 'i64');
	setValue(total_ptr, l.progress_total, 'i64');
	return 1;
    };

    var URLLoader_GetResponseInfo = function() { NotImplemented; };

    var URLLoader_ReadResponseBody = function(loader, buffer_ptr, read_size, callback) {
	var l = resources.resolve(loader);
	var c = ppapi_glue.convertCompletionCallback(callback);
	return ppapi.URLLoader.ReadResponseBody(l, read_size, function(status, data) {
	    writeStringToMemory(data, buffer_ptr, true);
	    c(status);
	});
    };

    var URLLoader_FinishStreamingToFile = function() { NotImplemented; };
{'fraction_non_alphanumeric': 0.1173791170287316, 'fraction_numerical': 0.00350385423966363, 'mean_word_length': 5.087420042643923, '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': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5864297', 'n_tokens_mistral': 889, 'n_tokens_neox': 920, 'n_words': 183}