original_string: public function populate(DbManagement $db, DbManagementObject $DbManagementObject, $query)
      {         
          $keys = array_values($DbManagementObject->getKeys());
          $db->add($query, $keys);
          $array = array_values($DbManagementObject->getValues());
          $db->query($query, $array);
          return $db->lastInsertId();
      }
code: public function populate(DbManagement $db, DbManagementObject $DbManagementObject, $query)
      {         
          $keys = array_values($DbManagementObject->getKeys());
          $db->add($query, $keys);
          $array = array_values($DbManagementObject->getValues());
          $db->query($query, $array);
          return $db->lastInsertId();
      }
code_tokens: public function populate ( DbManagement $ db , DbManagementObject $ DbManagementObject , $ query ) { $ keys = array_values ( $ DbManagementObject -> getKeys ( ) ) ; $ db -> add ( $ query , $ keys ) ; $ array = array_values ( $ DbManagementObject -> getValues ( ) ) ; $ db -> query ( $ query , $ array ) ; return $ db -> lastInsertId ( ) ; }
docstring: add an Object to the table in the database
  @param DbManagement $db                          the database connector
  @param DbManagementObject $DbManagementObject    the DbManagementObject containing all needed data to populate database
  @param String $query                             the query to populate database
  @throws DataBaseException                        error in connecting to the database
  @return id of the record
docstring_tokens: add an Object to the table in the database