Maps every property in the given function input definition to the variable value definitions that contribute it.
508573
public static Map<String,Collection<VarBindingDef>> getPropertySources( FunctionInputDef function)
    {
    SetValuedMap<String,VarBindingDef> sources = MultiMapUtils.newSetValuedHashMap();

    toStream( new VarDefIterator( function))
      .flatMap( var -> toStream( var.getValues()).map( value -> new VarBindingDef( var, value)))
      .forEach( binding -> toStream( binding.getValueDef().getProperties()).forEach( p -> sources.put( p, binding)));
    
    return sources.asMap();
    }
864719
function ValueMapper(input, options) {
  // Save input for later
  this.input = input;

  // Save placeholder middlewares
  this.middlewares = [];

  // Fallback options
  options = options || {};

  // Add each of the middlewares
  var middlewares = options.middlewares || [];
  middlewares.forEach(this.addMiddleware, this);
}
978046
function defineImmutable(target, values) {
    Object.keys(values).forEach(function(key){
      Object.defineProperty(target, key, {
        configurable: false,
        enumerable: true,
        value: values[key]
      });
    });
    return target;
  }
1174623
public static Map<String,Collection<IConditional>> getPropertiesUndefined( FunctionInputDef function)
    {
    Map<String,Collection<IConditional>> refs = getPropertyReferences( function);
    Collection<String> undefined = CollectionUtils.subtract( refs.keySet(), getPropertySources( function).keySet());

    return
      refs.entrySet().stream()
      .filter( entry -> undefined.contains( entry.getKey()))
      .collect( toMap( entry -> entry.getKey(), entry -> entry.getValue()));
    }
750589
function (){

    var outputPropertyName,
        callback,
        inputPropertyNames,
        inputs,
        output;

    if(arguments.length === 0){
      return configurationProperty();
    } else if(arguments.length === 1){
      if(typeof arguments[0] === "object"){

        // The invocation is of the form model(configuration)
        return setConfiguration(arguments[0]);
      } else {

        // The invocation is of the form model(propertyName)
        return addProperty(arguments[0]);
      }
    } else if(arguments.length === 2){
      if(typeof arguments[0] === "function"){

        // The invocation is of the form model(callback, inputPropertyNames)
        inputPropertyNames = arguments[1];
        callback = arguments[0];
        outputPropertyName = undefined;
      } else {

        // The invocation is of the form model(propertyName, defaultValue)
        return addProperty(arguments[0], arguments[1]);
      }
    } else if(arguments.length === 3){
      outputPropertyName = arguments[0];
      callback = arguments[1];
      inputPropertyNames = arguments[2];
    }

    // inputPropertyNames may be a string of comma-separated property names,
    // or an array of property names.
    if(typeof inputPropertyNames === "string"){
      inputPropertyNames = inputPropertyNames.split(",").map(invoke("trim"));
    }

    inputs = inputPropertyNames.map(function (propertyName){
      var property = getProperty(propertyName);
      if(typeof property === "undefined"){
        throw new Error([
          "The property \"",
          propertyName,
          "\" was referenced as a dependency for a reactive function before it was defined. ",
          "Please define each property first before referencing them in reactive functions."
        ].join(""));
      }
      return property;
    });

    // Create a new reactive property for the output and assign it to the model.
    if(outputPropertyName){
      addProperty(outputPropertyName);
      output = model[outputPropertyName];
    }

    // If the number of arguments expected by the callback is one greater than the
    // number of inputs, then the last argument is the "done" callback, and this
    // reactive function will be set up to be asynchronous. The "done" callback should
    // be called with the new value of the output property asynchronously.
    var isAsynchronous = (callback.length === inputs.length + 1);
    if(isAsynchronous){
      reactiveFunctions.push(ReactiveFunction({
        inputs: inputs,
        callback: function (){

          // Convert the arguments passed into this function into an array.
          var args = Array.prototype.slice.call(arguments);

          // Push the "done" callback onto the args array.
          // We are actally passing the output reactive property here, invoking it
          // as the "done" callback will set the value of the output property.
          args.push(output);

          // Wrap in setTimeout to guarantee that the output property is set
          // asynchronously, outside of the current digest. This is necessary
          // to ensure that if developers inadvertently invoke the "done" callback 
          // synchronously, their code will still have the expected behavior.
          setTimeout(function (){

            // Invoke the original callback with the args array as arguments.
            callback.apply(null, args);
          });
        }
      }));
    } else {
      reactiveFunctions.push(ReactiveFunction({
        inputs: inputs,
        output: output, // This may be undefined.
        callback: callback
      }));
    }
    return model;
  }
