Java implementations of the Misra-Gries algorithm and a modified and generalized FrequentPairsMiner algorithm