Clears this MessagePattern.
countParts() will return 0.
352237
public void clear() {
        // Mostly the same as preParse().
        if(isFrozen()) {
            throw new UnsupportedOperationException(
                "Attempt to clear() a frozen MessagePattern instance.");
        }
        msg=null;
        hasArgNames=hasArgNumbers=false;
        needsAutoQuoting=false;
        parts.clear();
        if(numericValues!=null) {
            numericValues.clear();
        }
    }
1186862
public void discard()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "MEF.discard");

        if (ivInvocationHandlerPool != null) // d423445.1
        {
            synchronized (ivStateLock)
            {
                --ivNumberOfMessageEndpointsCreated;
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "MEF.discard");

    }
1294827
def clear(self):
        
        if self._bit_count == 0:
            return

        block = self._qpart.document().begin()
        while block.isValid():
            if self.getBlockValue(block):
                self.setBlockValue(block, 0)
            block = block.next()
930139
public void clear() {
        exceptionSet.clear();
        explicitSet.clear();
        universalHandler = false;
        commonSupertype = null;
        size = 0;
    }
296941
public void clear() {
        weightParams.clear();
        biasParams.clear();
        paramsList = null;
        weightParamsList = null;
        biasParamsList = null;
    }
964974
public void clear() {
		Arrays.fill(clusters, 0, bound, null);
		pairs.clear();
		additions = 0;
		count = 0;
		bound = 0;
	}
959203
@Override
	protected int pruneCache() {
		int count = 0;
		Iterator<CacheObj<K, V>> values = cacheMap.values().iterator();
		CacheObj<K, V> co;
		while (values.hasNext()) {
			co = values.next();
			if (co.isExpired()) {
				values.remove();
				onRemove(co.key, co.obj);
				count++;
			}
		}
		return count;
	}
322390
protected void clearMessageQueue() {
    MessageTuple tuple = null;
    while ((tuple = messageQueue.poll()) != null) {
      Message msg = tuple.getMessage();
      if (msg.getType() == MessageType.DISCONNECTED) {
        this.transport.clear(msg.getDisconnected().getServerId());
      } else if (msg.getType() == MessageType.SHUT_DOWN) {
        throw new LeftCluster("Shutdown Zab.");
      }
    }
  }
638477
public int clearAutoValues() {
        int count = 0;
        Iterator<Map.Entry<String, String>> it = entrySet().iterator();
        while (it.hasNext()) {
            String key = it.next().getKey();
            if (key.charAt(0) == '#' && key.charAt(key.length()-1) == '#') {
                it.remove();
                ++count;
            }
        }
        return count;
    }
431448
@Override
    public void reset() {
        // just replace accumulator, gc will do the rest
        accumulator = new ThreadLocal<>();

        // resetting this counter too
        workersCounter.set(0);

        // reset indexes too
        index = new ThreadLocal<>();

        // throw away message queues
        for (int i = 0; i < parties; i++) {
            messages.get(i).clear();
        }
    }
1124579
public synchronized int cleanUpObsoleteEntries() {
        countPutCountSinceEviction = 0;
        nextCleanUpTimestamp = 0;

        int countCleaned = 0;
        long timeLimit = isExpiring ? System.currentTimeMillis() - expirationMillis : 0;
        Iterator<CacheEntry<VALUE>> iterator = values.values().iterator();
        while (iterator.hasNext()) {
            CacheEntry<VALUE> cacheEntry = iterator.next();
            if (!isStrongReference && cacheEntry.reference == null) {
                countRefCleared++;
                countCleaned++;
                iterator.remove();
            } else if (cacheEntry.timeCreated < timeLimit) {
                countExpired++;
                countCleaned++;
                iterator.remove();
            }
        }
        return countCleaned;
    }
768673
protected int getNumberOfLockedMessages()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getNumberOfLockedMessages");

    int count = 0;

    synchronized(this)
    {
      LMEMessage message;

      message = firstMsg;
      while(message != null)
      {
        count++;
        message = message.next;
      }
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getNumberOfLockedMessages", new Integer(count));
    return count;
  }
27863
@Override
    public int countMissing() {
        int count = 0;
        for (int i = 0; i < size(); i++) {
            if (isMissing(i)) {
                count++;
            }
        }
        return count;
    }
1118684
void clearAllMsg() {
        removeMessages(MESSAGE_DISPLAY);
        removeMessages(MESSAGE_ADD_VIEW);
        removeMessages(MESSAGE_REMOVE);
        clearShowing();
        msgQueue.clear();
        stickyQueue.clear();
    }
1058024
def clear_messages(topic:, partition:)
      return unless @buffer.key?(topic) && @buffer[topic].key?(partition)

      @size -= @buffer[topic][partition].count
      @bytesize -= @buffer[topic][partition].map(&:bytesize).reduce(0, :+)

      @buffer[topic].delete(partition)
      @buffer.delete(topic) if @buffer[topic].empty?
    end
498258
def clear(self):
    """"""
    for i in range(len(self.sample)):
      self.sample[i] = 0.0
    self.count = 0
944323
private int findOtherSubMessage(int partIndex) {
        int count=msgPattern.countParts();
        MessagePattern.Part part=msgPattern.getPart(partIndex);
        if(part.getType().hasNumericValue()) {
            ++partIndex;
        }
        // Iterate over (ARG_SELECTOR [ARG_INT|ARG_DOUBLE] message) tuples
        // until ARG_LIMIT or end of plural-only pattern.
        do {
            part=msgPattern.getPart(partIndex++);
            MessagePattern.Part.Type type=part.getType();
            if(type==MessagePattern.Part.Type.ARG_LIMIT) {
                break;
            }
            assert type==MessagePattern.Part.Type.ARG_SELECTOR;
            // part is an ARG_SELECTOR followed by an optional explicit value, and then a message
            if(msgPattern.partSubstringMatches(part, "other")) {
                return partIndex;
            }
            if(msgPattern.getPartType(partIndex).hasNumericValue()) {
                ++partIndex;  // skip the numeric-value part of "=1" etc.
            }
            partIndex=msgPattern.getLimitPartIndex(partIndex);
        } while(++partIndex<count);
        return 0;
    }