Dear Emad,
I understand you are a bit scared by the code and the whole thing, but you can't always rely on others for any small doubt.
I could reply that yes, AODV is guaranteed to find the min hop path, but who am I to tell an absolute truth ?
My opinion is equivalent to your (not exactly, I have a bit more experience), but nobody can be 100% sure that the code is bug free, and that there is not a strange case where the min hop is not reached.
In any case, if you keep relying on others to reassure you, you'll always be waiting for someone else to validate your work. A suggestion (not limited to ns-3): trust in yourself, and be ready to discuss your ideas. If your point of view is right, then everyone will agree. If it's not, you can learn something and increase your understanding.
It's the scientific process, you need to discuss your ideas (not the ideas of other people). Hence, you need to build up your own ideas.
About the non-hop thing... it's in the code line you posted. If the message is from a path with less hops, it is updated. As a consequence... you know.
Cheers,
T.