Internal method to set up the object's data
495967
private void setupData(ValidationConfig config, ClassLoader classLoader) {
        // A config object is always used to use a common code path, so the parsed
        // ValidationConfig may be null if a validation.xml wasn't found.
        if (config != null) {
            versionID = config.getVersionID();

            defaultProvider = config.getDefaultProvider();
            defaultProvider = defaultProvider != null ? defaultProvider.trim() : defaultProvider;

            messageInterpolator = config.getMessageInterpolator();
            messageInterpolator = messageInterpolator != null ? messageInterpolator.trim() : messageInterpolator;

            traversableResolver = config.getTraversableResolver();
            traversableResolver = traversableResolver != null ? traversableResolver.trim() : traversableResolver;

            constraintMapping = config.getConstraintMappings();

            constraintValidatorFactory = config.getConstraintValidatorFactory();
            constraintValidatorFactory = constraintValidatorFactory != null ? constraintValidatorFactory.trim() : constraintValidatorFactory;

            properties = config.getProperties();
        }
        appClassloader = classLoader;
    }
573418
function setData(data) {
    let output = [];

    // Clone so that we have our own reference
    data = JSON.parse(JSON.stringify(data));
    
    // Calculate the total height that the scrollbar should be based on the root nodes
    // and all of the items that have been expanded so far.
    let totalHeight = 0;
    forEachExpansion(_(this).expansions, (expansion) => {
        totalHeight += expansion.children;
    });

    updateViewDimensions.call(this, totalHeight);

    // Apply the offsets to the items which is used to keep track of expansions.
    // By ensuring the data has the offset applied to them, we can calculate from
    // here exactly which items are above us and which ones are below us when we 
    // look at the position of the virtual scrollbar.
    for (let i = 0; i < data.length; i++) {
        for (let j = 0; j < data[i].items.length; j++) {
            let item = data[i].items[j];
            item.original = JSON.parse(JSON.stringify(item));
            item.offset = _(this).request[i].offset + j;
            item.parent = data[i].parent;
        }
    }

    // The response from the server should be in a heirarchical structure.
    // This means that we can iterate over this array, and the further we are in the array
    // the deeper the level we're in. 
    //
    // Eg. [null, 1, 1, 2, 3, 3]
    data.forEach((response) => {
        let index = output.findIndex((obj) => {
            return obj.id === response.parent;
        });

        if (index > -1) {
            // If the parent exists, we insert the items directly below it.
            output = output.slice(0, index + 1)
                        .concat(response.items)
                        .concat(output.slice(index + 1));
        } else {
            // If the parent doesn't exist, we prepend. We prepend because of this scenario:
            //
            //       Item 1.1.1
            //    Item 1.2
            //    Item 1.3
            //    Item 1.4
            // Item 2
            // Item 3
            // 
            // In this scenario, we've expanded Item 1, but because it doesn't exist in the output
            // we can only assume it's directly above us. We've also expanded Item 1.1, and again
            // because it's parent isn't visible, and because we know the data is in a heirarchical 
            // structure, we can prepend it.
            output = response.items.concat(output);
        }
    });


    if (_(this).items.length === 0 || _(this).diffMode === 'hard') {
        // Wipe out all of the current items since we don't need them anymore.
        // Easier code wise to just re-instantiate everything and doesn't impact performance.
        while (_(this).items.length) {
            _(this).items.pop().el.remove();
        }


        // Once we've figured out the output, start rendering them
        output.forEach((data) => {
            let item = createItem.call(this, data);
            _(this).view.content.appendChild(item.el);
            _(this).items.push(item);
        });
    } else if (_(this).diffMode === 'soft') {
        // First check what's common, and run updates.
        // We'll also discover what isn't common and therefore track them for removal.
        let removals = [];
        let updated = [];
        _(this).items.forEach((item, index) => {
            let found = false;
            for (let i = 0; i < output.length; i++) {
                if (output[i].id === item.id) {
                    renderItem.call(this, item.el, output[i], true);
                    updated.push(i);
                    found = true;
                    break;
                }
            } 

            if (!found) {
                removals.push(index);
            }
        });

        // Lock the scroll events and track scroll position.
        // When we're adding and removing items, they can adjust
        // the scroll position. So after we made the updates we
        // need to restore the scroll position.
        let oldScrollTop = _(this).view.scrollbar.scrollTop;
        _(this).scrollLocked = true;

        // Remove the items.
        for (let i = removals.length - 1; i >= 0; i--) {
            let index = removals[i];
            _(this).items[index].el.remove();
            _(this).items.splice(index, 1);
        }

        // Insert all of the new items.
        for (let i = 0; i < output.length; i++) {
            if (updated.indexOf(i) === -1) {
                let item = createItem.call(this, output[i]);
                 _(this).view.content.insertBefore(item.el, _(this).view.content.children[i]);
                 _(this).items.splice(i, 0, item);
            }
        }

        // TODO: This can cause a weird slow scrolling bug in Chrome when scrolling up.
        // Was triggered by console.log, could be a latency issue.
        _(this).view.scrollbar.scrollTop = oldScrollTop;
        _(this).scrollLocked = false;
    }
}
726176
protected function setupObject()
    {
        // Clean key from special characters not allowed in constant names
        $this->key = rtrim(preg_replace('/(\W|_)+/', '_', $this->getAttribute("key")), '_');
        $this->className = $this->getAttribute("class");
        $this->pkg = $this->getAttribute("package");
        $this->ancestor = $this->getAttribute("extends");
    }
