Fixed Java function .