<commit_before>'use strict';

angular.module('qldarchApp').controller('ArchitectsCtrl',
    function($scope, $http, architects, Uris, GraphHelper, LayoutHelper, $stateParams, $location, $filter, $state) {
      var DEFAULT_ARCHITECT_ROW_COUNT = 5;
      $scope.architectRowDisplayCount = DEFAULT_ARCHITECT_ROW_COUNT;
      $scope.$stateParams = $stateParams;
      $scope.indexes = {
        'A' : false,
        'B' : false,
        'C' : false,
        'D' : false,
        'E' : false,
        'F' : false,
        'G' : false,
        'H' : false,
        'I' : false,
        'J' : false,
        'K' : false,
        'L' : false,
        'M' : false,
        'N' : false,
        'O' : false,
        'P' : false,
        'Q' : false,
        'R' : false,
        'S' : false,
        'T' : false,
        'U' : false,
        'V' : false,
        'W' : false,
        'X' : false,
        'Y' : false,
        'Z' : false
      };

      function isLetter(char) {
        return char.match(/[a-z]/i);
      }

      architects = $filter('filter')(architects, function(architect) {
        $scope.indexes[architect.label.substring(0, 1).toUpperCase()] = true;
        if ($stateParams.index && $stateParams.index.length === 1) {
          if (isLetter($stateParams.index) && architect.label.substring(0, 1).toUpperCase() === $stateParams.index) {
            return true;
          }
          return false;
        }
        return true;
      });

      architects = $filter('orderBy')(architects, function(architect) {
        return (architect.label || '');
      });

      $scope.architectRows = LayoutHelper.group(GraphHelper.graphValues(architects), 6);
      $scope.Uris = Uris;

      $scope.goToIndex = function(index) {
        $state.go('architects.queensland', {<commit_msg>modified sorting architects based on their lastname<commit_after>'use strict';

angular.module('qldarchApp').controller('ArchitectsCtrl',
    function($scope, $http, architects, Uris, GraphHelper, LayoutHelper, $stateParams, $location, $filter, $state) {
      var DEFAULT_ARCHITECT_ROW_COUNT = 5;
      $scope.architectRowDisplayCount = DEFAULT_ARCHITECT_ROW_COUNT;
      $scope.$stateParams = $stateParams;
      $scope.indexes = {
        'A' : false,
        'B' : false,
        'C' : false,
        'D' : false,
        'E' : false,
        'F' : false,
        'G' : false,
        'H' : false,
        'I' : false,
        'J' : false,
        'K' : false,
        'L' : false,
        'M' : false,
        'N' : false,
        'O' : false,
        'P' : false,
        'Q' : false,
        'R' : false,
        'S' : false,
        'T' : false,
        'U' : false,
        'V' : false,
        'W' : false,
        'X' : false,
        'Y' : false,
        'Z' : false
      };

      function isLetter(char) {
        return char.match(/[a-z]/i);
      }

      architects = $filter('filter')(architects, function(architect) {
        $scope.indexes[architect.lastname.substring(0, 1).toUpperCase()] = true;
        if ($stateParams.index && $stateParams.index.length === 1) {
          if (isLetter($stateParams.index) && architect.lastname.substring(0, 1).toUpperCase() === $stateParams.index) {
            return true;
          }
          return false;
        }
        return true;
      });

      architects = $filter('orderBy')(architects, function(architect) {
        return (architect.lastname || '');
      });

      $scope.architectRows = LayoutHelper.group(GraphHelper.graphValues(architects), 6);
      $scope.Uris = Uris;

      $scope.goToIndex = function(index) {
        $state.go('architects.queensland', {
{'fraction_non_alphanumeric': 0.1579092159559835, 'fraction_numerical': 0.0038514442916093533, 'mean_word_length': 2.0325271059216012, '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': '6426662', 'n_tokens_mistral': 1209, 'n_tokens_neox': 1186, 'n_words': 228}