<commit_before>Template[getTemplate('postInfo')].helpers({
  pointsUnitDisplayText: function(){
    return this.upvotes == 1 ? i18n.t('point') : i18n.t('points');
  },
  getTemplate: function() {
    return getTemplate("postAuthor");
  },
  hasVote: function () {
  	return this.poll && this.poll.voteCount > 1;
  },
  friendsVotes: function () {
    var user = Meteor.user();
    var friendsVotesCount = _.intersection(user.services.facebook.friendsIds, this.facebookVoters).length
    if (friendsVotesCount <= 2) {
      return;
    }
  	return friendsVotesCount - 2; 
  },
  friendsNames: function(data) {
    var user = Meteor.user();
    if (!user || _.isUndefined(user.services)) {
      return false;
    }
    if (!user.services.facebook || !user.services.facebook.friendsIds || !this.facebookVoters) {
      return false;
    }

    var friendsIds = _.intersection(user.services.facebook.friendsIds, this.facebookVoters),
        upvoters = data.upvoters,
        friendsNames = user.friendsWonders,
        friendsNamesLength = user.friendsWonders.length,
        friendsFacebookNames = [];

    for (var i=0; i<friendsNamesLength; i++) {
      if(_.indexOf(upvoters, friendsNames[i].friendId)) {
        var friendName = _.first(friendsNames[i].friendName.split(" "), 1);
        friendsFacebookNames.push({friendName:friendName, friendId: friendsNames[i].friendId});
      }
      if (friendsFacebookNames.length > 2) {
        break;
      }
    }
    // need more work on this
    return _.first(friendsFacebookNames, 2);
  },
  friends: function (data) {
    if (data > 1) {
      return "friends";
    }
    return "friend";
  }
});<commit_msg>fix show friends name in question info issue<commit_after>Template[getTemplate('postInfo')].helpers({
  pointsUnitDisplayText: function(){
    return this.upvotes == 1 ? i18n.t('point') : i18n.t('points');
  },
  getTemplate: function() {
    return getTemplate("postAuthor");
  },
  hasVote: function () {
  	return this.poll && this.poll.voteCount > 1;
  },
  friendsVotes: function () {
    var user = Meteor.user();
    var friendsVotesCount = _.intersection(user.services.facebook.friendsIds, this.facebookVoters).length
    if (friendsVotesCount <= 2) {
      return;
    }
  	return friendsVotesCount - 2; 
  },
  friendsNames: function(data) {
    var user = Meteor.user();
    if (!user || _.isUndefined(user.services)) {
      return false;
    }
    if (!user.services.facebook || !user.services.facebook.friendsIds || !this.facebookVoters) {
      return false;
    }

    var friendsIds = _.intersection(user.services.facebook.friendsIds, this.facebookVoters),
        upvoters = data.upvoters,
        friendsNames = user.friendsWonders,
        friendsNamesLength = user.friendsWonders.length,
        friendsFacebookNames = [];

    for (var i=0; i<friendsNamesLength; i++) {
      if(_.indexOf(upvoters, friendsNames[i].friendId) > -1) {
        var friendName = _.first(friendsNames[i].friendName.split(" "), 1);
        friendsFacebookNames.push({friendName:friendName, friendId: friendsNames[i].friendId});
      }
      if (friendsFacebookNames.length > 5) {
        break;
      }
    }
    // need more work on this
    return _.sample(friendsFacebookNames, 2);
  },
  friends: function (data) {
    if (data > 1) {
      return "friends";
    }
    return "friend";
  }
});
{'fraction_non_alphanumeric': 0.13941018766756033, 'fraction_numerical': 0.00804289544235925, 'mean_word_length': 3.090133982947625, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6632128', 'n_tokens_mistral': 1104, 'n_tokens_neox': 1045, 'n_words': 202}