Collection<String> (Collection<String> settingNames) { Set<String> commonFields = new HashSet<>(); for (String fieldName : settingNames) { SettingsGroup settingsGroup = getAssociatedSettingsGroup(fieldName); if (settingsGroup == null) { commonFields.add(fieldName); } else if (!Strings.areSameInstance(settingsGroup.title(), getInstance().WRAPPING_KEEP)) { commonFields.addAll(settingsGroup.commonCodeStyleSettingFieldNames()); } } return commonFields; }