<commit_before>'use strict';

(function() {
  var app = angular.module('portal.main.controllers', []);

  app.controller('MainController', [ '$http', 'miscService', function($http, miscService) {

    miscService.pushPageview();
    
    var store = this;
    store.data = [];
    $http.get('/portal/api/layoutDoc?tab=UW Bucky Home').then(
      function(result) {
        store.data = result.data;
      } ,
      function(reason){
       miscService.redirectUser(reason.status, 'layoutDoc call');
      }
    );
    this.directToPortlet = function directToPortlet(url) {
      $location.path(url);
    }
    this.removePortlet = function removePortletFunction(nodeId) {
        $.ajax({
                url: "/portal/api/layout?action=removeElement&elementID=" + nodeId,
                type: "POST",
                data: null,
                dataType: "json",
                async: true,
                success: function (request, text){
                  $('#portlet-id-'+ nodeId).parent().fadeOut();
                  $('#portlet-id-'+ nodeId).parent().remove();
                },
                error: function(request, text, error) {

                }
            });
      };


  } ]);

  /* Username */

  app.controller('SessionCheckController', [ 'mainService', function(mainService) {
    var that = this;
    that.user = [];
    mainService.getUser().then(function(result){
      that.user = result.data.person;
    });
  }]);

  /* Search */

  app.controller('SearchController', [ '$scope', '$location', 'marketplaceService', function($scope, $location, marketplaceService) {
      $scope.submit = function(){
        marketplaceService.initialFilter($scope.initialFilter);
        $location.path("/marketplace");
        $scope.initialFilter = "";
      };
    } ]);

  app.controller('HeaderController', [ '$scope', function($scope) {
    $scope.showSearch = false;
    $scope.test = "hi myuw";
  }]);



})();<commit_msg>remove example test code<commit_after>'use strict';

(function() {
  var app = angular.module('portal.main.controllers', []);

  app.controller('MainController', [ '$http', 'miscService', function($http, miscService) {

    miscService.pushPageview();

    var store = this;
    store.data = [];
    $http.get('/portal/api/layoutDoc?tab=UW Bucky Home').then(
      function(result) {
        store.data = result.data;
      } ,
      function(reason){
       miscService.redirectUser(reason.status, 'layoutDoc call');
      }
    );
    this.directToPortlet = function directToPortlet(url) {
      $location.path(url);
    }
    this.removePortlet = function removePortletFunction(nodeId) {
        $.ajax({
                url: "/portal/api/layout?action=removeElement&elementID=" + nodeId,
                type: "POST",
                data: null,
                dataType: "json",
                async: true,
                success: function (request, text){
                  $('#portlet-id-'+ nodeId).parent().fadeOut();
                  $('#portlet-id-'+ nodeId).parent().remove();
                },
                error: function(request, text, error) {

                }
            });
      };


  } ]);

  /* Username */

  app.controller('SessionCheckController', [ 'mainService', function(mainService) {
    var that = this;
    that.user = [];
    mainService.getUser().then(function(result){
      that.user = result.data.person;
    });
  }]);

  /* Search */

  app.controller('SearchController', [ '$scope', '$location', 'marketplaceService', function($scope, $location, marketplaceService) {
      $scope.submit = function(){
        marketplaceService.initialFilter($scope.initialFilter);
        $location.path("/marketplace");
        $scope.initialFilter = "";
      };
    } ]);

  app.controller('HeaderController', [ '$scope', function($scope) {
    $scope.showSearch = false;
  }]);



})();
{'fraction_non_alphanumeric': 0.1648578811369509, 'fraction_numerical': 0.0, 'mean_word_length': 2.3399482312338225, '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': '5899782', 'n_tokens_mistral': 1137, 'n_tokens_neox': 1085, 'n_words': 178}