If starter_cls is not a ProcessStarter, assume it's the legacy
        preparefunc and return it bound to a CompatStarter.
775574
def wrap(self, starter_cls):
        
        if isinstance(starter_cls, type) and issubclass(starter_cls, ProcessStarter):
            return starter_cls
        depr_msg = 'Pass a ProcessStarter for preparefunc'
        warnings.warn(depr_msg, DeprecationWarning, stacklevel=3)
        return functools.partial(CompatStarter, starter_cls)
168712
function findAssertionSourceInTrace(trace) {

    var found = null;

    for (var i = 0, l = trace.length; i < l; ++i) {
      if (
        trace[i].file === stSkipStart.file &&
        trace[i].line >= stSkipStart.line &&
        trace[i].line <= stSkipEnd.line
      ) {
        break;
      }
      found = trace[i];
    }

    return found;

  }
470395
private Queue<ImageConfiguration> prepareStart(ServiceHub hub, QueryService queryService, RunService runService, Set<String> imageAliases)
        throws DockerAccessException, MojoExecutionException {
        final Queue<ImageConfiguration> imagesWaitingToStart = new ArrayDeque<>();
        for (StartOrderResolver.Resolvable resolvable : runService.getImagesConfigsInOrder(queryService, getResolvedImages())) {
            final ImageConfiguration imageConfig = (ImageConfiguration) resolvable;

            // Still to check: How to work with linking, volumes, etc ....
            //String imageName = new ImageName(imageConfig.getName()).getFullNameWithTag(registry);
            RunImageConfiguration runConfig = imageConfig.getRunConfiguration();

            RegistryService.RegistryConfig registryConfig = getRegistryConfig(pullRegistry);
            ImagePullManager pullManager = getImagePullManager(determinePullPolicy(runConfig), autoPull);

            hub.getRegistryService().pullImageWithPolicy(imageConfig.getName(), pullManager, registryConfig,
                                                         queryService.hasImage(imageConfig.getName()));

            NetworkConfig config = runConfig.getNetworkingConfig();
            List<String> bindMounts = extractBindMounts(runConfig.getVolumeConfiguration());
            List<VolumeConfiguration> volumes = getVolumes();
            if(!bindMounts.isEmpty() && volumes != null) {
                runService.createVolumesAsPerVolumeBinds(hub, bindMounts, volumes);
            }
            if (autoCreateCustomNetworks && config.isCustomNetwork()) {
                runService.createCustomNetworkIfNotExistant(config.getCustomNetwork());
            }
            imagesWaitingToStart.add(imageConfig);
            updateAliasesSet(imageAliases, imageConfig.getAlias());
        }
        return imagesWaitingToStart;
    }
325399
def startup(api=None):
    """"""
    def startup_wrapper(startup_function):
        apply_to_api = hug.API(api) if api else hug.api.from_object(startup_function)
        apply_to_api.add_startup_handler(startup_function)
        return startup_function
    return startup_wrapper
1129057
def prepare(cls) -> None:
        """"""
        if cls.version is None:
            cls.version = find_version(cls.name)
        if cls.long_description is None:
            cls.long_description = cls.parse_readme()
        if cls.packages is None:
            cls.packages = find_packages(cls.root_directory)
        if cls.install_requires is None:
            cls.install_requires = parse_requirements()
        if cls.python_requires is None:
            cls.python_requires = find_required_python_version(cls.classifiers)
