This is my use case for GPT-4. It usually does it better than most humans, including those who wrote the code and those who have maintained the codebase for years.