Some versions of the Oracle/Sun implementation may have an issue with Long.bitCount(), see:
[Java 6] Wrong results from basic comparisons after calls to Long.bitCount(long)
pmd : XPathRule_1339015068
See Bug ID : 7063674
So, for safety, we have copied the source used for the openJDK7 implementation as a replacement to the use of Long.bitCount().