Returns a copy of the state.
18626
def copy(self):
        

        if self._global_condition is not None:
            raise SimStateError("global condition was not cleared before state.copy().")

        c_plugins = self._copy_plugins()
        state = SimState(project=self.project, arch=self.arch, plugins=c_plugins, options=self.options.copy(),
                         mode=self.mode, os_name=self.os_name)

        if self._is_java_jni_project:
            state.ip_is_soot_addr = self.ip_is_soot_addr

        state.uninitialized_access_handler = self.uninitialized_access_handler
        state._special_memory_filler = self._special_memory_filler
        state.ip_constraints = self.ip_constraints

        return state
472775
def get_state(self, api=None):
        
        api = api or self._API
        return api.get(self._URL['state'].format(id=self.id)).json()
1066668
def copy(self):
        
        kb = KeyBundle()
        kb._keys = self._keys[:]

        kb.cache_time = self.cache_time
        kb.verify_ssl = self.verify_ssl
        if self.source:
            kb.source = self.source
            kb.fileformat = self.fileformat
            kb.keytype = self.keytype
            kb.keyusage = self.keyusage
            kb.remote = self.remote

        return kb
1030253
def Copy(self):
    
    result = QueueManager(store=self.data_store, token=self.token)
    result.prev_frozen_timestamps = self.prev_frozen_timestamps
    result.frozen_timestamp = self.frozen_timestamp
    return result
1204992
def _copy_future_state(source, dest):
    
    assert source.done()
    if dest.cancelled():
        return
    assert not dest.done()
    if source.cancelled():
        dest.cancel()
    else:
        exception = source.exception()
        if exception is not None:
            dest.set_exception(exception)
        else:
            result = source.result()
            dest.set_result(result)
373554
def public_copy(self):
        """"""
        d = dict(chain_code=self._chain_code, depth=self._depth,
                 parent_fingerprint=self._parent_fingerprint,
                 child_index=self._child_index, public_pair=self.public_pair())
        return self.__class__(**d)
753944
def copy(self):
        """"""
        result = self.space.element()
        result.assign(self)
        return result
530864
def get(self, **kwargs):
        
        old_state = self.state.copy()
        self.merge_dict(kwargs)
        result = rendering.InputRenderer.render_nomenclative(self)
        self.merge_dict(old_state)
        return result
423373
def copy(self):
        
        copy = self._queue.copy()

        result = list()
        while not copy.empty():
            result.append(copy.get_nowait())
        return result
862804
function cloneState(state) {
  return {
    options: state.options,
    stack: state.stack.slice(),
    nodes: state.nodes.slice()
  };
}
849204
public static StateObj state(StateObj... states) {
        MutableStateObj mutable = mutable();
        for (StateObj state : states) {
            mutable.updateState(state);
        }
        return state(mutable.getState());
    }
956891
public Map<String, Serializable> getState() {
    Map<String, Serializable> ret = new HashMap<>();
    // get potential eviction policy state
    if (evictionPolicy.getState() != null) {
      ret.put(EVICTION_STATE_KEY, (Serializable) evictionPolicy.getState());
    }
    // get potential trigger policy state
    if (triggerPolicy.getState() != null) {
      ret.put(TRIGGER_STATE_KEY, (Serializable) triggerPolicy.getState());
    }
    ret.put(QUEUE, (Serializable) this.queue);
    ret.put(EXPIRED_EVENTS, (Serializable) this.expiredEvents);
    ret.put(PRE_WINDOW_EVENTS, (Serializable) this.prevWindowEvents);
    ret.put(EVENTS_SINCE_LAST_EXPIRY, this.eventsSinceLastExpiry.get());
    return ret;
  }
809519
def state(self, state):
        """"""
        with self._lock:
            self._value = self._states.index(state)
319534
def getstate(d):
    '''
    '''
    if not isinstance(d, dict):
        raise TypeError("Can only get the state of a dictionary")
    cpd = copy.deepcopy(d)
    cpd.pop('_links', None)
    cpd.pop('_embedded', None)
    return cpd
1022347
public State get() {
    InternalState internalState = currentInternalState.get();
    while (!internalState.isRead) {
      // Slow path, the state is first time read. Change the state only if no other changes
      // happened between the moment initialState is read and this moment. This ensures that this
      // method only changes the isRead part of the internal state.
      currentInternalState.compareAndSet(
          internalState,
          internalState.state == State.ENABLED
              ? InternalState.ENABLED_READ
              : InternalState.DISABLED_READ);
      internalState = currentInternalState.get();
    }
    return internalState.state;
  }
1096113
def push_state(self):
        

        new = dict(self.states[-1])
        self.states.append(new)
        return self.state
1043348
def get_state(self, **kwargs):
        ''''''
        dbdata = self.dbdata
        if 'state' not in dbdata or kwargs:
            dbdata['state'] = ModelState(self, **kwargs)
        return dbdata['state']