See discussion in issue #840.
332889
def _check_node_parameters(self, **kwargs):
        """"""
        if 'fqdn' in kwargs:
            kwargs['fqdn'].pop('autopopulate', '')
            kwargs['fqdn'].pop('addressFamily', '')
        if 'fqdn' in self.__dict__:
            self.__dict__['fqdn'].pop('autopopulate', '')
            self.__dict__['fqdn'].pop('addressFamily', '')
        if 'state' in kwargs:
            if kwargs['state'] != 'user-up' and kwargs['state'] != \
                    'user-down':
                kwargs.pop('state')
        if 'state' in self.__dict__:
            if self.__dict__['state'] != 'user-up' and self.__dict__['state'] \
                    != 'user-down':
                self.__dict__.pop('state')
        if 'session' in kwargs:
            if kwargs['session'] != 'user-enabled' and kwargs['session'] != \
                    'user-disabled':
                kwargs.pop('session')
        if 'session' in self.__dict__:
            if self.__dict__['session'] != 'user-enabled' and \
                    self.__dict__['session'] != 'user-disabled':
                self.__dict__.pop('session')
        # Until we implement sanity checks for __dict__ this needs to stay here
        self.__dict__.pop('ephemeral', '')
        self.__dict__.pop('address', '')
        return kwargs
365597
def p_article(self, article):
        ''''''
        article[0] = Article(article[1][4], article[2], article[3], article[1][0],
                             article[1][1], article[1][2], article[1][3], article[1][5])
1039357
public boolean seekToBeginning(String consumerGroupId, String topic) {
        KafkaMsgConsumer consumer = getKafkaConsumer(consumerGroupId, false);
        return consumer.seekToBeginning(topic);
    }
579854
function(messageContent, threadId) {
                /**
                 * + replyInfoVO                  {object : replyInfoVO}
                 *   - participant                {object : ParticipantVO}
                 *   - repliedToMessageId         {long}
                 *   - message                    {string}
                 *   - deleted                    {boolean}
                 *   - messageType                {int}
                 *   - metadata                   {string}
                 *   - systemMetadata             {string}
                 */

                var replyInfo = {
                    deleted: messageContent.deleted,
                    participant: undefined,
                    repliedToMessageId: messageContent.repliedToMessageId,
                    repliedToMessageTime: (messageContent.repliedToMessageNanos)
                        ? (parseInt(parseInt(messageContent.repliedToMessageTime) / 1000) * 1000000000) + parseInt(messageContent.repliedToMessageNanos)
                        : (parseInt(messageContent.repliedToMessageTime)),
                    repliedToMessageTimeMiliSeconds: parseInt(messageContent.repliedToMessageTime),
                    repliedToMessageTimeNanos: parseInt(messageContent.repliedToMessageNanos),
                    message: messageContent.message,
                    deleted: messageContent.deleted,
                    messageType: messageContent.messageType,
                    metadata: messageContent.metadata,
                    systemMetadata: messageContent.systemMetadata
                };

                if (messageContent.participant) {
                    replyInfo.participant = formatDataToMakeParticipant(messageContent.participant, threadId);
                }

                return replyInfo;
            }
416118
def view(self, request, group, **kwargs):
        """"""
        if request.method == 'POST':
            message = request.POST.get('message')
            if message is not None and message.strip():
                comment = GroupComments(group=group, author=request.user,
                                        message=message.strip())
                comment.save()
                msg = _(u'Comment added.')
                if request.POST.get('sendmail', ''):
                    self._send_mail(comment, group)
                if 'postresolve' in request.POST:
                    self._resolve_group(request, group)
                    msg = _(u'Comment added and event marked as resolved.')
                messages.success(request, msg)
                return HttpResponseRedirect(request.path)
        query = GroupComments.objects.filter(group=group).order_by('-created')
        return self.render('sentry_comments/index.html', {
            'comments': query,
            'group': group,
        })
797573
void computeVisibility(List<Boolean> visibilities, CmsInheritanceInfo info) {

        boolean visible = true;
        boolean inherited = true;
        boolean parentVisible = true;
        for (Boolean visibility : visibilities) {
            parentVisible = visible;
            if (visibility == Boolean.TRUE) {
                visible = true;
                inherited = false;
            } else if (visibility == Boolean.FALSE) {
                visible = false;
                inherited = false;
            } else {
                inherited = true;
            }
        }
        info.setVisible(visible);
        info.setVisibilityInherited(inherited);
        info.setParentVisible(parentVisible);
    }
903904
def start (self):
        '''
        

        '''
        self.sub = rospy.Subscriber(self.topic, Odometry, self.__callback)
934948
def post_topic(forum_id, title, body, options = { })
      self.post("/topics.json",
                options.merge(
                  :body => { :topic => {
                    :forum_id => forum_id, :title => title, :body => body
                  } }.to_json
                )
      )['topic']
    end
673580
private void sendPending() {
    while (outstanding.get() < concurrency) {
      final TopicQueue queue = pendingTopics.poll();
      if (queue == null) {
        return;
      }

      queue.pending = false;
      final int sent = queue.sendBatch();

      // Did we send a whole batch? Then there might be more messages in the queue. Mark as pending again.
      if (sent == batchSize) {
        queue.pending = true;
        pendingTopics.offer(queue);
      }
    }
  }
493068
def publish(self, json_msg):
        '''
        
        '''
        pyobj = json.loads(json_msg)
        for topic, value in pyobj.items():
            msg = '{topic} {data}'.format(topic=topic, data=json.dumps(value))
            self._pub.publish(msg)
28950
public void report() {
        synchronized (this) {
            report(registry.getGauges(filter),
                    registry.getCounters(filter),
                    registry.getHistograms(filter),
                    registry.getMeters(filter),
                    registry.getTimers(filter));
        }
    }
934296
protected void sendSubscribe(String topic) {
    assert topic != null : "topic shouldn't be null";
    JsonObject msg = Json.createObject().set(TYPE, "register").set(TOPIC, topic);
    send(msg);
  }
279864
def visible(self):
        
        return self.status not in (PublishStatus.DRAFT.value,
                                   PublishStatus.GONE.value)
159958
def notify(self, reading):
        """"""
        # copy list before iterating in case new observers arrive
        for o in list(self._observers):
            o.update(self, reading)
120073
def issue_add_comment(self, issue_key, comment, visibility=None):
        
        url = 'rest/api/2/issue/{issueIdOrKey}/comment'.format(issueIdOrKey=issue_key)
        data = {'body': comment}
        if visibility:
            data['visibility'] = visibility
        return self.post(url, data=data)
13669
public void maybeDoOffset(){
    long seen = tuplesSeen;
    if (offsetCommitInterval > 0 && seen % offsetCommitInterval == 0 && offsetStorage != null && fp.supportsOffsetManagement()){
      doOffsetInternal();
    }
  }
841406
private void updateMetric(String value, GroupSetEntry groupSetEntry, Set<String>[] groupKeys){
		updateMetric(value, groupSetEntry.m_totalGroup, groupKeys, 0);
		if (groupSetEntry.m_isComposite){
			updateMetric(value, groupSetEntry.m_compositeGroup, groupKeys, groupKeys.length - 1);
		}
	}