<commit_before>'use strict';
angular.module('ActivityLogger').factory('Track', function() {

	var Track = function() {
		this.track_records = [];

		this.addTrackRecord = function(record) {
			this.track_records.push(record);
		}
		
		/**
		 * Calculates the distance of the track.
		 * @return distance
		 */
		this.getDistance = function(){
			//TODO
			return 42;
		}

	};
	return Track;

});
<commit_msg>implemented getDistance()<commit_after>'use strict';
angular.module('ActivityLogger').factory('Track', function() {

	var Track = function() {
		this.track_records = [];

		this.addTrackRecord = function(record) {
			this.track_records.push(record);
		}

		/**
		 * Calculates the distance of the track.
		 * 
		 * @return distance
		 */
		this.getDistance = function() {
			var dist = 0;
			var i;
			for (i in this.track_records) {
				dist += this.track_records[i].getDistance();
			}
			return dist;
		}

	};
	return Track;

});

{'fraction_non_alphanumeric': 0.153028692879915, 'fraction_numerical': 0.003188097768331562, 'mean_word_length': 3.2432432432432434, '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': '1552992', 'n_tokens_mistral': 359, 'n_tokens_neox': 298, 'n_words': 63}