Set new source objects. If no value for some source in `sources`,
it removes from sources. If `sources` is not an object, remove all
sources.
TODO: aggregate changes

@param {object} sources Object that contains new values for sources.
767714
function(sources){
      if (!sources)
        sources = {};

      for (var name in this.fields.sources)
        this.setSource(name, sources[name]);

      /** @cut */ for (var name in sources)
      /** @cut */   if (name in this.fields.sources == false)
      /** @cut */     basis.dev.warn('basis.data.object.Merge#setSource: can\'t set source with name `' + name + '` as not specified by fields configuration');
    }
1205870
function _setIn (source, key, value) {
    var result = {};

    for (var prop in source) {
        result[prop] = source[prop];
    }

    result[key] = value;

    return result;
}
171282
function (sourceName, referenceSourceName) {
            var sourceToMove,
                sourcePos,
                referenceSourcePos;
            if (!this._sources.every(function (source, index) {
                var name = source.getName();
                if (name === sourceName) {
                    sourceToMove = source;
                    sourcePos = index;
                } else if (name === referenceSourceName) {
                    referenceSourcePos = index;
                }
                return sourcePos === undefined || referenceSourcePos === undefined;
            })) {
                var KEEP_ITEM = 0,
                    REMOVE_ITEM = 1;
                this._sources.splice(sourcePos, REMOVE_ITEM);
                if (sourcePos > referenceSourcePos) {
                    ++referenceSourcePos;
                }
                this._sources.splice(referenceSourcePos, KEEP_ITEM, sourceToMove);
                this._rebuildSourcesIndex();
            }
        }
1056414
function(source_object) {

		var i = 0,
			name,
			uid,
			result = this._createHelperStorage(),
			removed = this._createHelperStorage(),
			added = this._createHelperStorage();

		for (; i < this._count; i++) {

			name = this._data_names[i];
			if (name != null && (name in source_object)) {

				if (source_object[name] === this._data_values[i]) {

					result.push(this._data_uids[i], this._data_values[i], this._data_names[i]);

				} else {

					// Attention: the name has NOT changed, but it will be present in both added and removed names!
					removed.push(this._data_uids[i], this._data_values[i], name);
					uid = this._uid++;
					result.push(uid, source_object[name], name);
					added.push(uid, source_object[name], name);

				}

			} else {

				removed.push(this._data_uids[i], this._data_values[i], this._data_names[i]);

			}

		}

		for (name in source_object) {

			if (this._data_names.indexOf(name) == -1) {

				uid = this._uid++;
				result.push(uid, source_object[name], name);
				added.push(uid, source_object[name], name);

			}

		}

		this._assignStorage(result);
		this._setLength(this._data_uids.length);

		removed.uids.length && this._fire('items_removed', removed.getObject());
		added.uids.length && this._fire('items_added', added.getObject());
		this._fire('collection_changed');

	}
281219
function(source) {
            if($.isArray(source) && source.length && source[0].value !== undefined) {
                for(var i = 0; i<source.length; i++) {
                    if(source[i].value !== undefined) {
                        source[i].id = source[i].value;
                        delete source[i].value;
                    }
                }
            }
            return source;            
        }
899231
public void setSourceListInVfs(List<String> sourceListInVfs) {

        if (sourceListInVfs == null) {
            m_sourceListInVfs = new ArrayList<String>();
        } else {
            m_sourceListInVfs = optimizeSourceList(sourceListInVfs);
        }
    }
1253090
function BindableCollection (source) {
  BindableObject.call(this, this);
  this.source = source || [];
  this._updateInfo();
  this.bind("source", _.bind(this._onSourceChange, this));
}
630373
public void setItems (Array<T> newItems) {
		items.clear();
		items.addAll(newItems);
		currentIndex = 0;
		invalidateDataSet();
	}
314094
public function addSources(SourceFileCollection $sources)
    {
        foreach ($sources as $source) {
            $this->addSource($source);
        }

        return $this;
    }
