  The roles of oxygen vacancies on the electronic and magnetic properties of Ni
doped In$_2$O$_3$ have been studied by first-principles calculations based on
hybrid functional theory. Our results predict that the Ni-doped In$_2$O$_3$
system displays a ferromagnetic semiconducting character. However, the presence
of oxygen vacancies results in antiferromagnetic coupling between the
neighboring Ni pair bridged by an oxygen vacancy. The antiferromagnetic
coupling is found to arise from the predominant role of superexchange due to
the strong Ni 3d-O 2p hybridization. Consequently, the oxygen vacancies play a
key role in the lower saturation magnetization of Ni:In$_2$O$_3$
polycrystalline sample, as observed in experiments.
