<commit_before>'use strict';

(function (angular) {

  angular.module('testsCucumberApp')
    .directive('tcStatus', function () {
      return {
        restrict: 'E',
        scope: {
          status: '=status'
        },
        templateUrl: 'views/tc-status.html'
      };
    })
    .directive('tcTestRunStatus', function () {
      return {
        restrict: 'E',
        scope: {
          status: '=status'
        },
        templateUrl: 'views/tc-test-run-status.html'
      };
    })
    .directive('tcTags', function () {
      return {
        restrict: 'E',
        scope: {
          tags: '=tags'
        },
        templateUrl: 'views/tc-tags.html'
      };
    })
    .directive('tcElementInfo', function ($window) {

      var cut = function (info) {
        var name = info.name;
        var previousOffset = 0;

        var items = [];

        info.arguments.forEach(function (arg) {
          // Ajouter le contenu avant l'argument
          var before = name.substring(previousOffset, arg.offset);
          if (before.length > 0) {
            items.push({ type: 'text', value: before });
          }

          // Extraire la valeur de l'argument
          items.push({ type: 'arg', value: arg.value });

          previousOffset = arg.offset + arg.value.length;
        });

        // Ajouter le contenu restant
        var remaining = name.substring(previousOffset);
        if (remaining.length > 0) {
          items.push({ type: 'text', value: remaining });
        }

        return items;
      };

      var link = function (scope, element) {

        scope.$watch('info', function (info) {
          element.empty();

          // Keyword
          var keywordElem = angular.element('<b></b>');
          keywordElem.text(info.keyword);<commit_msg>Error when reading null arguments<commit_after>'use strict';

(function (angular) {

  angular.module('testsCucumberApp')
    .directive('tcStatus', function () {
      return {
        restrict: 'E',
        scope: {
          status: '=status'
        },
        templateUrl: 'views/tc-status.html'
      };
    })
    .directive('tcTestRunStatus', function () {
      return {
        restrict: 'E',
        scope: {
          status: '=status'
        },
        templateUrl: 'views/tc-test-run-status.html'
      };
    })
    .directive('tcTags', function () {
      return {
        restrict: 'E',
        scope: {
          tags: '=tags'
        },
        templateUrl: 'views/tc-tags.html'
      };
    })
    .directive('tcElementInfo', function ($window) {

      var cut = function (info) {
        var name = info.name;
        var previousOffset = 0;

        var items = [];

        info.arguments.forEach(function (arg) {
          // Ignorer les arguments non définis
          if (arg.value === null) {
            return;
          }

          // Ajouter le contenu avant l'argument
          var before = name.substring(previousOffset, arg.offset);
          if (before.length > 0) {
            items.push({ type: 'text', value: before });
          }

          // Extraire la valeur de l'argument
          items.push({ type: 'arg', value: arg.value });

          previousOffset = arg.offset + arg.value.length;
        });

        // Ajouter le contenu restant
        var remaining = name.substring(previousOffset);
        if (remaining.length > 0) {
          items.push({ type: 'text', value: remaining });
        }

        return items;
      };

      var link = function (scope, element) {

        scope.$watch('info', function (info) {
          element.empty();

          // Keyword
          var keywordElem = angular.element('<b></b>');
          keywordElem.text(info.keyword);
{'fraction_non_alphanumeric': 0.13950350782514842, 'fraction_numerical': 0.0016189962223421479, 'mean_word_length': 1.7097953216374269, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, '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': '6015560', 'n_tokens_mistral': 1069, 'n_tokens_neox': 1041, 'n_words': 238}