Should model what is set as default in the oidc.server metatype.xml
178467
private static void setDefaultDiscoveryProperties() {
        defaultDiscoveryProperties.put(KEY_OIDC_RESPONSE_TYPES_SUPP, new String[] { "code", "token", "id_token token" });
        defaultDiscoveryProperties.put(KEY_OIDC_SUB_TYPES_SUPP, new String[] { "public" });
        defaultDiscoveryProperties.put(KEY_OIDC_ID_TOKEN_SIGNING_ALG_VAL_SUPP, new String[] { "HS256" });
        defaultDiscoveryProperties.put(KEY_OIDC_SCOPES_SUPP, new String[] { "openid", "general", "profile", "email", "address", "phone" });
        defaultDiscoveryProperties.put(KEY_OIDC_CLAIMS_SUPP,
                new String[] { "sub", "groupIds", "name", "preferred_username", "picture", "locale", "email", "profile" });
        defaultDiscoveryProperties.put(KEY_OIDC_RESP_MODES_SUPP, new String[] { "query", "fragment", "form_post" });
        defaultDiscoveryProperties.put(KEY_OIDC_GRANT_TYPES_SUPP, new String[] { "authorization_code", "implicit", "refresh_token", "client_credentials", "password",
                "urn:ietf:params:oauth:grant-type:jwt-bearer" });
        defaultDiscoveryProperties.put(KEY_OIDC_TOKEN_EP_AUTH_METHODS_SUPP, new String[] { "client_secret_post", "client_secret_basic" });
        defaultDiscoveryProperties.put(KEY_OIDC_DISPLAY_VAL_SUPP, new String[] { "page" });
        defaultDiscoveryProperties.put(KEY_OIDC_CLAIM_TYPES_SUPP, new String[] { "normal" });
        defaultDiscoveryClaimsParmSupp = false;
        defaultDiscoveryRequestParmSupp = false;
        defaultDiscoveryRequestUriParmSupp = false;
        defaultDiscoveryRequireRequestUriRegistrationSupp = false;
    }
239291
static BinaryStorage defaultConfig() {
        // By default binaries are not stored on disk
        EditableDocument binaries = Schematic.newDocument();
        binaries.set(RepositoryConfiguration.FieldName.TYPE, RepositoryConfiguration.FieldValue.BINARY_STORAGE_TYPE_TRANSIENT);
        return new BinaryStorage(binaries);
    }
1180180
def default(self, value):
        """"""
        if isinstance(value, ObjectId):
            return str(value)
        return super(ElasticJSONSerializer, self).default(value)
291141
@SuppressWarnings("unchecked")
    private void bindRootTypes() {
        for (Class type : tree.getRootTypes()) {
            // bind root configuration classes both with and without qualifier
            if (!type.isInterface() || bindInterfaces) {
                // bind interface as type only when it's allowed
                bind(type).toInstance(configuration);
            }
            bind(type).annotatedWith(Config.class).toInstance(configuration);
        }
    }
71842
function getDefaultTypeRoots(currentDirectory, host) {
        if (!host.directoryExists) {
            return [ts.combinePaths(currentDirectory, nodeModulesAtTypes)];
        }
        var typeRoots;
        while (true) {
            var atTypes = ts.combinePaths(currentDirectory, nodeModulesAtTypes);
            if (host.directoryExists(atTypes)) {
                (typeRoots || (typeRoots = [])).push(atTypes);
            }
            var parent_15 = ts.getDirectoryPath(currentDirectory);
            if (parent_15 === currentDirectory) {
                break;
            }
            currentDirectory = parent_15;
        }
        return typeRoots;
    }
251500
def _init_metadata(self, **kwargs):
        """"""

        osid_objects.OsidSourceableForm._init_metadata(self)
        osid_objects.OsidObjectForm._init_metadata(self, **kwargs)
        self._copyright_registration_default = self._mdata['copyright_registration']['default_string_values'][0]
        update_display_text_defaults(self._mdata['copyright'], self._locale_map)
        self._copyright_default = dict(self._mdata['copyright']['default_string_values'][0])
        update_display_text_defaults(self._mdata['title'], self._locale_map)
        self._title_default = dict(self._mdata['title']['default_string_values'][0])
        self._distribute_verbatim_default = self._mdata['distribute_verbatim']['default_boolean_values'][0]
        self._created_date_default = self._mdata['created_date']['default_date_time_values'][0]
        self._distribute_alterations_default = self._mdata['distribute_alterations']['default_boolean_values'][0]
        update_display_text_defaults(self._mdata['principal_credit_string'], self._locale_map)
        self._principal_credit_string_default = dict(self._mdata['principal_credit_string']['default_string_values'][0])
        self._published_date_default = self._mdata['published_date']['default_date_time_values'][0]
        self._source_default = self._mdata['source']['default_id_values'][0]
        self._provider_links_default = self._mdata['provider_links']['default_id_values']
        self._public_domain_default = self._mdata['public_domain']['default_boolean_values'][0]
        self._distribute_compositions_default = self._mdata['distribute_compositions']['default_boolean_values'][0]
        self._composition_default = self._mdata['composition']['default_id_values'][0]
        self._published_default = self._mdata['published']['default_boolean_values'][0]
