fixing visitor example for the java rewrite engine