Fair, the codebase might be more accurately described as the patient and the bug is the ailment it's being treated for.
The original idea of the metaphor is that a "github issue" is a patient that enters the hospital, gets "treated" (by being resolved), then leaves the hospital. The metaphor gets mixed up when we start using the word "bug" and "github issue" interchangeably.