These two helper methods are expected to have the same behaviour. However, Strings#splitStringByCommaToSet trims the leading and trailing whitespace of the substrings, while Strings#splitStringByCommaToArray reserves them. This subtle difference can lead to unexpected bugs (For example #27708).