Bad code is already perversive, it is much more common than good code. So, you write an AI that takes various snippets of, more likely than not, bad code and combines them. And this AI is still written by coders who, more likely than not, are not the best coders themselves, so the sum will probably be even worse than the parts... If Microsoft has great engineers working on fancy stuff like that, perhaps they should instead throw a couple to the Skype team for example (I don't know what they are doing, but they are slowly degrading what was a useful service).
In any case, good coders already reuse libraries etc and end up doing the job of several coders that are inventing the wheel. And it is much easier for the non-technical person to communicate with a coder to describe the requirements, because an AI system would still need a specification language to describe things - it would just be a higher level programming language in a way.
I remember I was told that when SQL first came out (SEQUEL) there was the idea that business users would be able to communicate with databases so db programmers wouldn't be needed... yeah, right.