Homoclinic and heteroclinic bifurcations from a heteroclinic loop are consi
dered. The system under consideration has three parameters, two of which ar
e not suitable for generic unfoldings. Analytical criteria in terms of deri
vatives to Melnikov's functions are given for nongeneric parameters. Four q
ualitatively distinct bifurcation diagrams are obtained. The result is used
to give an explanation of a numerical finding on the generation of traveli
ng pulsing waves in a two-phase flow problem.