  In this paper, we complete Jantzen's algorithm to compute the highest
derivatives of irreducible representations of $p$-adic odd special orthogonal
groups or symplectic groups. As an application, we give some examples of the
Langlands data of the Aubert duals of irreducible representations, which are in
the integral reducibility case.
