I'd need to see some stats and studies that show wide-scale differences in code quality.There's a good reason why offshore contractors have code of generally lower quality. Here's what a Chinese friend has told me about the employment situation for coders in China. The good programmers usually get good jobs at local firms--most of which don't do outsourcing. The outsourcing positions are primarily taken by the lower-quality programmers.
Thus, when you outsource to China, you're often effectively self-selecting the worst programmers to work on your project. This leads to stereotypes that Chinese programmers are incompetent idiots, when in fact the reality is just that bad Chinese programmers are incompetent idiots, no different than bad Western programmers.
Obviously I have no statistics on this, but I'm inclined to at least somewhat trust the word of someone who has lived there and had experience with the industry. It's also a better explanation than "Chinese are bad programmers" or some equally racist answer.