Refactor getLinesToBeCovered

The `getLinesToBeCovered` and `getLinesToBeUsed` method seemed to be trying to do similar things, but in a very dissimilar fashion.  This helps get them in tune with each other so that some common functionality can be pulled out (e.g., #1222).