I just deleted an answer to your question, because it was too much an advertisement.
If you really are interested in an answer to your 2 questions, do a google search for things like CODE INSPECTION or CODE ANALYSIS.

Kees