<commit_before>'use strict';

//Start by defining the main module and adding the module dependencies
angular.module(ApplicationConfiguration.applicationModuleName, ApplicationConfiguration.applicationModuleVendorDependencies);

// Setting HTML5 Location Mode
angular.module(ApplicationConfiguration.applicationModuleName).config(['$locationProvider', '$httpProvider',
  function ($locationProvider, $httpProvider) {
    $locationProvider.html5Mode(true).hashPrefix('!');

    $httpProvider.interceptors.push('authInterceptor');
  }
]);

angular.module(ApplicationConfiguration.applicationModuleName)
  .run(function ($rootScope, $mdSidenav, $state, $timeout) {
    $rootScope.navigateTo = function(to, event) {
      if (typeof to === 'object' && to.state && to.param) {
        $state.transitionTo(to.state, to.param);
      } else if (typeof to === 'string') {
        if ($mdSidenav('left').isOpen())
          $mdSidenav('left').toggle();
        if (to && to[0] === '/') {
          window.target = '_self';
          window.location = to;
        } else if (to && to !== '')
          $state.go(to);
      }
    };
  });

angular.module(ApplicationConfiguration.applicationModuleName).run(function ($rootScope, $state, Authentication) {<commit_msg>add comments for the function navigateTo<commit_after>'use strict';

//Start by defining the main module and adding the module dependencies
angular.module(ApplicationConfiguration.applicationModuleName, ApplicationConfiguration.applicationModuleVendorDependencies);

// Setting HTML5 Location Mode
angular.module(ApplicationConfiguration.applicationModuleName).config(['$locationProvider', '$httpProvider',
  function ($locationProvider, $httpProvider) {
    $locationProvider.html5Mode(true).hashPrefix('!');

    $httpProvider.interceptors.push('authInterceptor');
  }
]);

// global navigate function
angular.module(ApplicationConfiguration.applicationModuleName)
  .run(function ($rootScope, $mdSidenav, $state, $timeout) {
    $rootScope.navigateTo = function(to, event) {
      if (typeof to === 'object' && to.state && to.param) { // state parameters treatment
        $state.transitionTo(to.state, to.param);
      } else if (typeof to === 'string') {
        if ($mdSidenav('left').isOpen()) {// hide sidebar if open
          $mdSidenav('left').toggle();
        }
        
        if (to && to[0] === '/') { // signout treatment
          window.target = '_self';
          window.location = to;
        } else if (to && to !== '') {
          $state.go(to);
        }
      }
    };
  });

angular.module(ApplicationConfiguration.applicationModuleName).run(function ($rootScope, $state, Authentication) {
{'fraction_non_alphanumeric': 0.14606741573033707, 'fraction_numerical': 0.0022471910112359553, 'mean_word_length': 3.874087591240876, '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': '2952519', 'n_tokens_mistral': 722, 'n_tokens_neox': 714, 'n_words': 151}