927582
def fill(self, **kwargs):
        '''  '''
        setattr(self.obj, self.name, self.get(**kwargs))
330343
public void init(Object obj)
    {
        m_bookmark = null;
        m_objectID = null;
        m_dataSource = null;
        m_objectSource = null;
        m_buffer = null;
    }
635880
function(properties_object) {

		for (var i = 0; i < this._count; i++) {

			if (this._content[i].isView) {

				this._content[i].setProperties(properties_object);

			}

		}

	}
1077225
def update(self, data):
        
        for key, value in data.items():
            setattr(self, key, value)
1031604
def set_data(self, data):
		""
		if data is None:
			self.data_size = 0
			self.data = None
			return
		self.data_size = len(data)
		# create a string buffer so that null bytes aren't interpreted
		#  as the end of the string
		self.data = ctypes.cast(ctypes.create_string_buffer(data), ctypes.c_void_p)
488545
protected static function setUpData () {
		$hoops = & static::$meta->hoops;
		$names = & static::$meta->names;
		$expirations = & static::$meta->expirations;
		foreach ($hoops as $name => $hoop) {
			$hoops[$name] -= 1;
		}
		foreach ($names as $name => $one) {
			$unset = [];
			if (isset($hoops[$name])) {
				if ($hoops[$name] < 0) $unset[] = 'hoops';
			}
			if (isset($expirations[$name])) {
				$expiration = $expirations[$name];
				if ($expiration < static::$sessionStartTime) {
					$unset[] = 'expirations';
				} else if ($expiration > static::$sessionMaxTime) {
					static::$sessionMaxTime = $expiration;
				}
			}
			if ($unset) {
				$currentErrRepLevels = error_reporting();
				error_reporting(0);
				foreach ($unset as $unsetKey) {
					if (isset(static::$meta->{$unsetKey}) && isset(static::$meta->{$unsetKey}[$name])) {
						unset(static::$meta->{$unsetKey}[$name]);
					}
				}
				error_reporting($currentErrRepLevels);
				unset($names[$name]);
				unset($_SESSION[$name]);
			}
		}
	}
