A second order operator splitting method for Allen–Cahn type equations with nonlinear source terms