original_string: public function update($ids)
      {
          if (empty($ids)) {
              return false;
          } elseif (empty($this->_ids)) {
              $this->_ids = $ids;
              $change = true;
          } else {
              $change = false;
              foreach ($ids as $k => $v) {
                  if (!isset($this->_ids[$k]) || ($this->_ids[$k] != $v)) {
                      $this->_ids[$k] = $v;
                      $change = true;
                  }
              }
          }
  
          if ($change) {
              $this->_sorted = false;
          }
  
          return $change;
      }
code: public function update($ids)
      {
          if (empty($ids)) {
              return false;
          } elseif (empty($this->_ids)) {
              $this->_ids = $ids;
              $change = true;
          } else {
              $change = false;
              foreach ($ids as $k => $v) {
                  if (!isset($this->_ids[$k]) || ($this->_ids[$k] != $v)) {
                      $this->_ids[$k] = $v;
                      $change = true;
                  }
              }
          }
  
          if ($change) {
              $this->_sorted = false;
          }
  
          return $change;
      }
code_tokens: public function update ( $ ids ) { if ( empty ( $ ids ) ) { return false ; } elseif ( empty ( $ this -> _ids ) ) { $ this -> _ids = $ ids ; $ change = true ; } else { $ change = false ; foreach ( $ ids as $ k => $ v ) { if ( ! isset ( $ this -> _ids [ $ k ] ) || ( $ this -> _ids [ $ k ] != $ v ) ) { $ this -> _ids [ $ k ] = $ v ; $ change = true ; } } } if ( $ change ) { $ this -> _sorted = false ; } return $ change ; }
docstring: Updates the mapping.
  
  @param array $ids  Array of sequence -> UID mapping.
  
  @return boolean  True if the mapping changed.
docstring_tokens: Updates the mapping .