Java implementation of BITT