fixed io bug in the java rewrite engine due to the serialization of context information