<commit_before>angular.module("angular-growl").provider("growl", function() {
	"use strict";

	var _ttl = null,
		_messagesKey = 'messages',
		_messageTextKey = 'text',
		_messageSeverityKey = 'severity';

	this.globalTimeToLive = function(ttl) {
		_ttl = ttl;
	};

	this.messagesKey = function(messagesKey) {
		_messagesKey = messagesKey;
	};

	this.messageTextKey = function(messageTextKey) {
		_messageTextKey = messageTextKey;
	};

	this.messageSeverityKey = function(messageSeverityKey) {
		_messageSeverityKey = messageSeverityKey;
	};

	this.serverMessagesInterceptor = ['$q', 'growl', function ($q, growl) {
		function checkResponse(response) {
			if (response.data[_messagesKey] && response.data[_messagesKey].length > 0) {
				growl.addServerMessages(response.data[_messagesKey]);
			}
		}

		function success(response) {
			checkResponse(response);
			return response;
		}

		function error(response) {
			checkResponse(response);
			return $q.reject(response);
		}

		return function (promise) {
			return promise.then(success, error);
		};
	}];

	this.$get = ["$rootScope", "$filter", function ($rootScope, $filter) {
		var translate;

		try {<commit_msg>enhanced jsdoc<commit_after>angular.module("angular-growl").provider("growl", function() {
	"use strict";

	var _ttl = null,
		_messagesKey = 'messages',
		_messageTextKey = 'text',
		_messageSeverityKey = 'severity';

	/**
	 * set a global timeout (time to live) after which messages will be automatically closed
	 *
	 * @param ttl in seconds
	 */
	this.globalTimeToLive = function(ttl) {
		_ttl = ttl;
	};

	/**
	 * sets the key in $http response the serverMessagesInterecptor is looking for server-sent messages, value of key
	 * needs to be an array of objects
	 *
	 * @param {string} messagesKey default: messages
	 */
	this.messagesKey = function(messagesKey) {
		_messagesKey = messagesKey;
	};

	/**
	 * sets the key in server sent messages the serverMessagesInterecptor is looking for text of message
	 *
	 * @param {string} messageTextKey default: text
	 */
	this.messageTextKey = function(messageTextKey) {
		_messageTextKey = messageTextKey;
	};

	/**
	 * sets the key in server sent messages the serverMessagesInterecptor is looking for severity of message
	 *
	 * @param {string} messageSeverityKey default: severity
	 */
	this.messageSeverityKey = function(messageSeverityKey) {
		_messageSeverityKey = messageSeverityKey;
	};

	/**
	 * $http interceptor that can be added to array of $http interceptors during config phase of application
	 * via $httpProvider.responseInterceptors.push(...)
	 *
	 */
	this.serverMessagesInterceptor = ['$q', 'growl', function ($q, growl) {
		function checkResponse(response) {
			if (response.data[_messagesKey] && response.data[_messagesKey].length > 0) {
				growl.addServerMessages(response.data[_messagesKey]);
			}
		}

		function success(response) {
			checkResponse(response);
			return response;
		}

		function error(response) {
			checkResponse(response);
			return $q.reject(response);
		}

		return function (promise) {
			return promise.then(success, error);
		};
	}];

	this.$get = ["$rootScope", "$filter", function ($rootScope, $filter) {
		var translate;

		try {
{'fraction_non_alphanumeric': 0.12355333124804505, 'fraction_numerical': 0.0006255864873318737, 'mean_word_length': 4.303482587064677, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5961510', 'n_tokens_mistral': 1100, 'n_tokens_neox': 979, 'n_words': 239}