This will attempt to read the System property to work out what default to set.
This should only be done once when the class is loaded. After that point, you will have
to programmatically override it.
762858
private CompilerType getDefaultCompiler() {
        try {
            final String prop = this.conf.getChainedProperties().getProperty( JAVA_COMPILER_PROPERTY,
                                                                              "ECLIPSE" );
            if ( prop.equals( "NATIVE" ) ) {
                return CompilerType.NATIVE;
            } else if ( prop.equals( "ECLIPSE" ) ) {
                return CompilerType.ECLIPSE;
            } else if ( prop.equals( "JANINO" ) ) {
                return CompilerType.JANINO;
            } else {
                logger.error( "Drools config: unable to use the drools.compiler property. Using default. It was set to:" + prop );
                return CompilerType.ECLIPSE;
            }
        } catch ( final SecurityException e ) {
            logger.error( "Drools config: unable to read the drools.compiler property. Using default.", e);
            return CompilerType.ECLIPSE;
        }
    }
161712
public boolean getBooleanProperty( String key , boolean defaultValue )
    {
        String value = SystemTools.replaceSystemProperties(settings.getProperty(key));
        if (value == null)
            return defaultValue;
        return Boolean.valueOf(value.trim()).booleanValue();
    }
283524
private void overrideFromSystemProperties() {
        String  url = System.getProperty("activejdbc.url");
        String  user = System.getProperty("activejdbc.user");
        String  password = System.getProperty("activejdbc.password");
        String  driver = System.getProperty("activejdbc.driver");
        if(!blank(url) && !blank(user) && !blank(driver)){
            connectionSpecMap.put(getEnvironment(), new ConnectionJdbcSpec(driver, url, user, password));
        }

        String  jndi = System.getProperty("activejdbc.jndi");
        if(!blank(jndi)){
            connectionSpecMap.put(getEnvironment(), new ConnectionJndiSpec(jndi));
        }
    }
1105439
function(config) {
			if (initialized) {
				error(new Error('Cannot set global configuration after application initialization'));
				return;
			}

			for (var prop in config) {
				if (config.hasOwnProperty(prop)) {
					globalConfig[prop] = config[prop];
				}
			}
		}
1215777
private void loadOverridesFromSystemProperties() {
        PropertyName[] names = PropertyName.values();
        for (PropertyName propertyName: names){
            String sysProp = System.getProperty(propertyName.name);
            if(sysProp != null){
                properties.put(propertyName.name, sysProp);
            }
        }
    }
1362578
@Override
	protected void loadDefaultProperties() {
		for (P property : propertyClass.getEnumConstants()) {
			try {
				setProperty(property, property.getPropertyCharacteristics().getDefaultValue(), true);
			} catch (PropertyException e) {
				e.printStackTrace();
			}    
		}
	}
567430
def initialize_bindings
      bindings = self.class.get_class_bindings
      
      bindings.each do |binding|
        binding[:proc].observed_properties.each do |key_path|
          register_observer(self, key_path) do
            new_value = binding[:proc].call(self)
            if binding[:name]
              self.setValue(new_value, forKey:binding[:name])
            end
          end
        end
      end
    end
520355
private static void applyOverrides() {
        // Get the appropriate InputStream to read overrides from, if any.
        InputStream stream = getContentTypesPropertiesStream();
        if (stream == null) {
            return;
        }

        try {
            try {
                // Read the properties file...
                Properties overrides = new Properties();
                overrides.load(stream);
                // And translate its mapping to ours...
                for (Map.Entry<Object, Object> entry : overrides.entrySet()) {
                    String extension = (String) entry.getKey();
                    String mimeType = (String) entry.getValue();
                    add(mimeType, extension);
                }
            } finally {
                stream.close();
            }
        } catch (IOException ignored) {
        }
    }
898308
public void setToDefaults() {
		styleName = "";
		styleNr = 0;
		alignment = Element.ALIGN_LEFT;
		justificationPercentage = 0;
		firstLineIndent = 0;
		leftIndent = 0;
		rightIndent = 0;
		adustRightIndent = 0;
		mirrorIndent = 0;
		overrideWidowControl = -1;
		AutoSpaceBetweenDBCEnglish = 0;
		AutoSpaceBetweenDBCNumbers = 0;
		noCharacterWrapping = 0;
		noWordWrapping = 0;
		noOverflowPeriodComma = 0;
		
	}
