buried treasureA surprising piece of code found in some program. While usually not wrong, it tends to vary from crufty to bletcherous, and has lain undiscovered only because it was functionally correct, however horrible it is. Used sarcastically, because what is found is anything *but* treasure. Buried treasure almost always needs to be dug up and removed. "I just found that the scheduler sorts its queue using bubble sort! Buried treasure!" [Jargon File]
Bureau International des Poids et Mesures ♦ Burge's Language ♦ buried treasure ♦ burn-in ♦ burn-in period
Try this search on Wikipedia, Wiktionary, Google, OneLook.