<commit_before>var findCommunityIds = Promise.method(req => {
  var isAdmin = Admin.isSignedIn(req) || req.session.userId === '21'
  if (req.param('communityId')) {
    return [req.param('communityId')]
  } else if (req.param('type') === 'communities' && req.param('moderated') && isAdmin) {
    return Community.fetchAll()
    .then(cs => Promise.map(cs.models, c => c.id))
  } else {
    return Promise.join(
      Network.activeCommunityIds(req.session.userId),
      Membership.activeCommunityIds(req.session.userId)
    ).then(dupIds => {
      var ids = _(dupIds).flatten().uniq().value()
      if (req.param('moderated')) {
        return Promise.filter(ids, id => Membership.hasModeratorRole(req.session.userId, id))
      } else {
        return ids
      }<commit_msg>remove exception<commit_after>var findCommunityIds = Promise.method(req => {
  if (req.param('communityId')) {
    return [req.param('communityId')]
  } else if (req.param('type') === 'communities' && req.param('moderated') && Admin.isSignedIn(req)) {
    return Community.fetchAll()
    .then(cs => Promise.map(cs.models, c => c.id))
  } else {
    return Promise.join(
      Network.activeCommunityIds(req.session.userId),
      Membership.activeCommunityIds(req.session.userId)
    ).then(dupIds => {
      var ids = _(dupIds).flatten().uniq().value()
      if (req.param('moderated')) {
        return Promise.filter(ids, id => Membership.hasModeratorRole(req.session.userId, id))
      } else {
        return ids
      }
{'fraction_non_alphanumeric': 0.16888297872340424, 'fraction_numerical': 0.0013297872340425532, 'mean_word_length': 3.426470588235294, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '7131265', 'n_tokens_mistral': 492, 'n_tokens_neox': 482, 'n_words': 82}