563819
static void init() {// NOPMD

		determineIfNTEventLogIsSupported();

		URL resource = null;

		final String configurationOptionStr = OptionConverter.getSystemProperty(DEFAULT_CONFIGURATION_KEY, null);

		if (configurationOptionStr != null) {
			try {
				resource = new URL(configurationOptionStr);
			} catch (MalformedURLException ex) {
				// so, resource is not a URL:
				// attempt to get the resource from the class path
				resource = Loader.getResource(configurationOptionStr);
			}
		}
		if (resource == null) {
			resource = Loader.getResource(DEFAULT_CONFIGURATION_FILE); // NOPMD
		}

		if (resource == null) {
			System.err.println("[FoundationLogger] Can not find resource: " + DEFAULT_CONFIGURATION_FILE); // NOPMD
			throw new FoundationIOException("Can not find resource: " + DEFAULT_CONFIGURATION_FILE); // NOPMD
		}

		// update the log manager to use the Foundation repository.
		final RepositorySelector foundationRepositorySelector = new FoundationRepositorySelector(FoundationLogFactory.foundationLogHierarchy);
		LogManager.setRepositorySelector(foundationRepositorySelector, null);

		// set logger to info so we always want to see these logs even if root
		// is set to ERROR.
		final Logger logger = getLogger(FoundationLogger.class);

		final String logPropFile = resource.getPath();
		log4jConfigProps = getLogProperties(resource);
		
		// select and configure again so the loggers are created with the right
		// level after the repository selector was updated.
		OptionConverter.selectAndConfigure(resource, null, FoundationLogFactory.foundationLogHierarchy);

		// start watching for property changes
		setUpPropFileReloading(logger, logPropFile, log4jConfigProps);

		// add syslog appender or windows event viewer appender
//		setupOSSystemLog(logger, log4jConfigProps);

		// parseMarkerPatterns(log4jConfigProps);
		// parseMarkerPurePattern(log4jConfigProps);
//		udpateMarkerStructuredLogOverrideMap(logger);

        AbstractFoundationLoggingMarker.init();

		updateSniffingLoggersLevel(logger);

        setupJULSupport(resource);

    }
767275
protected Properties initDefaultOptions() {
		Properties defaultValues = new Properties();
		defaultValues.putAll(defaults);

		// See if there's an aggregator.properties in the class loader's root
		ClassLoader cl = OptionsImpl.class.getClassLoader();
		URL url = cl.getResource(getPropsFilename());
		if (url != null) {
			loadFromUrl(defaultValues, url);
		}

		// If the bundle defines properties, then load those too
		if(aggregator != null){
			url = aggregator.getPlatformServices().getResource(getPropsFilename());
			if (url != null) {
				loadFromUrl(defaultValues, url);
			}
		}
		Map<String, String> map = new HashMap<String, String>();
		for (String name : defaultValues.stringPropertyNames()) {
			map.put(name, (String)defaultValues.getProperty(name));
		}
		defaultOptionsMap = Collections.unmodifiableMap(map);

		return defaultValues;
	}
83354
@Override
	public void afterPropertiesSet() {

		super.afterPropertiesSet();
		compiler = new DefaultLessCompiler();
		lessConfig = new Configuration();
		lessConfig.getSourceMapConfiguration().setLinkSourceMap(false);
	}
701420
protected function initDefaults()
    {
        if ($this->properties['header'] === null) {
            $this->setHeader($this->name);
        }
        if ($this->properties['type'] === null) {
            $this->setType(ColumnType::createType(ColumnType::TYPE_STRING));
        }
    }
863829
def set_default(cls, name):
        """"""
        if name not in cls._depots:
            raise RuntimeError('%s depot has not been configured' % (name,))
        cls._default_depot = name
880403
def set_default(self_,param_name,value):
        
        cls = self_.cls
        setattr(cls,param_name,value)
1066800
private void maybeSetProperty(final String name, final String value) {
    if (System.getProperty(name) == null) {
      System.setProperty(name, value);
    }
  }
671093
private void checkRecursiveConfigs(Set<Class> resolvedConfigs, Class<?> configClass) {
        if (resolvedConfigs.contains(configClass)) {
            throw new PropertyLoaderException(String.format("Recursive configuration <%s>", configClass));
        }
    }