Re: There are anti-copilot techniques...
> The problem with the approach is
How about giving them the program with errors as you describe and asking the student to reimplement / refactor all or parts of it according to a new specification?
For some people, most of their programming career consists of maintaining someone else's code anyway.