<commit_before>module Core {

  export function PreferencesController($scope, localStorage) {

    $scope.updateRate = localStorage['updateRate'];
    $scope.url = localStorage['url'];
    $scope.autoRefresh = localStorage['autoRefresh'] === "true";

    console.log("AutoRefresh", $scope.autoRefresh);

    $scope.$watch('updateRate', () => {
      localStorage['updateRate'] = $scope.updateRate;
      $scope.$emit('UpdateRate', $scope.updateRate);
    });

    $scope.$watch('autoRefresh', (newValue, oldValue) => {
      if (newValue === oldValue) {
        return;
      }
      localStorage['autoRefresh'] = $scope.autoRefresh;
      console.log("AutoRefresh", $scope.autoRefresh);
    });

    var names = ["gitUserName", "gitUserEmail", "activemqUserName", "activemqPassword"];
    angular.forEach(names, (name) => {
      $scope[name] =  localStorage[name] || "";
      $scope.$watch(name, () => {
        var value = $scope[name];
        if (value) {
          localStorage[name] = value;
        }
      });
    });

    $scope.gotoServer = (url) => {
      console.log("going to server: " + url);
      window.open("#/help/overview/?url=" + encodeURIComponent(url));
    }
  }
}<commit_msg>revert previous fix - it didn't really help - pilot error :)<commit_after>module Core {

  export function PreferencesController($scope, localStorage) {

    $scope.updateRate = localStorage['updateRate'];
    $scope.url = localStorage['url'];
    $scope.autoRefresh = localStorage['autoRefresh'] === "true";

    console.log("AutoRefresh", $scope.autoRefresh);

    $scope.$watch('updateRate', () => {
      localStorage['updateRate'] = $scope.updateRate;
      $scope.$emit('UpdateRate', $scope.updateRate);
    });

    $scope.$watch('autoRefresh', (newValue, oldValue) => {
      if (newValue === oldValue) {
        return;
      }
      localStorage['autoRefresh'] = $scope.autoRefresh;
      console.log("AutoRefresh", $scope.autoRefresh);
    });

    var names = ["gitUserName", "gitUserEmail", "activemqUserName", "activemqPassword"];
    angular.forEach(names, (name) => {
      $scope[name] =  localStorage[name] || "";
      $scope.$watch(name, () => {
        var value = $scope[name];
        if (value) {
          localStorage[name] = value;
        }
      });
    });

    $scope.gotoServer = (url) => {
      console.log("going to server: " + url);
      window.open("?url=" + encodeURIComponent(url));
    }
  }
}
{'fraction_non_alphanumeric': 0.18013951579811244, 'fraction_numerical': 0.0, 'mean_word_length': 3.111298482293423, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '5446577', 'n_tokens_mistral': 745, 'n_tokens_neox': 730, 'n_words': 123}