838395
function startClassInit(noDelay) {

			var script = scriptArr.pop(), data;

			var temp = getBaseDir(script.packageName);

			if (typeof loadedScript[temp  + script.Class] == 'object') {
				data = loadedScript[temp  + script.Class];
			}
			loadedScript[temp  + script.Class] = true;
			var temp;
			if(noDelay) {
				compiling_classes = compiling_classes || [];
				compiling_classes.push({script:script, data:data});
			}
			while(temp = compiling_classes.shift()){
				(function(temp){
					fileLoadeManager.onAllFileLoad(temp.script.includes, function(){
						classManager.init(temp.script, temp.data);
					});
				})(temp)
			}
			if(noDelay) {
				return;
			}
			compiling_classes = [];
			compiling_classes.push({script:script, data:data});
			setTimeout(function( ) {
				// Calling classManager after a short delay so that file get
				// completely ready.
				var temp;
				while(temp = compiling_classes.shift()){
					(function(temp){
						fileLoadeManager.onAllFileLoad(temp.script.includes, function(){
							classManager.init(temp.script, temp.data);
						});
					})(temp)
				}
				// fm.holdReady(false);
			}, 0);

		}
605233
@SuppressWarnings("unchecked")
    private ImmutableMap<String, ProcedureRunnerNTGenerator> loadSystemProcedures(boolean startup) {
        ImmutableMap.Builder<String, ProcedureRunnerNTGenerator> builder =
                ImmutableMap.<String, ProcedureRunnerNTGenerator>builder();

        Set<Entry<String,Config>> entrySet = SystemProcedureCatalog.listing.entrySet();
        for (Entry<String, Config> entry : entrySet) {
            String procName = entry.getKey();
            Config sysProc = entry.getValue();

            // transactional sysprocs handled by LoadedProcedureSet
            if (sysProc.transactional) {
                continue;
            }

            final String className = sysProc.getClassname();
            Class<? extends VoltNonTransactionalProcedure> procClass = null;

            // this check is for sysprocs that don't have a procedure class
            if (className != null) {
                try {
                    procClass = (Class<? extends VoltNonTransactionalProcedure>) Class.forName(className);
                }
                catch (final ClassNotFoundException e) {
                    if (sysProc.commercial) {
                        continue;
                    }
                    VoltDB.crashLocalVoltDB("Missing Java class for NT System Procedure: " + procName);
                }

                if (startup) {
                    // This is a startup-time check to make sure we can instantiate
                    try {
                        if ((procClass.newInstance() instanceof VoltNTSystemProcedure) == false) {
                            VoltDB.crashLocalVoltDB("NT System Procedure is incorrect class type: " + procName);
                        }
                    }
                    catch (InstantiationException | IllegalAccessException e) {
                        VoltDB.crashLocalVoltDB("Unable to instantiate NT System Procedure: " + procName);
                    }
                }

                ProcedureRunnerNTGenerator prntg = new ProcedureRunnerNTGenerator(procClass);
                builder.put(procName, prntg);
            }
        }
        return builder.build();
    }
759268
public void start(Path basetDir, Path sampleDir, SampleStartedCallback callback) {

        JettyMavenPluginStdoutListener listener = new JettyMavenPluginStdoutListener();
        MavenProject.load(basetDir).mvnw("-f", sampleDir.toString()).stdout(listener)
                .executeAsync();

        ExecutorContainer.get().execute(() -> {
            callback.onStarted(listener.isSuccess());
        });
    }
101423
protected void ensureProcessDefinitionInitialized() {
    if ((processDefinition == null) && (processDefinitionId != null)) {
      ProcessDefinitionEntity deployedProcessDefinition = Context.getProcessEngineConfiguration().getDeploymentCache()
          .findDeployedProcessDefinitionById(processDefinitionId);
      setProcessDefinition(deployedProcessDefinition);
    }
  }
385011
@NotNull
	@Override
	public final MaterializedPromise<Void> startProcess() {
		if (!processStarted) {
			processStarted = true;
			beforeProcess();
			doProcess();
		}
		return processCompletion;
	}
959209
public synchronized void startup(AppContextWrapper context) {
		ContainerRegistryBuilder cb;
		try {
			cb = (ContainerRegistryBuilder) context.getAttribute(ContainerRegistryBuilder.APPLICATION_CONTEXT_ATTRIBUTE_NAME);
			if (cb == null) {
				Debug.logError("[JdonFramework] at first call prepare method");
				return;
			}
			if (cb.isKernelStartup())
				return;
			ContainerDirector cd = new ContainerDirector(cb);
			cd.startup();
		} catch (Exception ex) {
			Debug.logError(ex, module);
		}
	}
