The following line is shown twice instead of once in foreign::write.dta() help files:
If the "val.labels" attribute contains a string vector with a string label for each variable then this is written as the variable labels. Otherwise the variable names are repeated as variable labels.
E.g. see here: https://stat.ethz.ch/R-manual/R-devel/library/foreign/html/write.dta.html
The line isn't repeated: one says "val.labels", one says "var.labels". I don't know the code well enough to know if both are supposed to be there.
val.labels are documented earlier on (differently, since that attribute is about value labels ~= factor levels), so that block of text should likely be dropped.