Methods called by states
3248
function ContentDialog_setState(NewState, arg0) {
                    if (!this._disposed) {
                        this._state && this._state.exit();
                        this._state = new NewState();
                        this._state.dialog = this;
                        this._state.enter(arg0);
                    }
                }
1170959
def on(self, event, new_state):
        
        if self.name == new_state.name:
            raise RuntimeError("Use loop method to define {} -> {} -> {}".format(self.name, event.name, new_state.name))
        self._register_transition(event, new_state)
433287
private synchronized void onStateChange(PrimitiveState state) {
    if (this.state != state) {
      if (state == PrimitiveState.EXPIRED) {
        if (connected) {
          onStateChange(PrimitiveState.SUSPENDED);
          recover();
        } else {
          log.debug("State changed: {}", state);
          this.state = state;
          stateChangeListeners.forEach(l -> l.accept(state));
        }
      } else {
        log.debug("State changed: {}", state);
        this.state = state;
        stateChangeListeners.forEach(l -> l.accept(state));
        if (state == PrimitiveState.CLOSED) {
          connectFuture = Futures.exceptionalFuture(new PrimitiveException.ClosedSession());
          session = null;
        }
      }
    }
  }
47256
function(name, data) {
        if (name === ANY_STATE)
          throw new Error('state name "' + ANY_STATE + '" is forbidden')

        data = _.clone(data)
        data.enter = this._collectMethods((data.enter || []))
        data.leave = this._collectMethods((data.leave || []))
        this._states[name] = data
      }
873553
def state_with_scope(*args)
      names = state_without_scope(*args)
      names.each { |name| create_scope(name) if create_scope?(name) }
    end
809519
def state(self, state):
        """"""
        with self._lock:
            self._value = self._states.index(state)
995768
public function listMethodsByStates()
    {
        $methodsList = array();
        foreach ($this->getStatesList() as $stateName => $stateContainer) {
            $methodsList[$stateName] = $stateContainer->listMethods();
        }

        ksort($methodsList);

        return $methodsList;
    }
685592
function (parser, compiler, actions, scope, state) {
	this.state    = state || {};
	this.scope    = scope;
	this.parser   = parser;
	this.actions  = actions;
	this.compiler = compiler;
}
337647
def state_callback(before_or_after = :before)
      method_name = :"#{before_or_after}_#{@order.state}"
      send(method_name) if respond_to?(method_name, true)
    end
899714
private void pushState(final S state) {
        this.state = state;

        header.setHTML(TEMPLATE.header(currentStep().getTitle()));
        clearError();
        body.showWidget(state); // will call onShow(C) for the current step
        footer.back.setEnabled(state != initialState());
        footer.next
                .setHTML(
                        lastStates().contains(state) ? CONSTANTS.common_label_finish() : CONSTANTS.common_label_next());
    }
1217657
@Override
    public void sawOpcode(int seen) {
        switch (state) {
            case IN_CLINIT:
                sawCLInitOpcode(seen);
            break;

            case IN_INIT:
                sawInitOpcode(seen);
            break;

            case IN_METHOD:
                sawMethodOpcode(seen);
            break;
        }
    }
597535
def state_index ( state )
      raise TypeError, ps.class.to_s + ': Incorrectly types for \'state_index\' method of <Parser>.' unless
	state.instance_of? State
	
      @states.each_with_index do |st,i|
	return i if state == st
      end
      raise "State <#{state.statename}> is not exist in Parser."
    end
1094491
def _analyze_states(state: GlobalState) -> List[Issue]:
    
    call = get_call_from_state(state)
    if call is None:
        return []
    issues = []  # type: List[Issue]

    if call.type is not "DELEGATECALL":
        return []
    if state.environment.active_function_name is not "fallback":
        return []

    state = call.state
    address = state.get_current_instruction()["address"]
    meminstart = get_variable(state.mstate.stack[-3])

    if meminstart.type == VarType.CONCRETE:
        issues += _concrete_call(call, state, address, meminstart)

    return issues
1211566
def get_state(self):
        

        self.step_methods = set()
        for s in self.stochastics:
            self.step_methods |= set(self.step_method_dict[s])

        state = Sampler.get_state(self)
        state['step_methods'] = {}

        # The state of each StepMethod.
        for sm in self.step_methods:
            state['step_methods'][sm._id] = sm.current_state().copy()

        return state
744364
public void restoreState(FacesContext context, Object state)
    {
        if (state != null)
        {
            methodExpression = (MethodExpression) state;
        }
    }
113669
public synchronized void checkState(State... requiredStates) throws IllegalStateException {
        for (State requiredState : requiredStates) {
            if (requiredState.equals(currentState)) {
                return;
            }
        }
        throw new IllegalStateException(String.format(Locale.US,
                "Expected states %s, but in state %s", Lists.newArrayList(requiredStates), currentState));
    }
849204
public static StateObj state(StateObj... states) {
        MutableStateObj mutable = mutable();
        for (StateObj state : states) {
            mutable.updateState(state);
        }
        return state(mutable.getState());
    }