With your question I believe you are asking how much future development will be able to minimize the amount of work a software developer will have to do. Even if you have an AI that can write your whole program, you still have to tell it what to do, just like for an automatic car builder, you still have to give it a blueprint, and that blueprint requires some work.
And if you have an AI, you still have to teach it and it will have to learn through several projects. Therefore, I don't think that an AI is suitable for this kind of work, but rather a more deterministic approach, using code generators. These code generators can become very complex, but need not necessarily employ machine learning.
That said, there already exists research in the areas called Feature-Oriented Software Design and Aspect-Oriented Software Design. These deal with assembling software applications by selecting some features which it should have, and then code is generated for that. The goal is to have implementations for several features that appear repeatedly in a particular domain and assemble them like building blocks, as suitable for your particular application. For web development for example, features would include transactions, statistics, scalability, logging and whatever you can think of as recurring characteristics of different web apps.
Features and aspects are different than components, as they are usually cross-cutting concerns. Take for example logging. You can't just take a library and include it in your application and say you've got logging now. You have to spread your logging calls all over your code, and that is where code generators are handy. I've recently heard about all this stuff from this two part interview on Software Engineering Radio.
It seems that this kind of research is quite trendy in Europe, and Germany in particular, even in the industry, as I can say from personal experience. Code generation can be useful for generating the necessary infrastructure code, so that the developer can focus exclusively on implementing the specific behaviour of his application and not bother with the same side-issues on every different project.
It remains to be seen how much that application-specific code can be narrowed down. It certainly can't be eliminated completely, only reduced to some sort of blueprint, as I mentioned in the beginning.