<commit_before>angular
	.module('ngSharepoint')
	.factory('$spLoader', ['$q', '$http', '$sp', function($q, $http, $sp) {
		var scripts = {};
		return ({
			loadScript: function(lib) {
				var query = $q(function(resolve, reject) {
					var element = document.createElement('script');
					element.type = 'text/javascript';
					element.src = '_layouts/15/' + lib;
					element.onload = resolve;
					element.onerror = reject;
				});
				scripts[lib] = query;
				return query;
			},
			waitUntil: function(lib) {
				return scripts[lib];
			},
			query: function(queryObject) {
				var query = {
					url: $sp.getSiteUrl() + queryObject.url,
					method: queryObject.method,
					headers: {
						'Accept': 'application/json; odata=verbose',
						'Content-Type': 'application/json; odata=verbose'						
					}
				};
				if ($sp.getConnectionMode() === 'REST' && !$sp.getAccessToken()) {
					return $q(function(resolve, reject) {
						query.body = queryObject.data;
						query.success = resolve;
						query.error = reject;
						new SP.RequestExecutor($sp.getSiteUrl()).executeAsync(query);
					});
				}else {
					return $q(function(resolve, reject) {
						query.data = queryObject.data;
						query.headers.Authorization = 'Bearer ' + $sp.getAccessToken;
						$http(query).then(resolve, reject);
					});
				}
			}
		});
	}]);<commit_msg>This should be a function call<commit_after>angular
	.module('ngSharepoint')
	.factory('$spLoader', ['$q', '$http', '$sp', function($q, $http, $sp) {
		var scripts = {};
		return ({
			loadScript: function(lib) {
				var query = $q(function(resolve, reject) {
					var element = document.createElement('script');
					element.type = 'text/javascript';
					element.src = '_layouts/15/' + lib;
					element.onload = resolve;
					element.onerror = reject;
				});
				scripts[lib] = query;
				return query;
			},
			waitUntil: function(lib) {
				return scripts[lib];
			},
			query: function(queryObject) {
				var query = {
					url: $sp.getSiteUrl() + queryObject.url,
					method: queryObject.method,
					headers: {
						'Accept': 'application/json; odata=verbose',
						'Content-Type': 'application/json; odata=verbose'						
					}
				};
				if ($sp.getConnectionMode() === 'REST' && !$sp.getAccessToken()) {
					return $q(function(resolve, reject) {
						query.body = queryObject.data;
						query.success = resolve;
						query.error = reject;
						new SP.RequestExecutor($sp.getSiteUrl()).executeAsync(query);
					});
				}else {
					return $q(function(resolve, reject) {
						query.data = queryObject.data;
						query.headers.Authorization = 'Bearer ' + $sp.getAccessToken();
						$http(query).then(resolve, reject);
					});
				}
			}
		});
	}]);
{'fraction_non_alphanumeric': 0.1683204704152885, 'fraction_numerical': 0.001470047776552738, 'mean_word_length': 2.8997134670487106, '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': '3824304', 'n_tokens_mistral': 1162, 'n_tokens_neox': 863, 'n_words': 165}