fixed a bug when computing cells of interest in java backend

fixed a small latent bug

@dwightguth please review