Advances to the next available final state.
969190
private final ByteBuffer advance() {
    if (position == 0) {
      return null;
    }

    while (position > 0) {
      final int lastIndex = position - 1;
      final int arc = arcs[lastIndex];

      if (arc == 0) {
        // Remove the current node from the queue.
        position--;
        continue;
      }

      // Go to the next arc, but leave it on the stack
      // so that we keep the recursion depth level accurate.
      arcs[lastIndex] = fsa.getNextArc(arc);

      // Expand buffer if needed.
      final int bufferLength = this.buffer.length;
      if (lastIndex >= bufferLength) {
        this.buffer = Arrays.copyOf(buffer, bufferLength + EXPECTED_MAX_STATES);
        this.bufferWrapper = ByteBuffer.wrap(buffer);
      }
      buffer[lastIndex] = fsa.getArcLabel(arc);

      if (!fsa.isArcTerminal(arc)) {
        // Recursively descend into the arc's node.
        pushNode(fsa.getEndNode(arc));
      }

      if (fsa.isArcFinal(arc)) {
        bufferWrapper.clear();
        bufferWrapper.limit(lastIndex + 1);
        return bufferWrapper;
      }
    }

    return null;
  }
163213
public function next()
	{
		$this->key++;
		$this->current = $this->current->add($this->interval);
	}
262275
def complete_next(self, count=1, disable_wrap_around=False):
        
        if self.complete_state:
            completions_count = len(self.complete_state.current_completions)

            if self.complete_state.complete_index is None:
                index = 0
            elif self.complete_state.complete_index == completions_count - 1:
                index = None

                if disable_wrap_around:
                    return
            else:
                index = min(completions_count-1, self.complete_state.complete_index + count)
            self.go_to_completion(index)
372309
def advancing(self):
        
        if self._forward:
            raise ValueError("Already advancing")
        self._forward = True
        yield
        self._forward = False
199955
private void advance() {
        while (nextSubgraphs.isEmpty() && vertexIter.hasNext()) {
            Integer nextVertex = vertexIter.next();
            // Determine the set of vertices that are greater than this vertex
            Set<Integer> extension = new HashSet<Integer>();
            for (Integer v : g.getNeighbors(nextVertex))
                if (v > nextVertex)
                    extension.add(v);
            Set<Integer> subgraph = new HashSet<Integer>();
            subgraph.add(nextVertex);
            extendSubgraph(subgraph, extension, nextVertex);
        }
    }
289563
def finish(self, data=''):
        '''
        
        '''
        self.pending += data
        self.streaming = False
        for i in self:
            yield i
516507
def next_state(self):
        """"""
        if(self.roaster.get_roaster_state() == 'roasting'):
            self.roaster.time_remaining = 20
            self.roaster.cool()
        elif(self.roaster.get_roaster_state() == 'cooling'):
            self.roaster.idle()
99020
public function next()
    {
        if (count($this->data) > 0) {
            array_shift($this->data);
        }
        ++$this->position;

        if ($this->position > $this->numberOfRecords()) {
            return;
        }

        if (count($this->data) == 0) {
            $this->fetchMore();
        }

        if (count($this->data) == 0) {
            return;
        }
    }
386242
def move_forward(self):
        """"""
        self.at(ardrone.at.pcmd, True, 0, -self.speed, 0, 0)
487617
def transition_to_execute_complete(self):
        """"""
        assert self.state in [AQStateMachineStates.execute]
        self.state = AQStateMachineStates.execute_complete
907248
public boolean next() {
    if (combinedBuffer_ == null) { // initial setup
      combinedBuffer_ = sketch_.combinedBuffer_;
      num_ = sketch_.getBaseBufferCount();
    } else { // advance index within the current level
      i_++;
    }
    if (i_ < num_) {
      return true;
    }
    // go to the next non-empty level
    do {
      level_++;
      if (level_ > 0) {
        bits_ >>>= 1;
      }
      if (bits_ == 0L) {
        return false; // run out of levels
      }
      weight_ *= 2;
    } while ((bits_ & 1L) == 0L);
    i_ = 0;
    offset_ = (2 + level_) * sketch_.getK();
    num_ = sketch_.getK();
    return true;
  }
383669
private synchronized void finishTransition(final InternalState current, final InternalState next) {
        internalSetState(getTransitionTask(next), current, next);
        transition();
    }
1240367
def finish(self):
        
        if self.state is not State.NORMAL:
            raise ReadError(f'EOF while in {self.state.name} state')
        if self.stack:
            top = self.stack[-1]
            top.raise_unclosed_error()
1034605
def advance(parser):
    # type: (Parser) -> None
    """"""
    prev_end = parser.token.end
    parser.prev_end = prev_end
    parser.token = parser.lexer.next_token(prev_end)
133121
public function next()
    {
        if ($this->x + 1 < $this->width) {
            $this->x++;
        } else {
            $this->x = 0;
            $this->y++;
        }

        $this->index++;
    }
572246
public function next()
    {
        if ($this->current === null) {
            $this->rewind();
        }

        if ($this->validationResult !== static::END_ITERATION) {
            $this->key++;

            $this->incrementCurrentDateUntilValid();
        }
    }
449518
public function next()
    {
        $this->current = $this->parser->inner($this->start, $this->end);
        if ($this->current->isEmpty()) {
            $this->valid = false;
            $this->position = -1;
        } else {
            $this->valid = true;
            ++$this->position;
        }
    }