This is already being researched! See http://jsnice.org/ for recovering variable names from minified javascript.
I remember testing it by coding a binary search with single letter variable names. It managed to rename them to the more canonical "lo"/"mid"/"hi" names just by recognizing that the code pattern is typically used for a binary search.
It seems like a reasonable (almost believable even) first stage to software finally coming to eat the jobs of its creators.
Eventually we're going to become technical PMs. As long as there will be fuzzy unclear problem descriptions, there will be jobs for people who can codify and standardize processes.
Plenty of paperclips, though.
This seems a little optimistic in terms of the average software developer's ability to think at higher and higher levels of abstraction.
It's not an easy skill, and not that many people are very strong in it.
Just look at how programmers today react to mathematical paradigms and explanations (category theory, anyone) in any practical setting.
You could hard-code an interactive agent that periodically peeked and coerced the input (between itself and the ML function). This way the ML module is coercible.
It would even be more cool if the ML function itself learned the interactive agent function as part of itself.