A helper function used by the {@link #getSubProperties} methods.
1863
protected static void extractSubProperties (Properties source, Properties dest, String prefix)
    {
        // extend the prefix to contain a dot
        prefix = prefix + ".";
        int preflen = prefix.length();

        // scan the source properties
        Enumeration<?> names = source.propertyNames();
        while (names.hasMoreElements()) {
            String name = (String)names.nextElement();
            // skip unrelated properties
            if (!name.startsWith(prefix)) {
                continue;
            }
            // insert the value into the new properties minus the prefix
            dest.put(name.substring(preflen), source.getProperty(name));
        }
    }
316837
Properties getProperties(String prefix, boolean removePrefix) {
		Properties result = new Properties();
		for (String key : getPropertyNames()) {
			if (key.startsWith(prefix)) {
				result.put((removePrefix) ? key.substring(prefix.length()) : key, getProperty(key));
			}
		}
		return result;
	}
536363
private static String getSubType(Class type, String propertyName) {
		@SuppressWarnings("unchecked")
		Class normalizedType = SimonTypeFactory.normalizeType(type);
		if (normalizedType == null) {
			return null;
		} else {
			return subTypeProperties.getProperty(normalizedType.getName() + "." + propertyName);
		}
	}
1346694
@Override
  public final Set<String> getOwnPropertyNames() {
    if (prototypeSlot == null) {
      return super.getOwnPropertyNames();
    } else {
      ImmutableSet.Builder<String> names = ImmutableSet.builder();
      names.add("prototype");
      names.addAll(super.getOwnPropertyNames());
      return names.build();
    }
  }
845832
public List<RawProperty> getExperimentalProperties(String name) {
		/*
		 * Note: The returned list is not backed by the parent component because
		 * this would allow RawProperty objects without the specified name to be
		 * added to the list.
		 */
		List<RawProperty> toReturn = new ArrayList<RawProperty>();
		for (RawProperty property : getExperimentalProperties()) {
			if (property.getName().equalsIgnoreCase(name)) {
				toReturn.add(property);
			}
		}
		return Collections.unmodifiableList(toReturn);
	}
836476
public Set<ElementDescriptor<?>> getPropertyDescriptors()
	{
		return mProperties == null ? null : Collections.unmodifiableSet(mProperties.keySet());
	}
1078984
public Map<String, Object> getProperties() {
        Map<String, Object> localProps = myProps;
        if (localProps == null) {
            localProps = new HashMap<String, Object>();
            if (config != null && !config.isEmpty()) {
                for (Map.Entry<String, Object> entry : config.entrySet()) {
                    if (entry.getValue() instanceof String) {
                        localProps.put(entry.getKey(), entry.getValue());
                        continue;
                    }
                    if (entry.getValue() instanceof Boolean) {
                        Boolean boolVal = (Boolean) entry.getValue();
                        localProps.put(entry.getKey(), boolVal.toString());
                        continue;
                    }
                    if (entry.getValue() instanceof Integer) {
                        Integer IntVal = (Integer) entry.getValue();
                        localProps.put(entry.getKey(), IntVal.toString());
                        continue;
                    }
                }
            }
            myProps = localProps;
        }
        return localProps;
    }
922031
private <T extends Property> Map<String, String> getOverriddenImplementationConfiguration(
            Collection<T> overridableProperties) {

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

        overridableProperties.forEach(p -> {
            String val = getProperty(p, null);
            if (val != null) {
                ret.put(p.getPropertyName(), val);
            }
        });

        implementationConfiguration.forEach(ret::putIfAbsent);

        return ret;
    }
935890
public Map<String,Object> getProperties()
    {
        Map<String,Object> properties = new Hashtable<String,Object>();
        ParamDispatcher params = this;
        for (Enumeration<String> e = params.keys() ; e.hasMoreElements() ;)
        {
            String strKey = e.nextElement();
            String strValue = params.get(strKey).toString();
            properties.put(strKey, strValue);
        }
        return properties;
    }
984227
public static Map<String,Collection<VarBindingDef>> getPropertiesUnused( FunctionInputDef function)
    {
    Map<String,Collection<VarBindingDef>> sources = getPropertySources( function);
    Collection<String> unused = CollectionUtils.subtract( sources.keySet(), getPropertyReferences( function).keySet());

    return
      sources.entrySet().stream()
      .filter( entry -> unused.contains( entry.getKey()))
      .collect( toMap( entry -> entry.getKey(), entry -> entry.getValue()));
    }
850988
function getSubField (field, index, property) {
    // get list of sub fields by index
    var fields = field.values.length > index
        ? field.values[index]
        : field.fields
    // find field for property
    return _.find(fields, field => field.property === property)
}
1324572
public Properties toProperties() {
        Properties props = new Properties();
        flatten(props);

        props = convertValuesToString(props);

        return props;
    }
735284
public java.util.Map<String, java.util.List<String>> getSubstitutions() {
        return substitutions;
    }
734504
public Map<String, Object> getProperties()
    {
        Record recUserRegistration = this.getUserRegistration();
        return ((PropertiesField)recUserRegistration.getField(UserRegistrationModel.PROPERTIES)).getProperties();
    }
873674
private List<String> existingDangerousProperties() {
        String[] lines = propertiesReader();
        List<String> propertiesFound = new ArrayList<>();
        for (String line : lines) {
            for (String key : DANGEROUS_PROPERTIES.keySet()) {
                if (line.contains(key) && line.contains(DANGEROUS_PROPERTIES.get(key))) {
                    propertiesFound.add(line);
                }
            }
        }
        return propertiesFound;
    }
1125401
@InterfaceAudience.Public
    public Map<String, Object> getUserProperties() {

        Map<String, Object> result = new HashMap<String, Object>();

        Map<String, Object> sourceMap = getProperties();
        for (String key : sourceMap.keySet()) {
            if (!key.startsWith("_")) {
                result.put(key, sourceMap.get(key));
            }
        }
        return result;
    }
63269
public final Set<String> getPropertyNames() {
    Set<String> props = new TreeSet<>();
    collectPropertyNames(props);
    return props;
  }