What I want is an AI that can do static analysis of code and report defects that traditional static analysis couldn't hope to detect.
I suspect that detecting errors that way will be a part of training non-terrible code generators. But with the added benefit of being useful to human programmers as well.