Return all published messages that have yet to be acked, nacked, or
        returned.

        :return: [(int, Published)]
3675
def pending_confirmations(self):
        
        return sorted([(idx, msg)
                       for idx, msg in enumerate(self.published_messages)
                       if not msg.future.done()],
                      key=lambda x: x[1].delivery_tag)
666866
def get_lasts_messages_of_threads(self, participant_id, check_who_read=True, check_is_notification=True):
        
        # we get the last message for each thread
        # we must query the messages using two queries because only Postgres supports .order_by('thread', '-sent_at').distinct('thread')
        threads = Thread.managers.\
            get_threads_where_participant_is_active(participant_id).\
            annotate(last_message_id=Max('message__id'))
        messages = Message.objects.filter(id__in=[thread.last_message_id for thread in threads]).\
            order_by('-id').\
            distinct().\
            select_related('thread', 'sender')

        if check_who_read is True:
            messages = messages.prefetch_related('thread__participation_set', 'thread__participation_set__participant')
            messages = self.check_who_read(messages)
        else:
            messages = messages.prefetch_related('thread__participants')

        if check_is_notification is True:
            messages = self.check_is_notification(participant_id, messages)
        return messages
827296
private int getUnSeenMessageCount() 
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc,"getUnseenMessageCount");
      
      int remain = 0;
      for (int x = nextIndex; x < messages.length; x++)
      {
         if (messages[x] != null) remain++;
      }
      
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc,"getUnseenMessageCount", ""+remain);
      return remain;
   }
1329122
def get_messages(self, *args, **kwargs):
        
        return self.get_content(self.config['messages'], *args, **kwargs)
572399
def messages(self):
        ''''''

        # The file contains the fixed-size file header followed by
        # fixed-size message structures, followed by minimal message
        # information (subject, from, to).  Start after the file
        # header and then simply return the message structures in
        # sequence until we have returned the number of messages in
        # this folder, ignoring the minimal message information at the
        # end of the file.

        offset = self.header_length # initial offset
        # how much of the data in this file we expect to use, based on
        # the number of messages in this folder and the index message block size
        maxlen = self.header_length + self.total_messages * MacIndexMessage.LENGTH
        while offset < maxlen:
             yield MacIndexMessage(mm=self.mmap, offset=offset)
             offset += MacIndexMessage.LENGTH
150912
def _get_dispatches(filter_kwargs):
    """"""

    dispatches = Dispatch.objects.prefetch_related('message').filter(
        **filter_kwargs
    ).order_by('-message__time_created')

    return list(dispatches)
280336
def unfinished_items(self):
    """"""
    return [(key, stat) for key, stat in self._statuses.items() if stat not in self.DONE_STATES]
658695
def next_message(self):
        
        msg = self._session.next_message()
        if msg:
            return walk(self._from_nvim, msg)
1366928
def repo_status(path)
      messages = []
      messages << EMPTY_MESSAGE if repo_empty?(path)
      messages << UNCOMMITTED_MESSAGE if commit_pending?(path)
      messages << UNTRACKED_MESSAGE if untracked_files?(path)
      messages << UNPUSHED_MESSAGE if repo_unpushed?(path)
      messages.join(JOIN_STRING)
    end
571686
def list_all_before(self, message_id, limit=None):
        
        return self.list_before(message_id, limit=limit).autopage()
1277272
def raw_messages(self):
        ''''''
        if self.data:
            # offset for first message, at end of Mail data file header
            last_offset = 24
            self.skipped_chunks = 0

            for msginfo in self.index.messages:
                msg = self.data.get_message(msginfo.offset, msginfo.size)
                # Index file seems to references messages in order by
                # offset; check for data skipped between messages.
                if msginfo.offset > last_offset:
                    logger.debug('Skipped %d bytes between %s (%s) and %s (%s)',
                           msginfo.offset - last_offset,
                           last_offset, hex(last_offset),
                           msginfo.offset, hex(msginfo.offset))

                    self.skipped_chunks += 1
                last_offset = msginfo.offset + msginfo.size

                yield msg
1155007
def check_issues(issues, after=None):
    """"""
    issues = closed_issues(issues, after) if after else all_issues(issues)
    issues = sorted(issues, key=ISSUES_SORT_KEY)

    have_warnings = False

    for section, issue_group in groupby(issues, key=ISSUES_BY_SECTION):
        for issue in issue_group:
            have_warnings |= check_issue(issue, after)

    return have_warnings
704857
def get_messages(self):
        
        uri = '{}/messages'.format(self.data["uri"])
        return self._helper.do_get(uri)
343795
def gather(self):
        
        if self.state in constants.RECEIVE_STATES:
            raise TypeError("Only new messages can be gathered.")
        if not self._message:
            raise ValueError("Message data already consumed.")
        try:
            raise self._response
        except TypeError:
            pass
        return [self]
268989
def ack(self):
        
        if self.acknowledged:
            raise self.MessageStateError(
                "Message already acknowledged with state: %s" % self._state)
        self.backend.ack(self.delivery_tag)
        self._state = "ACK"
1322255
public PushedNotifications getFailedNotifications() {
		PushedNotifications filteredList = new PushedNotifications(this);
		for (PushedNotification notification : this) {
			if (!notification.isSuccessful()) {
				filteredList.add(notification);
			}
		}
		return filteredList;
	}
619333
def messages(self):
        
        if self._session:
            result = []
            for msg in self._session.messages:
                ex = _create_exception_by_message(msg)
                result.append((type(ex), ex))
            return result
        else:
            return None