Two songs, not one. Hugill even gives two different tunes, though he does say they're interchangeable. I believe the first appearance of the Liverpool-Cork-NYC lyrics was in David W. Bone's "Capstan Bars" in 1931.