This tune was first published as The Arran Boat Song around 1875 in James Kerr's first Merry Melodies volume. Is is named after the Scottish Arran Islands and not the Irish Aran Islands, and is usually played as an air and not a jig. It is also known as The Highland Boat Song and Queen Mary’s Escape From Loch Leven Castle. The latter is a song that commemorates the escape of Mary, Queen of Scots, from Loch Leven Castle in 1568, which "involved drugging half the island with hearty doses of wine whilst young Willie Douglas pegged all the boats to the shore bar one." See the last link below for the details. Note that the tune is built in units of 9 measures; the final note in each part is held for an extra measure.
The B and C parts of this tune were originally an older tune called Bill Groggin's Goat or Barney's Goat or "S Óró 'Thaidhg, a Ghrá", dating back as far as the 16th century. The A part was possibly written by Tommy Potts, but it is very similar to a tune called Bothar an gCloch that dates from the 18th century or earlier. The Butterfly was used as the theme song for the movie The Secret of Roan Inish.