Java rewrite engine4

delete all klabels and change all when -> requires
Is this really a function, or you just made it a function to circumvent the `[anywhere]` issue?