Another solution to your question is to do a neighborhood review. I advise all my buyers to meet the neighbors before they are fully committed to a purchase agreement. Often you'll meet someone who knows a lot about the community and can fill you in on the kind of information you want to know. It's also important to do this so that if the Hatfieldâ€™s live on one side of the home you are considering and the McCoyâ€™s live on the other, you don't get caught in their crossfire.
One specific note about a leak, there are a number of potential causes, from bad workmanship as you mention to a tree limb piercing the roof due to a storm. Bad workmanship may require a complete tear off and replacement (and may be covered by a builders warranty) where the tree limb may be a relatively inexpensive roof spot repair.