Extract the properties according to the property prefix, will remove the extracted properties from original properties.

@param propertyPrefix
@param properties
@return
971509
protected Map<String, String> extract(String propertyPrefix, Map<String, String> properties) {
        return extract(propertyPrefix, properties, true);
    }
70042
@SuppressWarnings({ "rawtypes", "unchecked" })
	@Override
	public PrefixedPropertiesEnumeration<?> propertyNames() {
		lock.readLock().lock();
		try {
			final Set result = new HashSet();
			for (final Object key : getKeyMap(false).keySet()) {
				result.add(getUnprefixedKey(key));
			}
			return new PrefixedPropertiesEnumerationImpl(result.iterator(), true);
		} finally {
			lock.readLock().unlock();
		}
	}
45950
protected Map<String, String> extract(String propertyPrefix, Map<String, String> properties, boolean removeProps) {

        if (null == properties || properties.isEmpty()) {
            return Collections.<String, String> emptyMap();
        }

        Map<String, String> extractProps = new HashMap<String, String>();

        Iterator<Map.Entry<String, String>> propIter = properties.entrySet().iterator();
        while (propIter.hasNext()) {
            Map.Entry<String, String> propEntry = propIter.next();
            if (null != propEntry.getKey() && propEntry.getKey().startsWith(propertyPrefix)) {
                String propKey = propEntry.getKey().substring(propertyPrefix.length());
                extractProps.put(propKey, propEntry.getValue());
                if (removeProps) {
                    propIter.remove();
                }
            }
        }
        return extractProps;
    }
695619
public MYSELF defaultValueProperty(String... properties) {
		for (String prop : properties) {
			String propertyKey = BuilderUtils.isExpression(prop) ? BuilderUtils.getPropertyKey(prop) : prop;
			this.defaultValueProperties.add(propertyKey);
		}
		return myself;
	}
614378
public static Proxy forPropertiesOpt(String prefix) {
        String host;
        String port;
        Proxy result;

        host = System.getProperty(prefix + ".proxyHost");
        if (host == null) {
            return null;
        }
        port = System.getProperty(prefix + ".proxyPort");
        if (port == null) {
            throw new IllegalStateException("missing proxy port for host " + host);
        }
        result = new Proxy(host, Integer.parseInt(port));
        result.excludes.addAll(NON_PROXY_SEP.split(System.getProperty(prefix + ".nonProxyHosts", "")));
        return result;
    }
213827
private static String extractPropertyName(Method method, String prefix) {
        String name = method.getName();
        if (!name.startsWith(prefix)) {
            return null;
        }
        if (name.length() == prefix.length()) {
            return "";
        }
        name = name.substring(prefix.length());
        if (!Character.isUpperCase(name.charAt(0)) || name.indexOf('$') >= 0) {
            return null;
        }

        // Decapitalize the name only if it doesn't begin with two uppercase
        // letters.

        if (name.length() == 1 || !Character.isUpperCase(name.charAt(1))) {
            char chars[] = name.toCharArray();
            chars[0] = Character.toLowerCase(chars[0]);
            name = new String(chars);
        }

        return name.intern();
    }
251034
protected String getRootPropertyName(String propertyName) {
		int location = propertyName.indexOf(PROPERTY_KEY_PREFIX);
		return location == -1 ? propertyName : propertyName.substring(0, location);
	}
1091449
function(properties) {
            var key, newKey,
                remapped = {},
                axisProps = this.filterPropsByRegex(properties, /(axisX|primaryAxis|axisLabelsX|axisTitleX|gridLinesX)/);
            for(key in axisProps) {
                if(axisProps.hasOwnProperty(key)) {
                    if(!this.xAxisKeyIsTrumped(key, properties)) {
                        newKey = key.replace(/(axisX|primaryAxis)/, "axis");
                        newKey = newKey.replace(/axisLabelsX/, "axisLabels");
                        newKey = newKey.replace(/axisTitleX/, "axisTitle");
                        newKey = newKey.replace(/gridLinesX/, "gridLines");
                        remapped[newKey] = axisProps[key];
                    }
                }
            }
            return remapped;
        }
1342611
protected String getPropertyValue(String prefix, String postfix) {
    String ret = properties.getProperty(prefix + "." + postfix);
    if (ret != null) {
      // logger.debugFine("Found property: "+prefix + "." +
      // postfix+" for "+prefix);
      return ret;
    }
    int pos = prefix.length();
    while (pos > 0) {
      pos = prefix.lastIndexOf('.', pos - 1);
      if (pos <= 0) {
        break;
      }
      ret = properties.getProperty(prefix.substring(0, pos) + '.' + postfix);
      if (ret != null) {
        // logger.debugFine("Found property: "+prefix.substring(0, pos) + "." +
        // postfix+" for "+prefix);
        return ret;
      }
    }
    ret = properties.getProperty(postfix);
    if (ret != null) {
      // logger.debugFine("Found property: "+postfix+" for "+prefix);
      return ret;
    }
    return null;
  }
