Bug magnet
The term bug magnet in software development refers to a block of code which is so infrequently invoked that it is extremely prone to containing errors. The likelihood that it contains a defect may outweigh its value.
An example of a bug magnet is fault-recovery handlers in an embedded control system. Given that this recovery code is typically only invoked in the presence of the fault, the fault handler is rarely invoked during testing phases of software development, and throughout deployment.
If the fault recovery code itself fails, then the running state of the system May Be compromised indefinitely. In this situation, the system may have had a greater probability of recovering from the fault by a brute force crash and restart, than to have a defect-prone fault recovery handler.
One remedy to avoid bug magnets is to increase test coverage, the proportion of the code and functionality that is tested by unit or regression tests.