If we extract it to a function `int getLineCount(clang::SourceRange sourceRange, const clang::SourceManager& sourceManager)` we can replace 
* `LongClassRule::getNumberOfLines`,
* `LongMethodRule::getCompoundStmtLength` and
* `PreferEarlyExitRule::getLineCount`

with calls like `getLineCount(stmtOrDecl->getSourceRange(), _carrier->getSourceManager());`

We could also extract it to a base class (which one?) or even `RuleCarrier` and avoid passing second parameter.