The petitions at the end of the hymn (beginning Salvum fac populum tuum) are a selection of verses from the book of Psalms, appended subsequently to the original hymn.
The repetitions come from Psalms. They are at the end of the hymn.