<commit_before>var Messages = (function() {
	var obj = {};
	
	obj.keys = {};
	
	obj.get = function(key) {
		if (key.length > 0) {
			if (Object.keys(obj.keys).length > 0) {
				return obj.keys[key];
			} else {
				if (localStorage.messages !== undefined) {
					obj.keys = JSON.parse(localStorage.messages);
				}
				if (Object.keys(obj.keys).length > 0) {
					return obj.keys[key];
				} else {
					obj.load(false);
					return obj.keys[key];
				}
			}
		}
	}
	
	obj.load = function(isAsync) {
		if (isAsync === undefined) {
			isAsync = true;
		}
		
		if (localStorage.messages === undefined) {
			if (Object.keys(obj.keys).length == 0) {
				$.ajax('messages/loadAll', {
					async: isAsync,
					success: function(result) {
						obj.keys = result.hashMap;
						localStorage.setItem('messages', JSON.stringify(result.hashMap));
					}
				});
			}
		} else {
			obj.keys = JSON.parse(localStorage.messages);
		}
	}
	
	return {
		get : obj.get,
		load : obj.load
	};
	
})();


$(document).ready(function(){
	Messages.load();
});<commit_msg>Updating from localStorage to sessionStorage<commit_after>var Messages = (function() {
	var obj = {};
	
	obj.keys = {};
	
	obj.get = function(key) {
		if (key.length > 0) {
			if (Object.keys(obj.keys).length > 0) {
				return obj.keys[key];
			} else {
				if (sessionStorage.messages !== undefined) {
					obj.keys = JSON.parse(sessionStorage.messages);
				}
				if (Object.keys(obj.keys).length > 0) {
					return obj.keys[key];
				} else {
					obj.load(false);
					return obj.keys[key];
				}
			}
		}
	}
	
	obj.load = function(isAsync) {
		if (isAsync === undefined) {
			isAsync = true;
		}
		
		if (sessionStorage.messages === undefined) {
			if (Object.keys(obj.keys).length == 0) {
				$.ajax('messages/loadAll', {
					async: isAsync,
					success: function(result) {
						obj.keys = result.hashMap;
						sessionStorage.setItem('messages', JSON.stringify(result.hashMap));
					}
				});
			}
		} else {
			obj.keys = JSON.parse(sessionStorage.messages);
		}
	}
	
	return {
		get : obj.get,
		load : obj.load
	};
	
})();


$(document).ready(function(){
	Messages.load();
});
{'fraction_non_alphanumeric': 0.17578307620383357, 'fraction_numerical': 0.0037400654511453952, 'mean_word_length': 2.6209813874788495, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '7564684', 'n_tokens_mistral': 948, 'n_tokens_neox': 743, 'n_words': 130}