This is an interesting tune to play as it neatly straddles Scottish traditional music and baroque music. "Johnny, Cock Thy Beaver" is a jig, variously identified as Scottish and Northumbrian and appearing in many tune collections under a number of similar names, all of them sounding vaguely rude although the Fiddler's Companion assures us that "The title refers to a beaver top-hat, popular in the late 18th and early 19th century among fashionable men; to ‘cock up’ in this sense would be either to wear it at a rakish angle, to tip it or to brush it so as to make it more presentable." I am not sure I entirely believe that, and even if that was the original meaning surely fiddlers have been sniggering for centuries. The Fiddler's Companion has four somewhat different ABC transcriptions of traditional versions and also says that Carolan wrote variations of this tune, which are No. 204 in the Sullivan edition of Carolan's work.
Notwithstanding the tune's solid traditional credentials, it is now part of the classical/baroque repertoire more than the folk/Celtic repertoire, in the form of a set of nine baroque variations for violin or flute, set to a ground bass. These variations were published by John Playford (of Dancing Master fame) in "The Division Violin" in 1684/85 and a few years later virtually identically in "The Division Flute". Many tunes from these collections are played and recorded regularly by Early Music and baroque groups, including this one.
There are at least two free modern transcriptions on the web, as well as a facsimile scan of the 1685 book at IMSLP. I was using the Mutopia transcription, which is fine but has a missing bar in the ground bass (a mistake from the original book which was not picked up by the transcriber). The IMSLP transcription isn't as pretty but has that mistake corrected:
I've recorded all nine variations on the tune on my Embergher bowlback, playing the bass on my Troubadour bouzouki, tuned down to F. I had to raise the occasional low D by an octave to put it in the range of the zouk. I have taken the initial theme quite slowly so that I can play the later variations, which are a lot more intricate, at the same tempo.