919610
public Class typeFromObjectTypeId(final String objectTypeId, final BaseTypeId defaultType, final Class defaultClass) {

		// default for cmuis:folder
		if (defaultType.value().equals(objectTypeId)) {
			return defaultClass;
		}

		return StructrApp.getConfiguration().getNodeEntityClass(objectTypeId);
	}
1201082
def _structlog_default_keys_processor(logger_class, log_method, event):
    '''  '''
    global HOSTNAME

    if 'id' not in event:
        event['id'] = '%s_%s' % (
            datetime.utcnow().strftime('%Y%m%dT%H%M%S'),
            uuid.uuid1().hex
        )

    if 'type' not in event:
        event['type'] = 'log'

    event['host'] = HOSTNAME

    return event
140413
def fill_default_configuration(self):
        
        logger.debug("Filling the unset properties with their default value:")

        types_creations = self.__class__.types_creations
        for o_type in types_creations:
            (_, _, inner_property, _, _) = types_creations[o_type]
            # Not yet for the realms and daemons links
            if inner_property in ['realms', 'arbiters', 'schedulers', 'reactionners',
                                  'pollers', 'brokers', 'receivers']:
                continue
            logger.debug("  . for %s", inner_property,)
            inner_object = getattr(self, inner_property, None)
            if inner_object is None:
                logger.debug("No %s to fill with default values", inner_property)
                continue
            inner_object.fill_default()

        # We have all monitored elements, we can create a default realm if none is defined
        if getattr(self, 'realms', None) is not None:
            self.fill_default_realm()
            self.realms.fill_default()

            # Then we create missing satellites, so no other satellites will be created after
            self.fill_default_satellites(self.launch_missing_daemons)

        types_creations = self.__class__.types_creations
        for o_type in types_creations:
            (_, _, inner_property, _, _) = types_creations[o_type]
            if getattr(self, inner_property, None) is None:
                logger.debug("No %s to fill with default values", inner_property)
                continue
            # Only for the daemons links
            if inner_property in ['schedulers', 'reactionners', 'pollers', 'brokers', 'receivers']:
                logger.debug("  . for %s", inner_property,)
                inner_object = getattr(self, inner_property)
                inner_object.fill_default()

        # Now fill some fields we can predict (like address for hosts)
        self.hosts.fill_predictive_missing_parameters()
        self.services.fill_predictive_missing_parameters()
470760
def get_default_mimetype(self):
		
		mimetype = self.default_mimetype
		if mimetype is None:	# class inherits from module default
			mimetype = DEFAULT_MIMETYPE
		if mimetype is None:	# module is set to None?
			mimetype = 'application/rdf+xml'
		return mimetype
915034
private void configureDefaultContextPath(DefaultContextPath dcp) {
        String methodName = "configureDefaultContextPath";
        String defaultContextPath = dcp.getValue();

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, methodName + ": defaultContextPath --> " + defaultContextPath);
        }

        if (defaultContextPath != null && !defaultContextPath.isEmpty()) {
            webAppConfiguration.setDefaultContextPath(defaultContextPath);
        }
    }
949132
public void buildDefaultValueInfo(XMLNode node, Content annotationDocTree) {
        ((AnnotationTypeOptionalMemberWriter) writer).addDefaultValueInfo(currentMember,
                annotationDocTree);
    }
1092344
def set_defaults(config, cluster_name):
    
    config['postgresql'].setdefault('name', cluster_name)
    config['postgresql'].setdefault('scope', cluster_name)
    config['postgresql'].setdefault('listen', '127.0.0.1')
    config['postgresql']['authentication'] = {'replication': None}
    config['restapi']['listen'] = ':' in config['restapi']['listen'] and config['restapi']['listen'] or '127.0.0.1:8008'
575221
def get_default_config(self):
        
        default_config = super(SNMPRawCollector,
                               self).get_default_config()
        default_config.update({
            'oids': {},
            'path_prefix': 'servers',
            'path_suffix': 'snmp',
        })
        return default_config
556552
protected DefaultServerDolphin createServerDolphin() {
        ServerModelStore modelStore = createServerModelStore();
        ServerConnector connector = createServerConnector(modelStore, createCodec());
        return new DefaultServerDolphin(modelStore, connector);
    }
201596
@Override
    public void validateDefault(InputProblemReporter rep, boolean normalize)
        throws XMLStreamException
    {
        String def = validateDefaultNmToken(rep, normalize);
        if (normalize) {
            mDefValue.setValue(def);
        }
    }
134631
public void configureDefaults() throws Exception
    {
        //cannot configure if the context is already started
        if (_context.isStarted())
        {
            if (log.isDebugEnabled()){log.debug("Cannot configure webapp after it is started");};
            return;
        }
        
        getWebApplicationContext().setWelcomeFiles(null);
        
        String defaultsDescriptor=getWebApplicationContext().getDefaultsDescriptor();
        if(defaultsDescriptor!=null&&defaultsDescriptor.length()>0)
        {
            Resource dftResource=Resource.newSystemResource(defaultsDescriptor);
            if(dftResource==null)
                dftResource=Resource.newResource(defaultsDescriptor);
            XmlParser.Node defaultConfig=xmlParser.parse(dftResource.getURL());
            initialize(defaultConfig);
        }
    }