add logik back to tutorial in java rewrite engine

**do not review yet**