Reloads the income model directly from the state
516013
def _load_income_model(self):
        """"""
        if not self.state_copy_initialized:
            return
        self.income = None
        income_m = deepcopy(self.state_copy.income)
        income_m.parent = self
        income_m.income = income_m.income
        self.income = income_m
348493
def load(self, model):
        """"""
        self._dawg.load(find_data(model))
        self._loaded_model = True
1288473
public void refresh() {
        QueryCache.instance().purgeTableCache(metaModelLocal);
        Model fresh = ModelDelegate.findById(this.getClass(), getId());
        if (fresh == null) {
            throw new StaleModelException("Failed to refresh self because probably record with " +
                    "this ID does not exist anymore. Stale model: " + this);
        }
        fresh.copyTo(this);
        dirtyAttributeNames.clear();
    }
938735
def restoreState(self):
        
        if os.path.exists(self._stateFile):
            try:
                fp = open(self._stateFile,  'r')
                stateObj = pickle.load(fp)
            except:
                raise IOError("Failure in reading plugin state from file: %s" 
                              % self._stateFile)
            return stateObj
        return None
883575
public static synchronized void reload() {
    map = new HashMap<Class<?>, Object>();
    customProperties = loadFile(CUSTOM_TUNING_FILE_NAME);
    defaultProperties = loadFile(DEFAULT_TUNING_FILE_NAME);
  }
1044574
def reload
      self.attributes = @dealing_platform.account.all.detect { |a| a.account_id == account_id }.attributes
    end
1056516
private void changeStateTo(int newState) {
    int oldState = this.status.getRunState();
    if (oldState == newState) {
      return; //old and new states are same
    }
    this.status.setRunState(newState);

    //update the metrics
    if (oldState == JobStatus.PREP) {
      this.jobtracker.getInstrumentation().decPrepJob(conf, jobId);
    } else if (oldState == JobStatus.RUNNING) {
      this.jobtracker.getInstrumentation().decRunningJob(conf, jobId);
    }

    if (newState == JobStatus.PREP) {
      this.jobtracker.getInstrumentation().addPrepJob(conf, jobId);
    } else if (newState == JobStatus.RUNNING) {
      this.jobtracker.getInstrumentation().addRunningJob(conf, jobId);
    }

  }
634301
def change_state_to(state_name, new_state, trigger = true)
      # use an instance variable for the state storage
      ivar_name = :"@#{state_name}"

      old_state = instance_variable_get(ivar_name)
      instance_variable_set(ivar_name, new_state)

      # Trigger changed on the 'state' method
      if old_state != new_state && trigger
        dep = state_dep_for(state_name, false)
        dep.changed! if dep
      end
    end
1280513
def reload(self):
        

        result = self._client._get(
            self.__class__.base_url(
                self.sys['id']
            )
        )

        self._update_from_resource(result)

        return self
1021454
protected function recalculateTotal(): void
    {
        $this->total = $this->unitsTotal + $this->adjustmentsTotal;

        if ($this->total < 0) {
            $this->total = 0;
        }

        if (null !== $this->order) {
            $this->order->recalculateItemsTotal();
        }
    }
216588
def restore(self, state):
        
        import pickle
        state = pickle.loads(state)
        for k in state:
            if isinstance(state[k], list):
                state[k] = np.array(state[k])
            setattr(self, k, state[k])
443104
def restore(self, state):
        '''

        '''
        self.a = np.array(state['a']).copy()
        self.b = np.array(state['b']).copy()
        self.c = np.array(state['c']).copy()
        self.pivot = np.array(state['pivot']).copy()
        self.position = np.array(state['position']).copy()
1009094
def reload(self):
        
        self._load_data(self.objects.data().filter(key=self.key)[0][0], True)
223327
def transfer_state_data(cls, source_entity, target_entity):
        
        state_data = cls.get_state_data(source_entity)
        cls.set_state_data(target_entity, state_data)
178449
public function reset(): void
    {
        $this->opening = new Record(
            'Opening',
            new Obj(0, $this->date, 'Date'),
            new Text(0, 'AUTOGIRO'),
            new Text(0, str_pad('', 44)),
            new Number(0, $this->bgcNr, 'PayeeBgcNumber'),
            $this->payeeBgNode,
            new Text(0, '  ')
        );
        $this->mandates = [];
        $this->payments = [];
        $this->amendments = [];
    }
491099
def copy_from(self, other_state):
    """"""
    for prop in self.properties().values():
      setattr(self, prop.name, getattr(other_state, prop.name))
570547
function() {
    var model = this._model;
    var arrayTransform = function(result) { // jscs:ignore jsDoc
      return result.rows;
    };
    var modelTransform = function(rows) { // jscs:ignore jsDoc
      return rows.map(model.load.bind(model));
    };

    var dup = this._dup()
      .transform(arrayTransform)
      .transform(modelTransform);

    dup._arrayTransform = arrayTransform;
    dup._modelTransform = modelTransform;

    return dup;
  }