original_string: public function commit()
      {
          if ($this->_currentSegment !== null) {
              $newSegment = $this->_currentSegment->close();
              if ($newSegment !== null) {
                  $this->_newSegments[$newSegment->getName()] = $newSegment;
              }
              $this->_currentSegment = null;
          }
  
          $this->_updateSegments();
      }
code: public function commit()
      {
          if ($this->_currentSegment !== null) {
              $newSegment = $this->_currentSegment->close();
              if ($newSegment !== null) {
                  $this->_newSegments[$newSegment->getName()] = $newSegment;
              }
              $this->_currentSegment = null;
          }
  
          $this->_updateSegments();
      }
code_tokens: public function commit ( ) { if ( $ this -> _currentSegment !== null ) { $ newSegment = $ this -> _currentSegment -> close ( ) ; if ( $ newSegment !== null ) { $ this -> _newSegments [ $ newSegment -> getName ( ) ] = $ newSegment ; } $ this -> _currentSegment = null ; } $ this -> _updateSegments ( ) ; }
docstring: Commit current changes
docstring_tokens: Commit current changes