Java rewrite engine4

delete all klabels and change all when -> requires