A stale joke. In The Broken Sword, an old melodrama by William Dillon, Captain Xavier is for ever telling the same jokes with variations. He was telling about one of his exploits connected with a cork-tree, when Pablo corrects him, “A chestnut-tree you mean, captain.” “Bah! (replied the captain) I say a cork-tree.”
“A chestnut-tree,” insists Pablo. “I must know better than you (said the captain); it was a cork-tree, I say.”
“A chestnut (persisted Pablo). I have heard you tell the joke twenty-seven times, and I am sure it was a chestnut.”
“Is not this an illustration of the enduring vitality of the `chestnut'? [joke].” —Notes and Queries.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Chestnut from Fact Monster: