<commit_before>(function(oCanvas, window, document, undefined){

	// Define the class
	var draw = function () {
		
		// Return an object when instantiated
		return {
			// Method used by oCanvas to give this object access to the current instance of the core object
			setCore: function (thecore) {
				this.core = thecore;
			},

			// Set properties
			objects: [],
			drawn: [],
			lastObjectID: 0,
			
			// Method for incrementing the last object ID and returning the new ID
			nextObjectID: function () {
				this.lastObjectID++;
				return this.lastObjectID;
			},
			
			// Method for adding a new object to the object list that will be drawn
			add: function (obj) {
				this.objects[obj.objectID - 1] = obj;
				this.drawn[obj.objectID - 1] = false;
			},
			
			// Method for removing an object from the object list
			remove: function (id) {
				this.objects[id - 1] = null;
			},
			
			// Method for clearing the canvas from everything that has been drawn (bg can be kept)
			clear: function (keepBackground) {
				if (keepBackground === undefined || keepBackground === true) {
					// The background is just redrawn over the entire canvas to remove all image data
					this.core.background.redraw();
				} else {
					// Clear all the image data on the canvas
					this.core.canvas.clearRect(0, 0, this.core.width, this.core.height);
				}
			},
			<commit_msg>Redefined how IDs are added to objects<commit_after>(function(oCanvas, window, document, undefined){

	// Define the class
	var draw = function () {
		
		// Return an object when instantiated
		return {
			// Method used by oCanvas to give this object access to the current instance of the core object
			setCore: function (thecore) {
				this.core = thecore;
			},

			// Set properties
			objects: [],
			drawn: [],
			lastObjectID: 0,
			
			// Method for adding a new object to the object list that will be drawn
			add: function (obj) {
				var id = ++this.lastObjectID;
				this.objects[id - 1] = obj;
				this.drawn[id - 1] = false;
				
				return id;
			},
			
			// Method for removing an object from the object list
			remove: function (id) {
				this.objects[id - 1] = null;
			},
			
			// Method for clearing the canvas from everything that has been drawn (bg can be kept)
			clear: function (keepBackground) {
				if (keepBackground === undefined || keepBackground === true) {
					// The background is just redrawn over the entire canvas to remove all image data
					this.core.background.redraw();
				} else {
					// Clear all the image data on the canvas
					this.core.canvas.clearRect(0, 0, this.core.width, this.core.height);
				}
			},
			
{'fraction_non_alphanumeric': 0.10155361879499811, 'fraction_numerical': 0.004547176960970065, 'mean_word_length': 2.6213991769547325, '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': '7265124', 'n_tokens_mistral': 960, 'n_tokens_neox': 745, 'n_words': 294}