private void setFrom(String prefix, Properties originalProperties, QueryProfileType arguments, Map<String, String> context) {
        prefix = append(prefix, getPrefix(arguments).toString());
        for (FieldDescription field : arguments.fields().values()) {
            if (field.getType() == FieldType.genericQueryProfileType) { // Generic map
                String fullName = append(prefix, field.getCompoundName().toString());
                for (Map.Entry<String, Object> entry : originalProperties.listProperties(CompoundName.from(fullName), context).entrySet()) {
                    properties().set(CompoundName.from(append(fullName, entry.getKey())), entry.getValue(), context);
                }
            }
            else if (field.getType() instanceof QueryProfileFieldType) { // Nested arguments
                setFrom(prefix, originalProperties, ((QueryProfileFieldType)field.getType()).getQueryProfileType(), context);
            }
            else {
                CompoundName fullName = prefix.isEmpty()
                        ? field.getCompoundName()
                        : CompoundName.from(append(prefix, field.getCompoundName().toString()));
                Object value = originalProperties.get(fullName, context);
                if (value != null) {
                    properties().set(fullName, value, context);
                }
            }
        }
    }
For each field in the given query profile type, take the corresponding value from originalProperties
(if any) set it to properties(), recursively.
container-search/src/main/java/com/yahoo/search/Query.java