set self._merged_entities to the longest possible(wrapping) tokens
511000
def _parse_merged_entities(self):
        
        self._merged_entities = list(filterfalse(
            lambda token: self._is_wrapped(token, self.entities),
            self.entities))
756009
final void ensureAnnotationCapacity(int length) {
        int oldlen = (_annotations == null) ? 0 : _annotations.length;
        if (length < oldlen) return;

        int newlen = (_annotations == null) ? 10 : (_annotations.length * 2);
        if (length > newlen) {
            newlen = length;
        }

        SymbolToken[] temp1 = new SymbolToken[newlen];

        if (oldlen > 0) {
            System.arraycopy(_annotations, 0, temp1, 0, oldlen);
        }
        _annotations = temp1;
    }
858995
private void setRingbufferData(
            RingbufferMergeData fromMergeData,
            RingbufferContainer<Object, Object> toContainer) {
        boolean storeEnabled = toContainer.getStore().isEnabled();
        Data[] storeItems = storeEnabled ? new Data[fromMergeData.size()] : null;

        toContainer.setHeadSequence(fromMergeData.getHeadSequence());
        toContainer.setTailSequence(fromMergeData.getTailSequence());

        for (long seq = fromMergeData.getHeadSequence(); seq <= fromMergeData.getTailSequence(); seq++) {
            final Object resultValue = fromMergeData.read(seq);
            toContainer.set(seq, resultValue);
            if (storeEnabled) {
                storeItems[(int) (seq - fromMergeData.getHeadSequence())] = serializationService.toData(resultValue);
            }
        }
        if (storeEnabled) {
            toContainer.getStore()
                    .storeAll(fromMergeData.getHeadSequence(), storeItems);
        }
    }
1335514
def maximumORFLength(self, openORFs=True):
        
        return max(len(orf) for orf in self.ORFs(openORFs))
47085
public LongToken visitLong(EditsElement e) throws IOException {
    return (LongToken)visit(tokenizer.read(new LongToken(e)));
  }
793969
def pairwise_longest(iterable, fillvalue=None):
    ""
    a, b = tee(iterable)
    next(b, None)
    return zip_longest(a, b, fillvalue=fillvalue)
32302
void markMerged() {
        Exceptions.checkNotClosed(this.closed, this);
        Preconditions.checkState(!this.merged, "StreamSegmentReadIndex %d is already merged.", this.metadata.getId());
        log.debug("{}: Merged.", this.traceObjectId);
        this.merged = true;
    }
1104379
private void initMerger() throws IOException
   {
      if (merger == null)
      {
         merger = new IndexMerger(this);
         merger.setMaxMergeDocs(handler.getMaxMergeDocs());
         merger.setMergeFactor(handler.getMergeFactor());
         merger.setMinMergeDocs(handler.getMinMergeDocs());

         for (Object index : indexes)
         {
            merger.indexAdded(((PersistentIndex)index).getName(), ((PersistentIndex)index).getNumDocuments());
         }
         merger.start();
      }
   }
118734
def overextends(parser, token):
    
    bits = token.split_contents()
    if len(bits) != 2:
        raise TemplateSyntaxError("'%s' takes one argument" % bits[0])
    parent_name = parser.compile_filter(bits[1])
    nodelist = parser.parse()
    if nodelist.get_nodes_by_type(ExtendsNode):
        raise TemplateSyntaxError("'%s' cannot appear more than once "
                                  "in the same template" % bits[0])
    return OverExtendsNode(nodelist, parent_name, None)
1042132
function long(nodes, context, recur, wrap) {
    context.write(WRAPPERS[wrap].left);

    for (var i = 0; i < nodes.length; i++) {
        recur(nodes[i]);

        if (nodes[i + 1]) {
            context.write(', ');}}



    context.write(WRAPPERS[wrap].right);}
439189
def get_truncated_repr(self, maxlen):
        '''
        
        '''
        out = TruncatedStringIO(maxlen)
        try:
            self.write_repr(out, set())
        except StringTruncated:
            # Truncation occurred:
            return out.getvalue() + '...(truncated)'

        # No truncation occurred:
        return out.getvalue()
150502
def gettextdelimiter(self, retaintokenisation=False):
        """"""
        for e in self:
            if isinstance(e, New) or isinstance(e, Current):
                return e.gettextdelimiter(retaintokenisation)
        return ""
815223
def set_docstring(self, loc, tokens):
        """"""
        internal_assert(len(tokens) == 2, "invalid docstring tokens", tokens)
        self.docstring = self.reformat(tokens[0]) + "\n\n"
        return tokens[1]
1063283
protected long parseBracketedLong( DdlTokenStream tokens,
                                       DataType dataType ) {
        consume(tokens, dataType, false, L_PAREN);
        String value = consume(tokens, dataType, false);
        consume(tokens, dataType, false, R_PAREN);
        return parseLong(value);
    }
499067
def merge(self, other):
        
        other.qualify()
        for n in ('name',
                  'qname',
                  'min',
                  'max',
                  'default',
                  'type',
                  'nillable',
                  'form_qualified',):
            if getattr(self, n) is not None:
                continue
            v = getattr(other, n)
            if v is None:
                continue
            setattr(self, n, v)
1341636
def merge(self, other):
        """"""
        assert self.attrs == other.attrs
        self.tokens.extend(other.tokens)
        self.spaces.extend(other.spaces)
        self.strings.update(other.strings)
981403
def verbatim(parser, token):
    """"""
    text = []
    while 1:
        token = parser.tokens.pop(0)
        if token.contents == 'endverbatim':
            break
        if token.token_type == TOKEN_VAR:
            text.append('{{ ')
        elif token.token_type == TOKEN_BLOCK:
            text.append('{%')
        text.append(token.contents)
        if token.token_type == TOKEN_VAR:
            text.append(' }}')
        elif token.token_type == TOKEN_BLOCK:
            if not text[-1].startswith('='):
                text[-1:-1] = [' ']
            text.append(' %}')
    return VerbatimNode(''.join(text))