This song these days is usually sung as the second part of "I've Been Working On the Railroad," but it was a separate song. "The words and a different melody appear under the title Old Joe, or Somebody in the House with Dinah published by Duncomb, 10 Middle Row, Holborn, London, ca. 1835-1848, the 'music composed' by J.H. Cave. [...] As the late Sigmund Spaeth pointed out to the author [James J. Fuld], the melody is basically an embellishmet of the melody of Goodnight Ladies." (James J. Fuld, The Book of World-Famous Music, 4th ed., Dover, 1995, pp. 513-514).
~Masato