x.next() -> the next value, or raise StopIteration
501627
def next(self):
        ''
        if self.__g_object is None:
            self.__g_object = self.__g_function( *self.__v_args, **self.__d_args )
        try:
            return self.__g_object.next()
        except StopIteration:
            self.__g_object = None
            raise
277332
public synchronized int setNext(boolean value) {
    int previousValue = -1;
    if (occupiedBits < size)
      occupiedBits++;
    else
      previousValue = bitSet.get(nextIndex) ? 1 : 0;

    bitSet.set(nextIndex, value);
    nextIndex = indexAfter(nextIndex);

    if (value) {
      if (previousValue != 1)
        positives++;
      if (previousValue == 0)
        negatives--;
    } else {
      if (previousValue != 0)
        negatives++;
      if (previousValue == 1)
        positives--;
    }

    return previousValue;
  }
878962
def next(self):
        
        if self._cur_row >= len(self._table):
            raise StopIteration
        data = self._table[self._cur_row].copy()
        self._cur_row += 1
        return data
168191
private static int nextSep(String str, int start) {
    int next = str.indexOf(',', start);
    return next == -1 ? str.length() : next;
  }
142446
def next_up(x, context=None):
    
    x = BigFloat._implicit_convert(x)
    # make sure we don't alter any flags
    with _saved_flags():
        with (context if context is not None else EmptyContext):
            with RoundTowardPositive:
                # nan maps to itself
                if is_nan(x):
                    return +x

                # round to current context; if value changes, we're done
                y = +x
                if y != x:
                    return y

                # otherwise apply mpfr_nextabove
                bf = y.copy()
                mpfr.mpfr_nextabove(bf)
                # apply + one more time to deal with subnormals
                return +bf
1240907
public void skipNext() throws IOException
    {
        nameDeserializer.skipNext();
        nextFlags = nextFlags == Integer.MIN_VALUE ? in.readUnsignedByte() : nextFlags;
        if ((nextFlags & ColumnSerializer.RANGE_TOMBSTONE_MASK) != 0)
            type.rangeTombstoneSerializer().skipBody(in, version);
        else
            type.columnSerializer().skipColumnBody(in, nextFlags);
        nextFlags = Integer.MIN_VALUE;
    }
467167
def next(self):
        
        # need new iterable?
        if self.r == self.repeats:
            self.i = (self.i + 1) % self.lenght
            self.r = 0

        self.r += 1
        if self.stopping and self.i == 0 and self.r == 1:
            self.stopped = True
        if self.i == 0 and self.stopped:
            raise StopIteration
        else:
            iterator = self.iterators[self.i]
            return iterator.next()
1093283
def next(self):
        
        if not self.__has_more():
            raise StopIteration()
        else:
            return javabridge.get_env().get_string(self.__next())
467715
def next(self):
        
        while True:
            if not self._resp:
                self._start()
            if self._stop:
                raise StopIteration
            skip, data = self._process_data(next_(self._lines))
            if not skip:
                break
        return data
596295
private int nextBoundaryAfter(int startIndex) {
        BreakIterator breakiterator = search_.breakIter();

        if (breakiterator == null) {
            breakiterator = search_.internalBreakIter_;
        }

        if (breakiterator != null) {
            return breakiterator.following(startIndex);
        }

        return startIndex;
    }
965673
def _maybe_repeat(self, x):
    
    if isinstance(x, list):
      assert len(x) == self.n
      return x
    else:
      return [x] * self.n
845438
private void nextValue() {
		while (iterator.hasNext()) {
			nextValue = iterator.next();
			if (nextValue.isExpired() == false) {
				return;
			}
		}
		nextValue = null;
	}
165979
private void prepareNext()
    {
        hasNext = false;
        while (iterator.hasNext())
        {
            next = iterator.next();
            if (predicate.test(next))
            {
                hasNext = true;
                break;
            }
        }
    }
1266254
def this_and_prev(iterable):
    """"""
    try:
        item = next(iterable)
        while True:
            next_item = next(iterable)
            yield item, next_item
            item = next_item
    except StopIteration:
        return
1251398
def next(self):
        
        if self.col < self.data.num_attributes:
            index = self.col
            self.col += 1
            return self.data.attribute(index)
        else:
            raise StopIteration()
791062
@Override
    public void findNext(String str) {
        int startLine = getLine();
        int startColumn = getColumn();
        highLight(str);
        delegate.findNext(str);
        int targetLine = getLine();
        int targetColumn = getColumn();
        //Rest the actual pointer
        delegate.move(startLine, startColumn);
        int verticalOffset = targetLine - getLine();
        moveVertical(verticalOffset);
        int horizontalOffset = targetColumn - getColumn();
        moveHorizontally(horizontalOffset);
        redrawText();

    }
456253
def Next(self):
        
        try:
            self.key, self.value = next(self.current)
        except StopIteration:

            if self.current != self.second:
                self.current = self.second
                return self.Next()

            return False

        return True