Replace ArrayUtils.(copyOf, copyOfRange) to Arrays.(copyOf, copyOfRange)
Replace boolean array to Bitset.
Use StringBuilder instead of StringBuffer.
Fix String concat in StringBuilder.append parameter.
Use StringBuilder instead of StringBuffer.