<commit_before>module Core {
    export function MBeansController($scope, $location, workspace:Workspace) {
      $scope.workspace = workspace;
      $scope.tree = new Folder('MBeans');
      $scope.counter = 0;

      $scope.$on("$routeChangeSuccess", function (event, current, previous) {
        // lets do this asynchronously to avoid Error: $digest already in progress
        setTimeout(updateSelectionFromURL, 50);
      });

      // we could use $scope.$on and $rootScope.$broadCast here but it seems watching
      // an expression may be a little more efficient and use less event broadcasting around controllers
      $scope.$watch('workspace.operationCounter', function () {
        $scope.counter += 1;
        loadTree();
        //setTimeout(loadTree, 1);
      });

      $scope.select = (node : DynaTreeNode) => {
        $scope.workspace.updateSelectionNode(node);
        $scope.$apply();
      };

      function updateSelectionFromURL() {
        var key = $location.search()['nid'];
        if (key) {
          var node = $("#jmxtree").dynatree("getTree").activateKey(key);
          if (node) {
            node.expand(true);
          }
        }
      }

      function populateTree(response) {
        var rootId = 'root';
        var separator = '_';
        var tree = new Folder('MBeans');
        tree.key = rootId;<commit_msg>avoid exception we sometimes get<commit_after>module Core {
    export function MBeansController($scope, $location, workspace:Workspace) {
      $scope.workspace = workspace;
      $scope.tree = new Folder('MBeans');
      $scope.counter = 0;

      $scope.$on("$routeChangeSuccess", function (event, current, previous) {
        // lets do this asynchronously to avoid Error: $digest already in progress
        setTimeout(updateSelectionFromURL, 50);
      });

      // we could use $scope.$on and $rootScope.$broadCast here but it seems watching
      // an expression may be a little more efficient and use less event broadcasting around controllers
      $scope.$watch('workspace.operationCounter', function () {
        $scope.counter += 1;
        loadTree();
        //setTimeout(loadTree, 1);
      });

      $scope.select = (node : DynaTreeNode) => {
        $scope.workspace.updateSelectionNode(node);
        $scope.$apply();
      };

      function updateSelectionFromURL() {
        var key = $location.search()['nid'];
        if (key) {
          var dtree = $("#jmxtree").dynatree("getTree");
          if (dtree) {
            var node = dtree.activateKey(key);
            if (node) {
              node.expand(true);
            }
          }
        }
      }

      function populateTree(response) {
        var rootId = 'root';
        var separator = '_';
        var tree = new Folder('MBeans');
        tree.key = rootId;
{'fraction_non_alphanumeric': 0.12673549305802778, 'fraction_numerical': 0.00355998576005696, 'mean_word_length': 2.294255568581477, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4145853', 'n_tokens_mistral': 788, 'n_tokens_neox': 755, 'n_words': 200}