<commit_before>
function NetworkCtrl($scope, $http) {
  $scope.entries = [];
  $scope.data = '';
  $scope.startedTime = '';
  $scope.pageTimings = '';
  $scope.pageTimings.section = '';
  $scope.checked = false;
  $scope.tab = '1';
  $scope.selectedEntry;

  $scope.updateHar = function(data) {
    $scope.transfer = 0;
    var entries = data.log.entries;
    data.count = data.log.entries.length;
    delete data.log.entries;
    $.each(entries, function(i, entry) {
      entries[i] = new HAREntry(entry, i, data);
      $scope.transfer += entries[i].getRawContentSize();
    });
    $scope.entries = entries;
    $scope.checked = true;
    $scope.data = data;
    $scope.startedTime = new Date(data.log.pages[0].startedDateTime).getTime();
    $scope.pageTimings = data.log.pages[0].pageTimings;
    $scope.pageTimings.section = $scope.pageTimings.onLoad / 12;
    $scope.transfer = Number.bytesToString($scope.transfer);
    $scope.labels = $scope.setLabels($scope.pageTimings.section);
    console.log($scope);
  }

  $scope.setLabels = function(section) {
    var labels = {};
    for (var i = 12; i > 0; i--) {
      labels[i] = String.sprintf("%0.00fms", section * i);
    };
    return labels;
  }

  $scope.toggleReqHeaders = function() {
    $('.request.parent').toggleClass('expanded');
    $('.request.children').toggleClass('expanded');
  }
<commit_msg>cleanup<commit_after>
function NetworkCtrl($scope, $http) {
  $scope.entries = [];
  $scope.data = '';
  $scope.startedTime = '';
  $scope.pageTimings = '';
  $scope.pageTimings.section = '';
  $scope.checked = false;
  $scope.tab = '1';
  $scope.selectedEntry;

  $scope.updateHar = function(data) {
    $scope.transfer = 0;
    var entries = data.log.entries;
    data.count = data.log.entries.length;
    delete data.log.entries;
    $.each(entries, function(i, entry) {
      entries[i] = new HAREntry(entry, i, data);
      $scope.transfer += entries[i].getRawContentSize();
    });
    $scope.entries = entries;
    $scope.checked = true;
    $scope.data = data;
    $scope.startedTime = new Date(data.log.pages[0].startedDateTime).getTime();
    $scope.pageTimings = data.log.pages[0].pageTimings;
    $scope.pageTimings.section = $scope.pageTimings.onLoad / 12;
    $scope.transfer = Number.bytesToString($scope.transfer);
    $scope.labels = $scope.setLabels($scope.pageTimings.section);
  }

  $scope.setLabels = function(section) {
    var labels = {};
    for (var i = 12; i > 0; i--) {
      labels[i] = String.sprintf("%0.00fms", section * i);
    };
    return labels;
  }

  $scope.toggleReqHeaders = function() {
    $('.request.parent').toggleClass('expanded');
    $('.request.children').toggleClass('expanded');
  }

{'fraction_non_alphanumeric': 0.17869034406215317, 'fraction_numerical': 0.008879023307436182, 'mean_word_length': 3.3542673107890497, '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': '2529765', 'n_tokens_mistral': 931, 'n_tokens_neox': 904, 'n_words': 149}