931710
public void set(Object data, int iOpenMode) throws DBException, RemoteException
    {
        if (m_objCurrentKey == null)
            throw new DBException(Constants.INVALID_RECORD);
        Object key = this.getKey(data);
        if (!key.equals(m_objCurrentKey))
            m_mDataMap.remove(key);
        m_mDataMap.put(key, data);      // Replace the data at this position
        m_objCurrentKey = null;
    }
603920
protected function initData()
    {
        if ($this->data !== null) {
            return;
        }

        if ($this->value !== null) {
            $this->data = $this->value;
            return;
        }

        if ($this->model instanceof Model) {
            $data = ($this->model->hasProperty($this->attribute) || isset($this->model->{$this->attribute}))
                ? ArrayHelper::getValue($this->model, $this->attribute, [])
                : [];

            if (!is_array($data) && empty($data)) {
                return;
            }

            if (!($data instanceof \Traversable)) {
                $data = (array) $data;
            }

            foreach ($data as $index => $value) {
                $this->data[$index] = $value;
            }
        }
    }
679192
function setup(subject) {
        context.subject = subject;
        context.subjectType = null;
        context.subjectConstructor = null;
        context.isSet = false;
    }
1197194
def set_attributes(obj, additional_data):
    
    for key, value in additional_data.items():
        if hasattr(obj, key):
            raise ValueError("Key %s in additional_data already exists in this object" % key)
        setattr(obj, _strip_column_name(key), value)
163166
function _set (data, keys, value) {
  var i = 0;
  var prop;
  var length = keys.length;
  for(; i < length; i ++){
    prop = keys[i];
    if (i === length - 1) {
      // if the last key, set value
      data[prop] = value;
      return;
    }

    if (
      !(prop in data)

      // If the current value is not an object, we will override it.
      // The logic who invoke `.set()` method should make sure `data[prop]` is an object,
      // which `.set()` doesn't concern
      || !is_object(data[prop])
    ) {
      data[prop] = {};
    }

    data = data[prop];
  }
}
1254242
private void initVariables() {
        if (this.currentChunk == null) {
            this.currentChunk = new Instances(this.getModelContext());
        }

        if (this.classDistributions == null) {
            this.classDistributions = new long[this.getModelContext().classAttribute().numValues()];

            for (int i = 0; i < this.classDistributions.length; i++) {
                this.classDistributions[i] = 0;
            }
        }
    }
380172
function(){
      // inherit
      DataObject.prototype.init.call(this);

      // save current values
      var childNodes = this.childNodes;
      var dataSource = this.dataSource;

      // reset values
      if (childNodes)
        this.childNodes = null;

      if (dataSource)
        this.dataSource = null;

      // apply grouping on empty childNodes, because childNodes may contains
      // configs but not Node instances
      var grouping = this.grouping;
      if (grouping)
      {
        this.grouping = null;
        this.setGrouping(grouping);
      }

      // apply child nodes properties
      if (this.childClass)
      {
        this.childNodes = [];

        if (dataSource)
        {
          this.setDataSource(dataSource);
        }
        else
        {
          if (childNodes)
            this.setChildNodes(childNodes);
        }
      }

      // process satellites
      var satellites = this.satellite;
      if (satellites !== NULL_SATELLITE)
      {
        this.satellite = NULL_SATELLITE;
        applySatellites(this, satellites);
      }

      // process owner
      var owner = this.owner;
      if (owner)
      {
        this.owner = null;
        this.setOwner(owner);
      }
    }
404954
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, SYSTEM_ID, 10, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, OBJECT_ID, 10, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CLASS_NAME, 255, null, null);
        field = new FieldInfo(this, DATABASE_NAME, 255, null, null);
        field = new FieldInfo(this, INIT_TIME, 25, null, null);
        field.setDataClass(Date.class);
        field = new FieldInfo(this, FREE_TIME, 25, null, null);
        field.setDataClass(Date.class);
        field = new FieldInfo(this, RECORD_OWNER, 255, null, null);
        field = new FieldInfo(this, STACK_TRACE, 32000, null, null);
    }