hack for sort inference failure
temporary using the hook visitor in the java rewrite engine