Raw port from Fortran to Java code.