1. Your hashcode implementions allows for searching the same bucket.
2. Your equal method returns true as the compared object and object stored are referring to the same object.
If you do the following
Dog d= new Dog("arthur");
m.get(d);
then it would return null iff Orginal Dog's name has not been changed to "arthur".