697325
public Assignment mapVariables(Map<Integer, Integer> varMap) {
    int[] newVarNums = new int[vars.length];
    Object[] newValues = new Object[vars.length];

    int numFilled = 0;
    for (int i = 0; i < vars.length; i++) {
      if (varMap.containsKey(vars[i])) {
        newVarNums[numFilled] = varMap.get(vars[i]);
        newValues[numFilled] = values[i];
        numFilled++;
      }
    }
    
    if (numFilled < newVarNums.length) {
      newVarNums = Arrays.copyOf(newVarNums, numFilled);
      newValues = Arrays.copyOf(newValues, numFilled);
    }
    return Assignment.fromUnsortedArrays(newVarNums, newValues);
  }
126988
function lazyDefinePropertyValue(propertyName, loader) {
  return function() {
    var value = loader.apply(this, arguments);

    Object.defineProperty(this, propertyName, {
      value: value,
      enumerable: true,
      configurable: true,
    });

    return value;
  };
}
335194
function ( parser, params ) {
		var property, funcName, values;
		for ( property in params ) {
			funcName = 'set' + property.substring( 0, 1 ).toLocaleUpperCase() + property.substring( 1 );
			values = params[ property ];

			if ( typeof parser[ funcName ] === 'function' ) {

				parser[ funcName ]( values );

			} else if ( parser.hasOwnProperty( property ) ) {

				parser[ property ] = values;

			}
		}
	}
42171
public void putAllValues(Map<String, V> input) {
        for (Map.Entry<String, V> entry : input.entrySet()) {
            put(entry.getKey(), entry.getValue());
        }
    }
637856
public void mapInPlace(Function<Double, Double> fn) {
    for (int i = 0; i < pointers.length; i++) {
      if (pointers[i] == null) continue;

      if (copyOnWrite[i]) {
        copyOnWrite[i] = false;
        pointers[i] = pointers[i].clone();
      }

      if (sparse[i]) {
        for (int j = 0; j < pointers[i].length / 2; j++) {
          pointers[i][(j * 2) + 1] = fn.apply(pointers[i][(j * 2) + 1]);
        }
      } else {
        for (int j = 0; j < pointers[i].length; j++) {
          pointers[i][j] = fn.apply(pointers[i][j]);
        }
      }
    }
  }
74
public SyntacticCategory assignAllFeatures(String value) {
    Set<Integer> featureVars = Sets.newHashSet();
    getAllFeatureVariables(featureVars);

    Map<Integer, String> valueMap = Maps.newHashMap();
    for (Integer var : featureVars) {
      valueMap.put(var, value);
    }
    return assignFeatures(valueMap, Collections.<Integer, Integer>emptyMap());
  }
48703
function (what, oldProps, propName, val) {
		Object.defineProperty(what, propName, {value: val, configurable: true, enumerable: true, writable: true});
	}
1286420
function map ( input, inputMin, inputMax, outputMin, outputMax, clamp, ease ) {
    input = ( input - inputMin ) / ( inputMax - inputMin );
    if ( ease ) {
        input = ease(input);
    } 
    var output = input * ( outputMax - outputMin ) + outputMin;
    if ( !!clamp ) {
        if ( outputMax < outputMin ) {
            if ( output < outputMax ) {
                output = outputMax;
            }
            else if ( output > outputMin ) {
                output = outputMin;
            }
        } else {
            if ( output > outputMax ) {
                output = outputMax;
            }
            else if ( output < outputMin ) {
                output = outputMin;
            }
        }
    }
    return output;
}
791611
function (data) {
    // Add property to hold internal values
    Object.defineProperty(this, '_', {
        enumerable: false,
        configurable: false,
        writable: false,
        value: {
            dt: this._clone(data),
            ev: {},
            df: {},
            sp: false,
            ct: 0
        }
    });
    // Assign keys
    for (var key in this._.dt) {
        this._addProperty(key);
    }
}
549647
function addAll(object, values) {
  forPropertyInObject(values, set)

  function set(value, key) {
    object[key] = value
  }
}
1110795
function mapValues(fn, obj) {
  return keys(obj).reduce(function(acc, key) {
    acc[key] = fn(obj[key]);
    return acc;
  }, {});
}
288626
function setProperties(target/*, source, ...*/)
	{
		var i = 1,
			max = arguments.length,
			source, prop;

		for (; i < max; ++i)
		{
			source = arguments[i];
			if (!(source instanceof Object))
				continue;

			for (prop in source)
			{
				if (source[prop] == null)
					continue;

				target[prop] = source[prop];
			}
		}

		return target;
	}