fix Java code