Filters a list of {@code settings} by a given {@code description}.

@param settings    the list of settings to be filtered
@param description to be searched for
@return a list of {@code settings}, containing (ignoring case) the given {@code description}
345663
public static List<Setting> filterSettingsByDescription(List<Setting> settings,
                                                          String description) {
    return settings.stream()
        .filter(setting -> containsIgnoreCase(setting.getDescription(), description))
        .collect(Collectors.toList());
  }
422234
public static Filter matchMethodDescription(final Description desiredDescription) {
        return new Filter() {
            @Override
            public boolean shouldRun(Description description) {
                if (description.isTest()) {
                    return desiredDescription.equals(description);
                }

                // explicitly check if any children want to run
                for (Description each : description.getChildren()) {
                    if (shouldRun(each)) {
                        return true;
                    }
                }
                return false;
            }

            @Override
            public String describe() {
                return String.format("Method %s", desiredDescription.getDisplayName());
            }
        };
    }
1155017
public ConfigurationMetadata visitProperties(T type,
                                                 @Nullable String description) {

        String path = buildTypePath(type, type);
        ConfigurationMetadata configurationMetadata = new ConfigurationMetadata();
        configurationMetadata.name = NameUtils.hyphenate(path, true);
        configurationMetadata.type = getTypeString(type);
        configurationMetadata.description = description;
        this.configurations.add(configurationMetadata);
        return configurationMetadata;
    }
680501
public static <T> List<T> filter(Collection<T> c, Filter<T> filter){
        if(c.size()==0)
            return Collections.emptyList();

        List<T> filteredList = new ArrayList<T>(c.size());
        for(T element: c){
            if(filter.select(element))
                filteredList.add(element);
        }
        return filteredList;
    }
645044
public static Setting of(String description, BooleanProperty property) {
    return new Setting<>(
        description,
        Field.ofBooleanType(property)
            .label(description)
            .render(new ToggleControl()),
        property
    );
  }
821448
public JRecordExtractor<T, SparseLabeledPoint>
  extractWithSettingsSparseLabeledPoint(String settings) {
    return new JRecordExtractor<>(JavaOps.extractWithSettingsSparseLabeledPoint(self, settings));
  }
521242
public void setDescription(String description) {
		if (!StringUtils.equals(this.description, description)) {
			this.description = description;
			fireChange();
		}
	}
501257
public static PluralRules parseDescription(String description)
            throws ParseException {

        description = description.trim();
        return description.length() == 0 ? DEFAULT : new PluralRules(parseRuleChain(description));
    }
535496
private Map<String, Set<String>> getSourceProperties(ModelDescription description) {
        Map<String, Set<String>> result = new LinkedHashMap<String, Set<String>>();
        try {
            Class<?> sourceModel = registry.loadModel(description);
            while (sourceModel != null && !sourceModel.equals(Object.class)) {
                for (Field field : sourceModel.getDeclaredFields()) {
                    result.put(field.getName(), new HashSet<String>());
                }
                sourceModel = sourceModel.getSuperclass();
            }
        } catch (ClassNotFoundException e) {
            LOGGER.error("Unable to load model {}", description);
            return result;
        }
        return result;
    }
1288548
public JRecordExtractor<T, Example>
  extractWithSubsetSettingsExample(String settings) {
    return new JRecordExtractor<>(JavaOps.extractWithSubsetSettingsExample(self, settings));
  }
567049
public void setDescription(CmsObject cms, String description) {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(description)) {
            m_description = "";
            if (m_element.element(PARAM_DESCRIPTION) != null) {
                m_element.remove(m_element.element(PARAM_DESCRIPTION));
            }
        } else {
            m_description = description;
            description = CmsEncoder.escapeWBlanks(description, CmsEncoder.ENCODING_UTF_8);
        }
        setParameterValue(cms, PARAM_DESCRIPTION, description);
    }
56257
@Programmatic // not part of metamodel
    public List<Gmap3ToDoItem> autoComplete(final String description) {
        // the JDO implementation ...
        return repositoryService.allMatches(
                new QueryDefault<>(Gmap3ToDoItem.class,
                        "todo_autoComplete", 
                        "ownedBy", currentUserName(), 
                        "description", description));
    }
1049350
public String format(Description description) {
		for (BlockElement blockElement : description.getBlocks()) {
			blockElement.format(this);
		}
		return finalizeFormatting();
	}
310865
@Override
    public void setDescription(final String description) {
        if (this.description == null) {
            this.description = new SyndContentImpl();
        }
        this.description.setValue(description);
    }
686505
@Override
	public List<ScopDescription> filterByDescription(String query) throws ScopIOException {
		try {
			ensureDesInstalled();
		} catch (IOException e) {
			throw new ScopIOException(e);
		}

		query = query.toLowerCase();
		List<ScopDescription> matches = new ArrayList<ScopDescription>();
		for (Integer i : sunidMap.keySet()){
			ScopDescription sc = sunidMap.get(i);

			if( sc.getDescription().toLowerCase().startsWith(query)){
				matches.add(sc);
			}
		}

		return matches;
	}
167046
public List<Description> order(Collection<Description> descriptions)
            throws InvalidOrderingException {
        List<Description> inOrder = ordering.orderItems(
                Collections.unmodifiableCollection(descriptions));
        if (!ordering.validateOrderingIsCorrect()) {
            return inOrder;
        }

        Set<Description> uniqueDescriptions = new HashSet<Description>(descriptions);
        if (!uniqueDescriptions.containsAll(inOrder)) {
            throw new InvalidOrderingException("Ordering added items");
        }
        Set<Description> resultAsSet = new HashSet<Description>(inOrder);
        if (resultAsSet.size() != inOrder.size()) {
            throw new InvalidOrderingException("Ordering duplicated items");
        } else if (!resultAsSet.containsAll(uniqueDescriptions)) {
            throw new InvalidOrderingException("Ordering removed items");
        }

        return inOrder;
    }
910323
public CreateWebhookParams description(String description) {
        String value = (description==null) ? "" : description;
        parameters.add(new NameValuePair("description", value));
        return this;
    }