I am looking for studies about applied code quality, comparing costs before and after. They should show a clear benefit in cost (or maybe a negative effect of too much cost). I need hard facts like (entirely fictional):
After we added static code analysis to our build, the number of defects reduced to half. So we saved approx. 10 developer days effort per iteration on bug fixing. Extra cost by buying and setting up the analysis was x$. Development was slowed down 0.1% by obeying the analysis results, increasing the total development effort by 5 days per iteration. During the first half year the initial cost was returned. etc. Now we save approx. y$ per iteration.
I only know one such story given in Code Complete 2nd Ed. It is talking about Boeing that defects decreased after adding reviews during the QA process (AFAIK). Unfortunately most shops would not compare with Boeing, so studies from Boeing do not count.
Do you know such studies or do you have any hard data from your shop?
EDIT:
There is a related question, but does not give any hard data.