The oxymoron "safety by accident" came up in a conversation. It sounded very natural in context when we first mentioned it, and then we stopped for a second and realized it was kind of silly. The idea was that some code was flawed, but some unrelated thing just so happened to conveniently prevented the bug.
Some examples:
Code like this can be a maintenance nightmare; because while the behavior may be technically correct for current usage patterns, it's very brittle as usage patterns change.
Here's a simple example of 2 bugs nullifying each other:
static bool IsPositive(int x) { return x < 0; // bug #1, wrong check } static bool IsPositive(string s) { int x = -int.Parse(s); // Bug #2, parse gives inverted value. return IsPositive(x); }