Java: Removed unused methods on the java_gen