The zemer Dror Yikra (דרור יקרא), one of my personal favorites, is attributed to Dunash ben Labrat of the 10th century. I've noticed a number of minor textual variations of differing significance (e.g. לבן ולבת vs. לבן עם בת). In fact it is possible in many cases to judge which are preferable.
Dunash apparently innovated the Sephardic use of meter in Hebrew poetry. A typical stanza is as follows:
אלקים תן במדבר הר \ הדס שטה ברוש תדהר \ ולמזהיר ולנזהר \ שלומים תן כמי נהר
Examining the vowels of each verse, we see that they adhere to the pattern "sLLLsLLL" where "s" stands for a "short" vowel, meaning a shva or hataf, and "L" a "long" vowel, in this case anything else.1
Knowing this, some textual variations are preferable to others. For example, שמור שבת קדושך has two short vowels, while שמור שבת קדשך only has one, so the former is more likely to be the original wording.2
The following is my reconstruction of the original text of the zemer, with variants noted:
דרור יקרא לבן *עם ־בת
וינצרכם כמו בבת
נעים שמכם ולא ישבת
שבו **נוחו ביום שבת
דרוש נוי ואולמי
ואות ישע עשה עמי
נטע שורק בתוך כרמי
שעה שועת בני עמי
דרוך פורה בתוך בצרה
וגם *בבל אשר **גברה
נתוץ צרי באף ***עברה
שמע קולי ביום אקרא
אלקים תן *בְמדבר הר
הדס שטה ברוש תדהר
שלומים תן כמי נהר
הדוך קמי *[חי] קל קנא
**במוג לבב ***ובִמגינה
ונרחיב פה ****נמלאנה
לשוננו לך רנה
דעה חכמה לנפשך
והיא כתר לראשך
נצור מצות *קדושך
שמור שבת **לקדשך
A few comments:
It first must be noted that must be noted that initial ו counts as short even when it is a shuruq, e.g. in the ובמגינה. This ו cannot possibly be removed as with (ו)נמלאנה, since במגינה would then begin with hiriq rather than shva.
Now I am not sure whether such ו may ever count as a long vowel. I suspect not, given that I have heard initial וּ pronounced as [wə] in Iraqi Hebrew, suggesting that perhaps this was the pronunciation Dunash used. If this hypothesis is true, then ולבת is certainly dispreferred.
The בבל/אדום alternation is interesting. Not only is בבל preferable metrically, but also it seems more apropos thematically. Botzra is traditionally identified with Edom, so the Christianity-Islam parallel of בצרה-בבל seems more appropriate than the redundant בצרה-אדום.
The immediately following word גברה is problematic, as it contains a vocal shva. However I have not seen any textual variations of this word, so for now it must stay as is.
The fifth stanza contains two difficult elements. First, the word חי is omitted in many editions. Barring the existence of other versions the question here is whether it is preferable to use a long vowel where there should be a short vowel, or to omit the syllable all together. I cannot judge in this case.
In the following verse, I found one instance of מוּג (rather than מוֹג). I am not sure whether this is hypercorrection towards the text of Ezekiel 21:20 or in fact a traditional variant. Regardless, the meter does not prefer one over the other.
Regarding נמלאנה and ונמלאנה, both are equally good metrically. I have chosen נמלאנה as more likely only because it fits less well grammatically and shows less parallel phonetically with the preceding ובמגנה, making it more likely to have been corrected after the zemer was composed. However it is possible that ו was original and at some point elided by analogy with other phrases like "באף עברה" and "שבו נוחו".
The situation in the last stanza is particularly complicated. In my experience the most common combination is קדושך-קדשך. The other combinations I have found are: קדושך-לקדשך and אלקיך-קדושך. The latter seems preferable poetically as well as metrically, avoiding root duplication. However it breaks the rhyme scheme of the zemer, whereby the last syllable of each verse in a stanza matches. קדושך-קדשך lacks a syllable, while קדושך-לקדשך contains an extra vocal shva. Also notable is the phonetic similarity of קדשך and לקדשך, especially given that Dunash himself may not have distinguished between patah and qamatz (see next paragraph). I am weakly inclined to chose קדושך-לקדשך, especially given that we see one other possible instance of an extra short syllable (גברה, see above). However this leaves open the question of how the jump from קדושך-לקדשך to the moderately different אלקיך-קדושך could have occurred. Additionally if the phrase הדוך קמי קל קנא did not contain the word "חי in the zemer originally then there is also precedent for dropping a long syllable, making קדושך-קדשך more likely.
Finally, I would like to point out one other interesting, if tangential, detail in this zemer. The syllables בַת-בָת, רה-רא, נה-נא are all rhymed with each other. I will leave the potential significance of this to another post.
1Caveat one: I do not know whether hatafs were pronounced distinctly in Dunash's time, or whether the meter was solely orthographic.
2Caveat two: It is possible that the original text was problematic metrically and then "fixed" later on in some editions. This is conceivable given that the correct variants tend to be less grammatical, e.g. נוחו, עברה, בְמדבר. However it is also possible that the original version was metrically correct, and was later adjusted to be more euphonic. I think the latter is more likely, given that Dunash was criticized for letting meter take precedence over grammar.