<commit_before>angular.module('loginService', ['ui.router'])
  .provider('loginService', function () {
    var userToken = localStorage.getItem('userToken'),
      errorState = 'app.error',
      logoutState = 'app.logout',
      loginState = 'app.home';

    this.$get = function ($rootScope, $http, $q, $state, $log, $auth) {

      /**
       * Low-level, private functions.
       */
      var setTokens = function () {
        if (!wrappedService.F5_ST && !wrappedService.LastMRH_Session && !wrappedService.MRHSession && !wrappedService.SAML && !wrappedService.JSESSIONID) {
          localStorage.removeItem('F5_ST');
          localStorage.removeItem('LastMRH_Session');
          localStorage.removeItem('MRHSession');
          localStorage.removeItem('SAML');
          localStorage.removeItem('JSESSIONID');

          delete $http.defaults.headers.common['F5_ST'];
          delete $http.defaults.headers.common['LastMRH_Session'];
          delete $http.defaults.headers.common['MRHSession'];
          delete $http.defaults.headers.common['SAML'];
          delete $http.defaults.headers.common['JSESSIONID'];

          wrappedService.inLocalStorage = false;
        } else {
          localStorage.setItem('F5_ST', wrappedService.F5_ST);
          localStorage.setItem('LastMRH_Session', wrappedService.LastMRH_Session);
          localStorage.setItem('MRHSession', wrappedService.MRHSession);
          localStorage.setItem('SAML', wrappedService.SAML);
          localStorage.setItem('JSESSIONID', wrappedService.JSESSIONID);

          $http.defaults.headers.common['F5_ST'] = wrappedService.F5_ST;
          $http.defaults.headers.common['LastMRH_Session'] = wrappedService.LastMRH_Session;
          $http.defaults.headers.common['MRHSession'] = wrappedService.MRHSession;
          $http.defaults.headers.common['SAML'] = wrappedService.SAML;
          $http.defaults.headers.common['JSESSIONID'] = wrappedService.JSESSIONID;

          wrappedService.inLocalStorage = true;
        }

        return true;
      };

      var getTokens = function () {

        wrappedService.F5_ST = localStorage.getItem('F5_ST');
        wrappedService.LastMRH_Session = localStorage.getItem('LastMRH_Session');
        wrappedService.MRHSession = localStorage.getItem('MRHSession');
        wrappedService.SAML = localStorage.getItem('SAML');
        wrappedService.JSESSIONID = localStorage.getItem('JSESSIONID');

        $http.defaults.headers.common['F5_ST'] = wrappedService.F5_ST;
        $http.defaults.headers.common['LastMRH_Session'] = wrappedService.LastMRH_Session;
        $http.defaults.headers.common['MRHSession'] = wrappedService.MRHSession;
        $http.defaults.headers.common['SAML'] = wrappedService.SAML;
        $http.defaults.headers.common['JSESSIONID'] = wrappedService.JSESSIONID;

        if (!wrappedService.F5_ST && !wrappedService.LastMRH_Session && !wrappedService.MRHSession && !wrappedService.SAML && !wrappedService.JSESSIONID) {
          return false;
        }
        else {
          return true;
        }
      };

      var getLoginData = function () {

        wrappedService.userRole = userRoles.public;
        wrappedService.isLogged = false;
        wrappedService.doneLoading = true;

        if (!getTokens()) {
          wrappedService.inLocalStorage = false;
        }
        else {
          wrappedService.inLocalStorage = true;
        }
      };

      var managePermissions = function () {
        // Register routing function.
        $rootScope.$on('$stateChangeStart', function (event, to, toParams, from, fromParams) {<commit_msg>change headers _ to -<commit_after>angular.module('loginService', ['ui.router'])
  .provider('loginService', function () {
    var userToken = localStorage.getItem('userToken'),
      errorState = 'app.error',
      logoutState = 'app.logout',
      loginState = 'app.home';

    this.$get = function ($rootScope, $http, $q, $state, $log, $auth) {

      /**
       * Low-level, private functions.
       */
      var setTokens = function () {
        if (!wrappedService.F5_ST && !wrappedService.LastMRH_Session && !wrappedService.MRHSession && !wrappedService.SAML && !wrappedService.JSESSIONID) {
          localStorage.removeItem('F5_ST');
          localStorage.removeItem('LastMRH_Session');
          localStorage.removeItem('MRHSession');
          localStorage.removeItem('SAML');
          localStorage.removeItem('JSESSIONID');

          delete $http.defaults.headers.common['F5-ST'];
          delete $http.defaults.headers.common['LastMRH_Session'];
          delete $http.defaults.headers.common['MRHSession'];
          delete $http.defaults.headers.common['SAML'];
          delete $http.defaults.headers.common['JSESSIONID'];

          wrappedService.inLocalStorage = false;
        } else {
          localStorage.setItem('F5_ST', wrappedService.F5_ST);
          localStorage.setItem('LastMRH_Session', wrappedService.LastMRH_Session);
          localStorage.setItem('MRHSession', wrappedService.MRHSession);
          localStorage.setItem('SAML', wrappedService.SAML);
          localStorage.setItem('JSESSIONID', wrappedService.JSESSIONID);

          $http.defaults.headers.common['F5-ST'] = wrappedService.F5_ST;
          $http.defaults.headers.common['LastMRH-Session'] = wrappedService.LastMRH_Session;
          $http.defaults.headers.common['MRHSession'] = wrappedService.MRHSession;
          $http.defaults.headers.common['SAML'] = wrappedService.SAML;
          $http.defaults.headers.common['JSESSIONID'] = wrappedService.JSESSIONID;

          wrappedService.inLocalStorage = true;
        }

        return true;
      };

      var getTokens = function () {

        wrappedService.F5_ST = localStorage.getItem('F5_ST');
        wrappedService.LastMRH_Session = localStorage.getItem('LastMRH_Session');
        wrappedService.MRHSession = localStorage.getItem('MRHSession');
        wrappedService.SAML = localStorage.getItem('SAML');
        wrappedService.JSESSIONID = localStorage.getItem('JSESSIONID');

        $http.defaults.headers.common['F5-ST'] = wrappedService.F5_ST;
        $http.defaults.headers.common['LastMRH-Session'] = wrappedService.LastMRH_Session;
        $http.defaults.headers.common['MRHSession'] = wrappedService.MRHSession;
        $http.defaults.headers.common['SAML'] = wrappedService.SAML;
        $http.defaults.headers.common['JSESSIONID'] = wrappedService.JSESSIONID;

        if (!wrappedService.F5_ST && !wrappedService.LastMRH_Session && !wrappedService.MRHSession && !wrappedService.SAML && !wrappedService.JSESSIONID) {
          return false;
        }
        else {
          return true;
        }
      };

      var getLoginData = function () {

        wrappedService.userRole = userRoles.public;
        wrappedService.isLogged = false;
        wrappedService.doneLoading = true;

        if (!getTokens()) {
          wrappedService.inLocalStorage = false;
        }
        else {
          wrappedService.inLocalStorage = true;
        }
      };

      var managePermissions = function () {
        // Register routing function.
        $rootScope.$on('$stateChangeStart', function (event, to, toParams, from, fromParams) {
{'fraction_non_alphanumeric': 0.12756516916250693, 'fraction_numerical': 0.0033277870216306157, 'mean_word_length': 2.974104683195592, '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': '4096606', 'n_tokens_mistral': 2077, 'n_tokens_neox': 2064, 'n_words': 279}