If this was a study by experienced software engineers ... but it's not.
I can see it taking over some aspects of business processes that are currently achieved via programming against a dataset. For example reports, etc, are manually programmed or configured, yet in the future AI will understand 'give me the KPIs on this XYZ' and do things automatically.
But real programming? When nobody can specify anything clearly when a bit of software engineering is required?
At the worst, current programmers will migrate to being 'specification engineers', i.e., turning the vague useless specification a business provides into something concise and specific, that a code generator - AI or not - will turn into a working system, removing all the drudge work (but IDEs and Frameworks seem to halve the drudge work every 5 years anyway already, without AI) and filling in the actual code to achieve the end aim.
So yeah, better tools to remove drudge work for programs that don't need much flexibility. But that isn't what anyone understands by 'AIs will write software'.
Btw, we'll need twice as many 'specification engineers' to do a certain amount of work in 2040 than we need 'software engineers' to do a certain amount of work today. That's how these things seem to work, so why would it change?