question: private static Set < String > createCategoriesSet ( Set < String > categories ) { Set < String > result = new HashSet < > ( ) ; for ( String cat : categories ) { result . add ( StringUtil . toLowerCase ( cat ) ) ; } return result ; }
target:  Creates a new Set with the given categories, making them all lowercase in the process. Duplicate categories that were only differentiated by case will of course be reduced to one lowercase one by the Set.