This is one of the most commented-on works of Burns, and his precise contribution to the vulgate form of the song is controversial. In the Scots Musical Museum Burns used a letter-code to ("X", "Z", and one or two others, if I recall rightly) to indicate the extent of his modifications to prior material. I can't remember what code he attached to ALSyne. He also mentioned the lyric once or twice in letters. My impression is that this issue is complicated by: (1) the fact that Burns transmitted more than one version of the lyric, and (2) Burns scholars' desire to attribute as much of the vulgate version to Burns rather than his sources.
I leave it to Bruce O. to set out the details. For now I'll just mention that an edition of one of Playford's books circa 1700 contains a melody called something like "For old lang Ine my Jo".