Update Gate.java