<commit_before>angular.module('myApp', [], function ($locationProvider) {
   //enable html5 mode
   $locationProvider.html5Mode(true);
   console.log("INIT the location Provider")
});

function DiffCtrl($scope, $http, $routeParams, $location) {

   $scope.diff = function () {
      console.log("diff()");
      if (!$scope.v1 || !$scope.v2) {
         alert("Both versions must be set");
         return;
      }
      $("body").css("cursor", "wait");
      $http.get(location.pathname + "vdiff/compare/" + $scope.orgName + "/" + $scope.projectName + "/" + $scope.v1 + "/" + $scope.v2)
         .success(function (data, status, headers, config) {
            $scope.added = sortObject(data.added);
            $scope.dropped = sortObject(data.dropped);
            $scope.changed = data.changed;
            $scope.unchanged = sortObject(data.unChanged);

            $scope.addedCount = Object.keys(data.added).length;
            $scope.droppedCount = Object.keys(data.dropped).length
            $scope.unchangedCount = Object.keys(data.unChanged).length

            $("body").css("cursor", "default");
         })
         .error(function (data, status, headers, config) {
            console.log("Status: " + status);
            $("body").css("cursor", "default")
         });

   };

   $scope.init = function () {

      var params = $location.hash().split('/');

      // set defaults
      $scope.orgName = 'apache';
      $scope.projectName = 'camel';

      switch (params.length) {
         case 4:
            $scope.orgName = params[0];
            $scope.projectName = params[1];
            $scope.v1 = params[2];<commit_msg>degub<commit_after>angular.module('myApp', [], function ($locationProvider) {
   //enable html5 mode
   $locationProvider.html5Mode(true);
   console.log("INIT the location Provider")
});

function DiffCtrl($scope, $http, $routeParams, $location) {

   $scope.diff = function () {
      console.log("diff()");
      if (!$scope.v1 || !$scope.v2) {
         alert("Both versions must be set");
         return;
      }
      $("body").css("cursor", "wait");
      $http.get(location.pathname + "vdiff/compare/" + $scope.orgName + "/" + $scope.projectName + "/" + $scope.v1 + "/" + $scope.v2)
         .success(function (data, status, headers, config) {
            $scope.added = sortObject(data.added);
            $scope.dropped = sortObject(data.dropped);
            $scope.changed = data.changed;
            $scope.unchanged = sortObject(data.unChanged);

            $scope.addedCount = Object.keys(data.added).length;
            $scope.droppedCount = Object.keys(data.dropped).length
            $scope.unchangedCount = Object.keys(data.unChanged).length

            $("body").css("cursor", "default");
         })
         .error(function (data, status, headers, config) {
            console.log("Status: " + status);
            $("body").css("cursor", "default")
         });

   };

   $scope.init = function () {

      console.log('init()');

      var params = $location.hash().split('/');

      console.log('Params: ' + params);
      // set defaults
      $scope.orgName = 'apache';
      $scope.projectName = 'camel';

      switch (params.length) {
         case 4:
            $scope.orgName = params[0];
            $scope.projectName = params[1];
            $scope.v1 = params[2];
{'fraction_non_alphanumeric': 0.17432835820895523, 'fraction_numerical': 0.006567164179104477, 'mean_word_length': 2.307996051332675, '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': '331515', 'n_tokens_mistral': 1014, 'n_tokens_neox': 992, 'n_words': 176}