Hunalign port to java