<commit_before>angular.module("angular-growl").service("growlMessages", ['$sce', '$timeout', function ($sce, $timeout) {
  "use strict";

  this.directives = {};
  this.initDirective = function(referenceId, limitMessages) {
    this.directives[referenceId] = {
      messages: [],
      limitMessages: limitMessages
    };
  };

  this.addMessage = function(message) {
    var directive = this.directives[message.referenceId];
    var messages = directive.messages;
    var found;
    var msgText;

    if (this.onlyUnique) {
      angular.forEach(messages, function(msg) {
        msgText = $sce.getTrustedHtml(msg.text);
        if (message.text === msgText &&
              message.severity === msg.severity &&
                msg.title === msg.title) {
          found = true;
        }
      });

      if (found) {
        return;<commit_msg>get all messages and destroy all messages<commit_after>angular.module("angular-growl").service("growlMessages", ['$sce', '$timeout', function ($sce, $timeout) {
  "use strict";

  this.directives = {};
  this.initDirective = function(referenceId, limitMessages) {
    this.directives[referenceId] = {
      messages: [],
      limitMessages: limitMessages
    };
  };

  this.getAllMessages = function(referenceId) {
    referenceId = referenceId || 0;
    return this.directives[referenceId].messages;
  };

  this.destroyAllMessages = function(referenceId) {
    var messages = this.getAllMessages(referenceId);
    angular.forEach(messages, function(message) {
      message.destroy();
    });
    this.directives[referenceId].messages = [];
  };

  this.addMessage = function(message) {
    var directive = this.directives[message.referenceId];
    var messages = directive.messages;
    var found;
    var msgText;

    if (this.onlyUnique) {
      angular.forEach(messages, function(msg) {
        msgText = $sce.getTrustedHtml(msg.text);
        if (message.text === msgText &&
              message.severity === msg.severity &&
                msg.title === msg.title) {
          found = true;
        }
      });

      if (found) {
        return;
{'fraction_non_alphanumeric': 0.13817663817663817, 'fraction_numerical': 0.0004748338081671415, 'mean_word_length': 2.7963963963963963, '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': '634219', 'n_tokens_mistral': 626, 'n_tokens_neox': 603, 'n_words': 113}