I would just clone the repository and use something like cloc. It gives LOC and comments for any project structure (as well as what language the LOC is in).
Then you just need to visit whatever issue tracking service they use to find the number of bugs for a given release. Releases are probably tagged in their SCM, so you could do this for any arbitrary project/release.
Firefox may be a little hard because they use one giant repo for nearly everything (Thunderbird, Firefox OS, etc.).