java_gen: pair requests and replies