This is called when we need to reinitialize the instance state
545555
def reset(self, lineno=None, offset=None, type_=None):
        
        self.lineno = self.lineno if lineno is None else lineno
        self.type_ = self.type_ if type_ is None else type_
        self.offset = self.offset if offset is None else offset

        self.callable = True
        self.params = SymbolPARAMLIST()
        self.body = SymbolBLOCK()
        self.__kind = KIND.unknown
        self.local_symbol_table = None
1036378
def restart_instance(self, instance):
        
        params = {'state': 'restarted'}
        url = '/instances/{}'.format(instance)
        self.patch_proto(url, params=params)
595409
private void initializeStatically() {
    bindingData.initializeBindings();
    stopwatch.resetAndLog("Binding initialization");

    for (InjectorShell shell : shells) {
      shell.getInjector().index();
    }
    stopwatch.resetAndLog("Binding indexing");

    injectionRequestProcessor.process(shells);
    stopwatch.resetAndLog("Collecting injection requests");

    bindingData.runCreationListeners(errors);
    stopwatch.resetAndLog("Binding validation");

    injectionRequestProcessor.validate();
    stopwatch.resetAndLog("Static validation");

    initializer.validateOustandingInjections(errors);
    stopwatch.resetAndLog("Instance member validation");

    new LookupProcessor(errors).process(shells);
    for (InjectorShell shell : shells) {
      ((DeferredLookups) shell.getInjector().lookups).initialize(errors);
    }
    stopwatch.resetAndLog("Provider verification");

    // This needs to come late since some user bindings rely on requireBinding calls to create
    // jit bindings during the LookupProcessor.
    bindingData.initializeDelayedBindings();
    stopwatch.resetAndLog("Delayed Binding initialization");

    for (InjectorShell shell : shells) {
      if (!shell.getElements().isEmpty()) {
        throw new AssertionError("Failed to execute " + shell.getElements());
      }
    }

    errors.throwCreationExceptionIfErrorsExist();
  }
329817
public function refreshNewInstance($selfedit = "false", $instanceName=null, $instanceClass=null) {
        $moufCache = new MoufCache();
        $moufCache->purgeAll();

        header("Location: newInstance2?selfedit=".$selfedit."&instanceName=".urlencode($instanceName)."&instanceClass=".urlencode($instanceClass));
    }
247282
public void setInitialized() {

    boolean okay = (this.state == STATE_INITIALIZING);
    this.state = STATE_INITIALIZED;
    if (!okay) {
      if (isInitialized()) {
        throw new IllegalStateException("Already initialized.");
      } else {
        throw new IllegalStateException("You need to call setInitializing() before!");
      }
    }
  }
206057
@Override public void onRestoreInstanceState(Parcelable state) {
    if (isInEditMode) return;

    if (!(state instanceof MosbyViewStateSavedState)) {
      delegateCallback.superOnRestoreInstanceState(state);
      return;
    }

    MosbyViewStateSavedState savedState = (MosbyViewStateSavedState) state;
    mosbyViewId = savedState.getMosbyViewId();
    restoreableParcelableViewState = (VS) savedState.getRestoreableViewState();
    delegateCallback.superOnRestoreInstanceState(savedState.getSuperState());
  }
773614
public static void initialize(SingletonProvider instance) {
        synchronized (SingletonProvider.class) {
            if (INSTANCE == null) {
                INSTANCE = instance;
            } else {
                throw new RuntimeException("SingletonProvider is already initialized with " + INSTANCE);
            }
        }
    }
295523
public static void onRestoreInstanceState(Object context, Bundle savedInstanceState) {
		
		if(ProfileService.getInstance(context).isActive(context, Profile.STATE) && savedInstanceState != null) {
			
			long millis = System.currentTimeMillis();
		
			StateService.newInstance(ContextUtils.discover(context)).restore(context, savedInstanceState);
			
			millis = System.currentTimeMillis() - millis;
				
			Log.i("INSTRUMENTATION:IckleStateProfile#onRestoreInstanceState", 
				  StateUtils.class.getClass().getSimpleName() + ": " + millis + "ms");
		}
	}
1098163
private void processNewlyAvailableInstances() {
		synchronized (globalLock) {
			Instance instance;

			while ((instance = newlyAvailableInstances.poll()) != null) {
				if (instance.hasResourcesAvailable()) {
					instancesWithAvailableResources.put(instance.getTaskManagerID(), instance);
				}
			}
		}
	}
894538
def reinitialize_all_clients(self):
        
        for language in self.clients:
            language_client = self.clients[language]
            if language_client['status'] == self.RUNNING:
                folder = self.get_root_path(language)
                instance = language_client['instance']
                instance.folder = folder
                instance.initialize()
684805
public void restoreTransientState(FacesContext context, Object state)
    {
        boolean forceCreate = (state != null);
        TransientStateHelper helper = getTransientStateHelper(forceCreate);

        if (helper != null) {
            helper.restoreTransientState(context, state);
        }
    }
866764
public void reinitialize(InputStream systemIn, PrintStream systemOut, PrintStream systemErr) throws IOException {
        if (reader != null) {
            reader.shutdown();
        }
        initialize(systemIn, systemOut, systemErr);
    }
781594
public function onInit()
    {
        $func = Util::get($this->params, '{init}', null);
        if (is_callable($func)) {
            $this->mapState = $func($data);
        }
    }
677238
def _maybe_wait_for_initializing_instance(instance):
  """"""

  if not instance:
    return

  if instance.state['Name'] == 'initializing':
    while True:
      print(f"Waiting  for {instance} to leave state 'initializing'.")
      instance.reload()
      if instance.state['Name'] == 'running':
        break
      time.sleep(10)
962905
public void addInstance(Object instance)
            throws Exception
    {
        if (isDestroyed()) {
            throw new IllegalStateException("System already stopped");
        }
        else {
            startInstance(instance);
            if (methodsMap.get(instance.getClass()).hasFor(PreDestroy.class)) {
                managedInstances.add(instance);
            }
        }
    }
801024
@Api
	public void refresh() {
		if (state == State.INITIALIZED) { // to prevent refresh before the map is drawn
			state = State.REFRESHING;
			clear();
			ClientConfigurationService.clear(); // refresh because configuration changed, clear cache
			refreshFromConfiguration();
		}
	}
738024
def __initialize_instance(self):
        
        config = self.config

        # Initialize instance of the Authentication class
        self.instance.auth = self.authentication_class(self.app, config=config)

        init_handlers = (
            handlers if config.auth_mode() else auth_mode_agnostic_handlers
        )

        for handler in init_handlers:
            if handler.keys is None:
                self.__check_method_in_auth(handler.name, handler.exception)
            else:
                if all(map(config.get, handler.keys)):
                    self.__check_method_in_auth(
                        handler.name, handler.exception
                    )

        for handler in init_handlers:
            if handler.name in self.kwargs:
                method = self.kwargs.pop(handler.name)
                setattr(self.instance.auth, handler.name, method)