Agreed. I think (bugs/LOC) could even work.
That might be better, but it would still be misleading. "Denser" languages would have more bugs per line, but also fewer lines per program.
I've never used APL and wouldn't want to debug it, but its bug-to-line ratio could be much higher than Java and still come out ahead in practice.
APL is considered by many a write-only language.
Edit: Figured it out (total bugs / repo). Seems like controlling for overall project size is an important missing component of this analysis.