Wiktionary
contrafactum
n. 1 (context music English) The substitution of one text for another without substantial change to the music. 2 (context music English) The use of a secular melody with a religious text.
Wikipedia
Contrafactum
In vocal music, contrafactum (pl. contrafacta) is "the substitution of one text for another without substantial change to the music".