Set default value for object property

@param {object} object       Some object
@param {*}      defaultValue Default value
@param {string} property     Property name

@this {metaProcessor}
166555
function(object, defaultValue, property) {
        if (!_.isUndefined(defaultValue)) {
            object.__setPropertyParam(property, 'default', defaultValue);
        }
    }
1128318
public function setDefaultValue($defaultValue)
    {
        if (!$defaultValue instanceof ColumnDefaultValue) {
            $defaultValue = new ColumnDefaultValue($defaultValue, ColumnDefaultValue::TYPE_VALUE);
        }

        $this->domain->setDefaultValue($defaultValue);
    }
261327
public static void setGroovyObjectProperty(Object newValue, GroovyObject object, String property) {
        object.setProperty(property, newValue);
    }
745818
function setValue(sName, sValue) {
				if ( typeof sValue === "undefined" || sValue === null ) {
					return;
				}
				switch (M_SETTINGS[sName].type) {
				case "boolean":
					if ( typeof sValue === "string" ) {
						if (M_SETTINGS[sName].defaultValue) {
							config[sName] = sValue.toLowerCase() != "false";
						} else {
							config[sName] = sValue.toLowerCase() === "true" || sValue.toLowerCase() === "x";
						}
					} else {
						// boolean etc.
						config[sName] = !!sValue;
					}
					break;
				case "string":
					config[sName] = "" + sValue; // enforce string
					break;
				case "code":
					config[sName] = typeof sValue === "function" ? sValue : String(sValue);
					break;
				case "function":
					if ( typeof sValue !== "function" ) {
						throw new Error("unsupported value");
					}
					config[sName] = sValue;
					break;
				case "string[]":
					if ( Array.isArray(sValue) ) {
						config[sName] = sValue;
					} else if ( typeof sValue === "string" ) {
						config[sName] = sValue.split(/[ ,;]/).map(function(s) {
							return s.trim();
						});
					} else {
						throw new Error("unsupported value");
					}
					break;
				case "object":
					if ( typeof sValue !== "object" ) {
						throw new Error("unsupported value");
					}
					config[sName] = sValue;
					break;
				case "Locale":
					var oLocale = convertToLocaleOrNull(sValue);
					if ( oLocale || M_SETTINGS[sName].defaultValue == null ) {
						config[sName] = oLocale;
					} else {
						throw new Error("unsupported value");
					}
					break;
				default:
					// When the type is none of the above types, check if an object as enum is provided to validate the value.
					var vType = M_SETTINGS[sName].type;
					if (typeof vType === "object") {
						checkEnum(vType, sValue, sName);
						config[sName] = sValue;
					} else {
						throw new Error("illegal state");
					}
				}
			}
344212
function(type, args, obj) {
            var val = Lang.merge(DEFAULT_CONFIG.STRINGS.value, args[0]);
            this.cfg.setProperty(DEFAULT_CONFIG.STRINGS.key, val, true);
        }
1001304
public void setProperty(P property, Object newValue) throws PropertyException{
		setProperty(property, newValue, false);
	}
654465
@JsOverlay
  public final void addJavaPropDefaultValue(Function javaMethod, String propertyName) {
    PropOptions propDefinition = getProps().get(propertyName);
    propDefinition.defaultValue = javaMethod;
  }
880233
function(name, value) {
			var prefs = name;
			if (typeof name === 'string') {
				prefs = {};
				prefs[name] = value;
			}
			
			Object.keys(prefs).forEach(function(k) {
				var v = prefs[k];
				if (!(k in defaults)) {
					throw new Error('Property "' + k + '" is not defined. You should define it first with `define` method of current module');
				}
				
				// do not set value if it equals to default value
				if (v !== defaults[k].value) {
					// make sure we have value of correct type
					switch (typeof defaults[k].value) {
						case 'boolean':
							v = toBoolean(v);
							break;
						case 'number':
							v = parseInt(v + '', 10) || 0;
							break;
						default: // convert to string
							if (v !== null) {
								v += '';
							}
					}

					preferences[k] = v;
				} else if (k in preferences) {
					delete preferences[k];
				}
			});
		}
1031497
function (key) {
      var val = obj[key];

      // Set if unset
      if (!(key in base)) {
         base[key] = val;
      // If the value is an object and we use recursive mode, use defaults on
      // the value
      } else if (recursive && typeof val === 'object' &&
                 typeof base[key] === 'object') {
         defaults(base[key], val);
      }
      // Otherwise ignore the value
   }
966835
public String getProperty(String key,String defaultValue)
    {
        //get property value
        return this.PROPERTIES.getProperty(key,defaultValue);
    }
442463
public static String getProperty(String propertyName, String defaultValue) {
        String value = get(propertyName);
        return value == null ? defaultValue : value;
    }
127266
public static void setPropertySafe2(Object newValue, Object object, String property) {
        if (object != null) {
            setProperty2(newValue, object, property);
        }
    }
290760
public ConfigOptionBuilder setDefaultWith( Object defaultValue ) {
        co.setHasDefault( true );
        co.setValue( defaultValue );
        return setOptional();
    }
612166
function setValue (obj, prop, value) {
  if (value !== undefined && obj[prop] === undefined) {
    obj[prop] = value
  }
}
973865
function(value, defaultValue) {
      var result = value === undefined || value === null ? defaultValue : value;

      return result;
    }
866590
function setDefaultConfig(defaultNames, packageName, obj) {
  for (let [objName, configName] of defaultNames) {
    atom.config.set(`${packageName}.${configName}`, obj[objName]);
  }
}
873388
protected void setProperty(String propertyName, JavascriptObject propertyValue) {
        jsObject.setMember(propertyName, propertyValue.getJSObject());
    }