Obtain a nested message part
180013
JsMsgPart getPart(int accessor, JMFSchema schema) {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "getPart", new Object[]{accessor, schema});
    JsMsgPart result = null;
    try {
      if (jmfPart.isPresent(accessor))
        result = new JsMsgPart(jmfPart.getNativePart(accessor, schema));
    } catch (JMFException e) {
      FFDCFilter.processException(e, "getPart", "208", this);
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "getPart failed: " + e);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "getPart",  result);
    return result;
  }
366873
function _parseMessage() {
    let message = [].slice.call(arguments).join("|");
    try {
        message = (typeof message === "string") ? message : JSON.stringify(message);
    } catch(e) {
        logger.error(e.stack);
    }

    return message;
}
1269142
function GetMessageBody($msgnum, $prefer_html = true)
	{
		if ($prefer_html)
		{
			$body = $this->GetPart($msgnum, "TEXT/HTML");
			$body = $body ? $body : $this->GetPart($msgnum, "TEXT/PLAIN");
		}
		else
		{
			$body = $this->GetPart($msgnum, "TEXT/PLAIN");
			$body = $body ? $body : $this->GetPart($msgnum, "TEXT/HTML");
		}
		
		return $body;
	}
1124196
def parse_message(self, data: bytes) -> SegmentSequence:
        """"""
        if isinstance(data, bytes):
            data = self.explode_segments(data)

        message = SegmentSequence()
        for segment in data:
            seg = self.parse_segment(segment)
            message.segments.append(seg)
        return message
1211862
def _StructMessageToJsonObject(self, message):
    """"""
    fields = message.fields
    ret = {}
    for key in fields:
      ret[key] = self._ValueMessageToJsonObject(fields[key])
    return ret
1149674
def _get(self, msgid):
        """"""
        foldername, msgkey = msgid.split(SEPERATOR)
        folder = self.folder if foldername == "INBOX" else self._getfolder(foldername)
        # Now look up the message
        msg = folder[msgkey]
        msg.is_seen = True
        hdr = list(msg.items())
        for p in msg.walk():
            yield hdr,p
        return
717360
function destructureMessage (msg) {
  const keys = Object.keys(msg)
  var res = ''
  for (var i = 0; i < keys.length; i++) {
    var key = keys[i]
    var val = msg[key]
    if (i !== 0) res += '\n'
    res += chalk.blue('  "' + key + '"')
    res += ': '
    res += chalk.green('"' + val + '"')
  }
  return res
}
907957
def do_rawpart(self, subcmd, opts, message):
        
        client = MdClient(self.maildir, filesystem=self.filesystem)
        partid = getattr(opts, "part", None)
        if not partid:
            client.getrawpart(message, self.stdout)
        else:
            client.getrawpartid(message, partid, self.stdout)
170211
def message(self):
        
        logger.debug("Parsing mail at {} ...".format(self.path))
        with open(self.path, 'rb') as mail_file:
            if PY2:
                message = email.message_from_file(mail_file)
            else:
                message = email.message_from_binary_file(mail_file)
        return message
586708
function extractMessages(nodes, interpolationConfig, implicitTags, implicitAttrs) {
	      var visitor = new _Visitor(implicitTags, implicitAttrs);
	      return visitor.extract(nodes, interpolationConfig);
	  }
1294325
def split_message(message, max_length):
    """"""
    if len(message) > max_length:
        for message in textwrap.wrap(message, max_length):
            yield message
    else:
        yield message.rstrip(STRIPPED_CHARS)
704857
def get_messages(self):
        
        uri = '{}/messages'.format(self.data["uri"])
        return self._helper.do_get(uri)
538558
def split_message(message, max_length):
    """"""
    ms = []
    while len(message) > max_length:
        ms.append(message[:max_length])
        message = message[max_length:]
    ms.append(message)
    return ms
347636
private Map<String, Message> getMessages(Query qry, Folder folder, String[] uids, String[] messageNumbers, int startRow, int maxRow, boolean all) throws MessagingException {

	Message[] messages = folder.getMessages();
	Map<String, Message> map = qry == null ? new HashMap<String, Message>() : null;
	int k = 0;
	if (uids != null || messageNumbers != null) {
	    startRow = 0;
	    maxRow = -1;
	}
	Message message;
	for (int l = startRow; l < messages.length; l++) {
	    if (maxRow != -1 && k == maxRow) {
		break;
	    }
	    message = messages[l];
	    int messageNumber = message.getMessageNumber();
	    String id = getId(folder, message);

	    if (uids == null ? messageNumbers == null || contains(messageNumbers, messageNumber) : contains(uids, id)) {
		k++;
		if (qry != null) {
		    toQuery(qry, message, id, all);
		}
		else map.put(id, message);
	    }
	}
	return map;
    }
114001
def get(self):
        """"""

        # First retrieve all header bytes in order to extract
        # length of the message remainder.
        header = ''
        while len(header) < self.HEADER_LENGTH:
            chunk = self._sock.recv(self.HEADER_LENGTH - len(header))
            chunk = chunk.decode() if self._encode else chunk
            if chunk == '':
                return None
            header += chunk
        length = int(header)

        # Then retrieve the remainder of the message.
        message = ''
        while len(message) < length:
            chunk = self._sock.recv(length - len(message))
            chunk = chunk.decode() if self._encode else chunk
            if chunk == '':
                return None
            message += chunk
        return message
505099
def message(self, message=None):
        
        if message is not None:
            self.response_model.message = message
        return self.response_model.message
1335272
function (message) {
    var objs = [], collector = '', chr, msglen, data;

    this.data += message;
    data = new Buffer(this.data, 'utf8');

    for (var i = 0; i < data.length; i += 1) {
        chr = data[i];
        if (chr > 47 && chr < 58) {
            collector += String.fromCharCode(chr);
        } else if (chr !== 10 && chr !== 13) {
            msglen = parseInt(collector, 10);

            if (msglen + i <= data.length) {
              objs.push(JSON.parse(data.toString('utf8', i, msglen + i)));
              data = data.slice(i + msglen);
              collector = '';
              i = 0;
            } else {
              break;
            }
        }
    }
    this.data = data.toString('utf8');
    return objs;
}