This gist comprises of the code that i use to answer this SO question: http://stackoverflow.com/questions/17584008/find-most-common-value-from-hashmap-of-set-in-java