<commit_before>'use strict';

angular.module('MLDS')
.factory('CommercialUsageService', ['$http', '$rootScope', '$log', '$q', 'Events', '$filter',
                                    function($http, $rootScope, $log, $q, Events, $filter){
		function serializeDate(date) {
			if (date) {
				return $filter('date')(date, 'yyyy-MM-dd');
			} else {
				return null;
			}
		}
		
		function serializeCommercialEntry(entry) {
			return {
				commercialUsageEntryId: entry.commercialUsageEntryId,
				name: entry.name,
				startDate: serializeDate(entry.startDate),
				endDate: serializeDate(entry.endDate),
				country: entry.country,
				created: entry.created
			}<commit_msg>Serialize the entry type field<commit_after>'use strict';

angular.module('MLDS')
.factory('CommercialUsageService', ['$http', '$rootScope', '$log', '$q', 'Events', '$filter',
                                    function($http, $rootScope, $log, $q, Events, $filter){
		function serializeDate(date) {
			if (date) {
				return $filter('date')(date, 'yyyy-MM-dd');
			} else {
				return null;
			}
		}
		
		function serializeCommercialEntry(entry) {
			return {
				commercialUsageEntryId: entry.commercialUsageEntryId,
				name: entry.name,
				type: entry.type,
				startDate: serializeDate(entry.startDate),
				endDate: serializeDate(entry.endDate),
				country: entry.country,
				created: entry.created
			};
{'fraction_non_alphanumeric': 0.15129682997118155, 'fraction_numerical': 0.0, 'mean_word_length': 3.3955696202531644, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1215477', 'n_tokens_mistral': 516, 'n_tokens_neox': 424, 'n_words': 88}