<commit_before>/// <reference path='../../interfaces/ui-polymer.d.ts' />

Polymer({
  model: model,
  loadingContacts: false,
  searchQuery: '',
  onlineTrustedUproxyContacts: [],
  offlineTrustedUproxyContacts: [],
  onlinePending: [],
  offlinePending: [],
  onlineUntrustedUproxyContacts: [],
  offlineUntrustedUproxyContacts: [],
  ready: function() {
    console.log('initializing roster');

    this.ui = ui;
    this.UI = UI;

    // Initialize roster here.
    // this.contacts contains either all the contact groups for the get tab
    // or all the contact groups for the share tab.
    this.onlinePending = this.contacts.onlinePending;
    this.offlinePending = this.contacts.offlinePending;
    this.onlineTrustedUproxyContacts = this.contacts.onlineTrustedUproxy;
    this.offlineTrustedUproxyContacts = this.contacts.offlineTrustedUproxy;
    this.onlineUntrustedUproxyContacts = this.contacts.onlineUntrustedUproxy;
    this.offlineUntrustedUproxyContacts = this.contacts.offlineUntrustedUproxy;
  },
  loadContacts: function() {
    this.loadingContacts = true;
    // The loading contacts page will be shown for at least 1.5 seconds. In this
    // time, if contacts load, we will transition directly to the roster.
    // If no contacts have loaded, show the animation for a total of 5 seconds,
    // and then the "No Contacts Found" message will be displayed.
    setTimeout(function(){
      var numberOfContacts = this.onlinePending.length +
                   this.offlinePending.length +
                   this.onlineTrustedUproxyContacts.length +
                   this.offlineTrustedUproxyContacts.length +
                   this.onlineUntrustedUproxyContacts.length +
                   this.offlineUntrustedUproxyContacts.length;
      if (numberOfContacts == 0) {
        setTimeout(function(){ this.loadingContacts = false; }.bind(this), 5000);
      } else {
        this.loadingContacts = false;
      }<commit_msg>update comment<commit_after>/// <reference path='../../interfaces/ui-polymer.d.ts' />

Polymer({
  model: model,
  loadingContacts: false,
  searchQuery: '',
  onlineTrustedUproxyContacts: [],
  offlineTrustedUproxyContacts: [],
  onlinePending: [],
  offlinePending: [],
  onlineUntrustedUproxyContacts: [],
  offlineUntrustedUproxyContacts: [],
  ready: function() {
    console.log('initializing roster');

    this.ui = ui;
    this.UI = UI;

    // Initialize roster here.
    // this.contacts contains either all the contact groups for the get tab
    // or all the contact groups for the share tab.
    this.onlinePending = this.contacts.onlinePending;
    this.offlinePending = this.contacts.offlinePending;
    this.onlineTrustedUproxyContacts = this.contacts.onlineTrustedUproxy;
    this.offlineTrustedUproxyContacts = this.contacts.offlineTrustedUproxy;
    this.onlineUntrustedUproxyContacts = this.contacts.onlineUntrustedUproxy;
    this.offlineUntrustedUproxyContacts = this.contacts.offlineUntrustedUproxy;
  },
  loadContacts: function() {
    this.loadingContacts = true;
    // Show the loading contacts page for at least 1.5 seconds. In this
    // time, if contacts load, transition directly to the roster.
    // If no contacts have loaded, show the animation for a total of 5 seconds,
    // and then display the "no online friends" message.
    setTimeout(function(){
      var numberOfContacts = this.onlinePending.length +
                   this.offlinePending.length +
                   this.onlineTrustedUproxyContacts.length +
                   this.offlineTrustedUproxyContacts.length +
                   this.onlineUntrustedUproxyContacts.length +
                   this.offlineUntrustedUproxyContacts.length;
      if (numberOfContacts == 0) {
        setTimeout(function(){ this.loadingContacts = false; }.bind(this), 5000);
      } else {
        this.loadingContacts = false;
      }
{'fraction_non_alphanumeric': 0.09602478058853897, 'fraction_numerical': 0.004130098089829634, 'mean_word_length': 3.0875527426160336, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4717536', 'n_tokens_mistral': 1135, 'n_tokens_neox': 1117, 'n_words': 257}