original_string: public function nextTerm()
      {
          while (($termStream = $this->_termsStreamQueue->pop()) !== null) {
              if ($this->_termsStreamQueue->top() === null 
                  || $this->_termsStreamQueue->top()->currentTerm()->key() !=                $termStream->currentTerm()->key()
              ) {
                  // We got new term
                  $this->_lastTerm = $termStream->currentTerm();
  
                  if ($termStream->nextTerm() !== null) {
                      // Put segment back into the priority queue
                      $this->_termsStreamQueue->put($termStream);
                  }
  
                  return $this->_lastTerm;
              }
  
              if ($termStream->nextTerm() !== null) {
                  // Put segment back into the priority queue
                  $this->_termsStreamQueue->put($termStream);
              }
          }
  
          // End of stream
          $this->_lastTerm = null;
  
          return null;
      }
code: public function nextTerm()
      {
          while (($termStream = $this->_termsStreamQueue->pop()) !== null) {
              if ($this->_termsStreamQueue->top() === null 
                  || $this->_termsStreamQueue->top()->currentTerm()->key() !=                $termStream->currentTerm()->key()
              ) {
                  // We got new term
                  $this->_lastTerm = $termStream->currentTerm();
  
                  if ($termStream->nextTerm() !== null) {
                      // Put segment back into the priority queue
                      $this->_termsStreamQueue->put($termStream);
                  }
  
                  return $this->_lastTerm;
              }
  
              if ($termStream->nextTerm() !== null) {
                  // Put segment back into the priority queue
                  $this->_termsStreamQueue->put($termStream);
              }
          }
  
          // End of stream
          $this->_lastTerm = null;
  
          return null;
      }
code_tokens: public function nextTerm ( ) { while ( ( $ termStream = $ this -> _termsStreamQueue -> pop ( ) ) !== null ) { if ( $ this -> _termsStreamQueue -> top ( ) === null || $ this -> _termsStreamQueue -> top ( ) -> currentTerm ( ) -> key ( ) != $ termStream -> currentTerm ( ) -> key ( ) ) { // We got new term $ this -> _lastTerm = $ termStream -> currentTerm ( ) ; if ( $ termStream -> nextTerm ( ) !== null ) { // Put segment back into the priority queue $ this -> _termsStreamQueue -> put ( $ termStream ) ; } return $ this -> _lastTerm ; } if ( $ termStream -> nextTerm ( ) !== null ) { // Put segment back into the priority queue $ this -> _termsStreamQueue -> put ( $ termStream ) ; } } // End of stream $ this -> _lastTerm = null ; return null ; }
docstring: Scans term streams and returns next term
  
  @return Zend_Search_Lucene_Index_Term|null
docstring_tokens: Scans term streams and returns next term