Sets default values for each field that hasn't been provided manually.
970071
private void autoSetMissingValues() {
        // Ensure that a timestamp is set (to now at least!)
        if (event.getTimestamp() == null) {
            event.setTimestamp(new Date());
        }

        // Ensure that a platform is set
        if (event.getPlatform() == null) {
            event.setPlatform(DEFAULT_PLATFORM);
        }

        // Ensure that an SDK is set
        if (event.getSdk() == null) {
            event.setSdk(new Sdk(SentryEnvironment.SDK_NAME, SentryEnvironment.SDK_VERSION,
                sdkIntegrations));
        }

        // Ensure that a hostname is set
        if (event.getServerName() == null) {
            event.setServerName(HOSTNAME_CACHE.getHostname());
        }
    }
896232
protected function _setDefault()
    {
        if ($this->_default === null) {
            $this->_table->alter(
                sprintf('ALTER COLUMN %s DROP DEFAULT', $this->_database->prepareIdentifier($this->_name))
            );
        } else {
            $this->_table->alter(
                sprintf(
                    'ALTER COLUMN %s SET DEFAULT %s',
                    $this->_database->prepareIdentifier($this->_name),
                    $this->_database->prepareValue($this->_default, $this->_datatype)
                )
            );
        }
    }
356758
public function applyDefaultValues()
    {
        $this->is_translation = false;
        $this->is_rotation = false;
        $this->is_acyclic = false;
        $this->is_cyclic = false;
        $this->is_composite = false;
        $this->is_multiple = false;
        $this->importance = 0;
        $this->version = 0;
    }
998041
protected function setFieldOriginalValue()
    {
//        static::doNotSnakeAttributes($this->model);

        $values = $this->model->toArray();

        $this->builder->fields()->each(function (Field $field) use ($values) {
            $field->setOriginal($values);
        });
    }
302313
def _update_defaults(self, defaults, old_version, verbose=False):
        """"""
        old_defaults = self._load_old_defaults(old_version)
        for section, options in defaults:
            for option in options:
                new_value = options[ option ]
                try:
                    old_value = old_defaults.get(section, option)
                except (cp.NoSectionError, cp.NoOptionError):
                    old_value = None
                if old_value is None or \
                  to_text_string(new_value) != old_value:
                    self._set(section, option, new_value, verbose)
811399
function setDefaults(scope, defaults) {
        if (!defaults) { return; }

        // store defaults for use in generateRemodel
        scope.defaults = defaults;

        for (var name in defaults) {
            if (defaults.hasOwnProperty(name) && scope[name] === undefined) {
                scope[name] = defaults[name];
            }
        }
    }
610459
protected function setDefaults($sets = array())
    {
        foreach ($sets as $set) {
            foreach ($set as $field => $fieldParams) {
                if ($fieldParams['type'] == 'single' && isset($fieldParams['default'])) {
                    $this->fieldData[$field] = $fieldParams['default'];
                }
            }
        }
    }
1004257
def __setAttributeDefaults(self):
        
        for k,v in self.__class__.attributes.items():
            if v is not None and self.attributes.has_key(k) is False:
                if isinstance(v, types.FunctionType):
                    self.attributes[k] = v(self)
                else:
                    self.attributes[k] = v
1097314
protected function setDefaultOptions() : void
    {
        $this->setDefaultFieldOptions();
        $this->setDefaultFieldDefinitions();
        $this->setDefaultLabel();
        $this->setDefaultValue();
    }
1101735
def defaults(values={}):
    """"""
    if values: return values
    save_types = basestring, int, float, tuple, list, dict, type(None)
    for k, v in globals().items():
        if isinstance(v, save_types) and not k.startswith("_"): values[k] = v
    return values
964741
private function completeFieldDefaultValue(Input $field, ReflectionParameter $param, string $fieldName): void
    {
        if (!$field->hasDefaultValue() && $param->isDefaultValueAvailable()) {
            $field->setDefaultValue($param->getDefaultValue());
        }

        if (!$field->hasDefaultValue()) {
            $defaultValue = $this->getPropertyDefaultValue($fieldName);
            if ($defaultValue !== null) {
                $field->setDefaultValue($defaultValue);
            }
        }
    }
206841
protected function assignDefaultValues()
	{
		foreach ($this->defaultValues as $key => $value) {
			$this->model[$key] = $value;
		}

        return true;
	}
1358085
public function setDefaultValuesForAttributes()
    {
        // Only works on new models.
        if ($this->exists) {
            return $this;
        }

        // Defaults on attributes.
        $defaults = $this->getAttributesFromSchema('default', true);

        // Remove attributes that have been given values.
        $defaults = array_except($defaults, array_keys($this->getDirty()));

        // Unguard.
        static::unguard();

        // Allocate values.
        foreach ($defaults as $key => $value) {
            $this->{$key} = $value;
        }

        // Reguard.
        static::reguard();

        return $this;
    }
252053
def setdefault (self, key, def_val=None):
        """"""
        if key in self:
            return self[key]
        self[key] = def_val
        return def_val
597104
def fill_with_defaults(process_input, input_schema):
    """"""
    for field_schema, fields, path in iterate_schema(process_input, input_schema):
        if 'default' in field_schema and field_schema['name'] not in fields:
            dict_dot(process_input, path, field_schema['default'])
84334
def apply_defaults(self, row, tables_dict):
    ""
    return [
      emergency_cast(colx, field_default(colx, self.name, tables_dict) if v is Missing else v)
      for colx,v in zip(self.fields,row)
    ]
24557
void setDefaults(Settings defaultSettings) {

		Assert.notNull(defaultSettings, "Missing default settings!");

		for (String key : defaultSettings.keySet()) {

			CommandOption<?> option = findBySetting(key);

			if (option == null) {
				// option not present ... check next
				continue;
			}

			Object value = defaultSettings.get(key);
			option.defaultsTo(value);
		}

	}