1362866
function assign( /* target, ... sources */ ) {
    var args = Array.prototype.slice.call(arguments);
    var target = args.shift() || {};

    args.forEach(function (source) {
        Object.keys(source || {}).forEach(function (key) {
            if (['tls', 'auth'].indexOf(key) >= 0 && source[key] && typeof source[key] === 'object') {
                // tls and auth are special keys that need to be enumerated separately
                // other objects are passed as is
                if (!target[key]) {
                    // esnure that target has this key
                    target[key] = {};
                }
                Object.keys(source[key]).forEach(function (subKey) {
                    target[key][subKey] = source[key][subKey];
                });
            } else {
                target[key] = source[key];
            }
        });
    });
    return target;
}
447399
public synchronized void setSource(Source source) {
        String sourceId = CollectorManagerUtils.getSourceId(source);
        SourceManager srcMgr = null;
        if (!sourceMgrs.containsKey(sourceId)) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event(tc, "Adding source to the list", source.getClass());
            }
            srcMgr = new SourceManager(source);
            sourceMgrs.put(srcMgr.getSourceId(), srcMgr);
            /*
             * Obtain the conduit/bufferManager and put it in bufferManagerMap
             * if the source being set is message/log or trace.
             *
             * This is to make up for the prior logic where conduit/bufferManager
             * were created before the source was created and were set into the bufferManagerMap
             *
             * With the new logic concerning LogSource and TraceSource for JsonLogging, the LogSource
             * and TraceSource and their respective Conduit/BufferManager were created outside of
             * CollectorManager and OSGI serviceability. Thus, the following call to processInitializedConduits
             * retrieves the conduits/bufferManagers that were created 'outside' collectorManager's realm of
             * control and places them into bufferManagerMap because the following logic expects the prior
             * statement to be true.
             *
             * Alas, continue 'as normal' afterwards.
             */
            processInitializedConduits(source);

            //Passes BufferManager onto SourceManager which will then associate a Handler to it.
            srcMgr.setBufferManager(bufferManagerMap.get(sourceId));
            //Handle pending subscriptions for this source
            for (Entry<String, HandlerManager> entry : handlerMgrs.entrySet()) {
                HandlerManager hdlrMgr = entry.getValue();
                //Check if source is in the pending subscription list for this handler
                if (hdlrMgr.getPendingSubscriptions().contains(sourceId)) {
                    List<String> sourceIds = new ArrayList<String>();
                    sourceIds.add(sourceId);
                    try {
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                            Tr.debug(tc, "Handling pending subscription " + sourceId,
                                     hdlrMgr.getHandlerId());
                        }
                        subscribe(hdlrMgr.getHandler(), sourceIds);
                    } catch (Exception e) {

                    }
                }
            }
        }
    }
154994
public void addSource(String source)
    {
        if(this.sources == null)
            this.sources = new ArrayList<String>();
        this.sources.add(source);
    }
76690
function(objects) {
      if (!_.isArray(objects)) {
        objects = [objects];
      }

      var change = new Parse.Op.Relation(objects, []);
      this.parent.set(this.key, change);
      this.targetClassName = change._targetClassName;
    }
119226
function Set(source) {
  HashMap.call(this);
  this._rtype = TYPE_NAMES.SET;
  if(source) {
    this.sadd(source);
  }
}
1333268
public void setSourceAlgorithms(java.util.Collection<SourceAlgorithm> sourceAlgorithms) {
        if (sourceAlgorithms == null) {
            this.sourceAlgorithms = null;
            return;
        }

        this.sourceAlgorithms = new java.util.ArrayList<SourceAlgorithm>(sourceAlgorithms);
    }
390898
function(callback) {
				SourceCollection.prototype[sourceMethodName].call(
					self, filter, update, sourceOptions, callback
				);
			}
1267580
func (s *CreateInputInput) SetSources(v []*InputSourceRequest) *CreateInputInput {
	s.Sources = v
	return s
}