337504
public static Properties getProps(Properties props, String name, Properties defaultProperties) {
        final String propString = props.getProperty(name);
        if (propString == null) return defaultProperties;
        String[] propValues = propString.split(",");
        if (propValues.length < 1) {
            throw new IllegalArgumentException("Illegal format of specifying properties '" + propString + "'");
        }
        Properties properties = new Properties();
        for (int i = 0; i < propValues.length; i++) {
            String[] prop = propValues[i].split("=");
            if (prop.length != 2) throw new IllegalArgumentException("Illegal format of specifying properties '" + propValues[i] + "'");
            properties.put(prop[0], prop[1]);
        }
        return properties;
    }
624664
private <T extends AnnotatedElement> Map<T, PropertyInfo> resolveProperty(String keyPrefix, T element) {
        Map<T, PropertyInfo> result = new HashMap<>();
        if (!shouldDecorate(element)) {
            return result;
        }

        String key = getKey(keyPrefix, element);
        String defaultValue = getPropertyDefaultValue(element);
        String stringValue = compiled.getProperty(key, defaultValue);

        if (stringValue == null) {
            checkRequired(key, element);
            return result;
        }

        Object value = convertValue(element, stringValue);
        result.put(element, new PropertyInfo(key, stringValue, value));
        return result;
    }
419753
public void loadProperties(String prefix) {
        List<Property> props = null;
        
        try {
            props = getListByPrefix(prefix);
        } catch (Exception e) {
            log.error("Error retrieving properties with prefix: " + prefix, e);
            return;
        }
        
        for (Property prop : props) {
            if (prop.getName() != null) {
                this.properties.put(prop.getName(), prop);
            }
        }
    }
1171298
private String extractPrefix(ApplicationContext context,
			ConfigurationBeanFactoryMetadata beanFactoryMetaData, String beanName) {
		ConfigurationProperties annotation = context.findAnnotationOnBean(beanName,
				ConfigurationProperties.class);
		if (beanFactoryMetaData != null) {
			ConfigurationProperties override = beanFactoryMetaData
					.findFactoryAnnotation(beanName, ConfigurationProperties.class);
			if (override != null) {
				// The @Bean-level @ConfigurationProperties overrides the one at type
				// level when binding. Arguably we should render them both, but this one
				// might be the most relevant for a starting point.
				annotation = override;
			}
		}
		return annotation.prefix();
	}
1276399
@SuppressWarnings("unchecked")
    public StorableIndex<S> buildPkIndex(String... propertyNames) {
        Map<String, ? extends StorableProperty<S>> map = getAllProperties();
        int length = propertyNames.length;
        StorableProperty<S>[] properties = new StorableProperty[length];
        Direction[] directions = new Direction[length];
        for (int i=0; i<length; i++) {
            String name = propertyNames[i];
            char c = name.charAt(0);
            Direction dir = Direction.fromCharacter(c);
            if (dir != Direction.UNSPECIFIED || c == Direction.UNSPECIFIED.toCharacter()) {
                name = name.substring(1);
            } else {
                // Default to ascending if not specified.
                dir = Direction.ASCENDING;
            }
            if ((properties[i] = map.get(name)) == null) {
                throw new IllegalArgumentException("Unknown property: " + name);
            }
            directions[i] = dir;
        }
        return new StorableIndex<S>(properties, directions, true, true);
    }
776277
public List<RawProperty> removeExperimentalProperties(String name) {
		List<RawProperty> all = getExperimentalProperties();
		List<RawProperty> toRemove = new ArrayList<RawProperty>();
		for (RawProperty property : all) {
			if (property.getName().equalsIgnoreCase(name)) {
				toRemove.add(property);
			}
		}

		all.removeAll(toRemove);
		return Collections.unmodifiableList(toRemove);
	}
411250
private static boolean propMatchesPrefix(String prefix, String key) {
        return key.startsWith(prefix) && key.length() >= prefix.length();
    }
800712
public static Map<String, ?> getMapFromProperties(Properties properties, String prefix) {
        Map<String, Object> result = new HashMap<String, Object>();
        for (String key : properties.stringPropertyNames()) {
            if (key.startsWith(prefix)) {
                String name = key.substring(prefix.length());
                result.put(name, properties.getProperty(key));
            }
        }
        return result;
    }