1161931
NuProcess start(List<String> commands, String[] environment, Path cwd)
   {
      callPreStart();

      try {
         createPipes();

         char[] block = getEnvironment(environment);
         Memory env = new Memory(block.length * 3);
         env.write(0, block, 0, block.length);

         STARTUPINFO startupInfo = new STARTUPINFO();
         startupInfo.clear();
         startupInfo.cb = new DWORD(startupInfo.size());
         startupInfo.hStdInput = hStdinWidow;
         startupInfo.hStdError = hStderrWidow;
         startupInfo.hStdOutput = hStdoutWidow;
         startupInfo.dwFlags = NuWinNT.STARTF_USESTDHANDLES;

         processInfo = new PROCESS_INFORMATION();

         DWORD dwCreationFlags = new DWORD(NuWinNT.CREATE_NO_WINDOW | NuWinNT.CREATE_UNICODE_ENVIRONMENT | NuWinNT.CREATE_SUSPENDED);
         char[] cwdChars = (cwd != null) ? Native.toCharArray(cwd.toAbsolutePath().toString()) : null;
         if (!NuKernel32.CreateProcessW(null, getCommandLine(commands), null /*lpProcessAttributes*/, null /*lpThreadAttributes*/, true /*bInheritHandles*/,
                                        dwCreationFlags, env, cwdChars, startupInfo, processInfo)) {
            int lastError = Native.getLastError();
            throw new RuntimeException("CreateProcessW() failed, error: " + lastError);
         }

         afterStart();

         registerProcess();

         callStart();

         NuKernel32.ResumeThread(processInfo.hThread);
      }
      catch (Throwable e) {
         e.printStackTrace();
         onExit(Integer.MIN_VALUE);
      }
      finally {
         NuKernel32.CloseHandle(hStdinWidow);
         NuKernel32.CloseHandle(hStdoutWidow);
         NuKernel32.CloseHandle(hStderrWidow);
      }

      return this;
   }
471185
def start(name):
    '''
    
    '''
    if _service_is_upstart(name):
        cmd = 'start {0}'.format(name)
    else:
        cmd = '/sbin/service {0} start'.format(name)
    return not __salt__['cmd.retcode'](cmd, python_shell=False)
972752
def _get_runner(classpath, main, jvm_options, args, executor,
               cwd, distribution,
               create_synthetic_jar, synthetic_jar_dir):
  """"""

  executor = executor or SubprocessExecutor(distribution)

  safe_cp = classpath
  if create_synthetic_jar:
    safe_cp = safe_classpath(classpath, synthetic_jar_dir)
    logger.debug('Bundling classpath {} into {}'.format(':'.join(classpath), safe_cp))

  return executor.runner(safe_cp, main, args=args, jvm_options=jvm_options, cwd=cwd)
183051
def enable(name, **kwargs):
    '''
    
    '''
    if _service_is_upstart(name):
        return _upstart_enable(name)
    executable = _get_service_exec()
    cmd = '{0} -f {1} defaults'.format(executable, name)
    return not __salt__['cmd.retcode'](cmd, python_shell=False)
270770
def indirectStarter(url, latestSearch):
    """"""
    @classmethod
    def _starter(cls):
        """Get indirect start URL."""
        data = cls.getPage(url)
        return cls.fetchUrl(url, data, latestSearch)
    return _starter
1040271
@Override
    protected void doStart() throws Exception
    {
        log.info("starting...");
        super.doStart();
        _client = newClient(_serverString);
        if (_client == null)
        {
            throw new IllegalStateException("newClient(" + _serverString + ") returns null.");
        }
        log.info("use " + _client.getClass().getSimpleName() + " as client factory.");
        _client.establish();
        log.info("started.");
    }