push current parser state (use at start of new container)
976707
private final void push() {
    if (ptr >= stack.length) {
      // doubling here is probably overkill, but anything that needs to double more than
      // once (32 levels deep) is very atypical anyway.
      byte[] newstack = new byte[stack.length<<1];
      System.arraycopy(stack,0,newstack,0,stack.length);
      stack = newstack;
    }
    stack[ptr++] = state;
  }
1183464
function generateTransitionHelpers(currentState, parsedStates) {
  const buildFnBody = state => (...args) => {
    return PossibleStatesContainer({current: state, data: zip(state.data, args), allStates: parsedStates})
  }

  return parsedStates.reduce(
    (transitions, state) => ({...transitions, [buildFnName('to', state.name)]: buildFnBody(state)}),
    {}
  )
}
875466
def _change_state(name, action, expected, *args, **kwargs):
    '''
    
    '''
    pre = state(name)
    if action != 'restart' and pre == expected:
        return {'result': False,
                'state': {'old': expected, 'new': expected},
                'comment': ('Container \'{0}\' already {1}'
                            .format(name, expected))}
    _client_wrapper(action, name, *args, **kwargs)
    _clear_context()
    try:
        post = state(name)
    except CommandExecutionError:
        # Container doesn't exist anymore
        post = None
    ret = {'result': post == expected,
           'state': {'old': pre, 'new': post}}
    return ret
1028487
def begin(self):
        """"""
        name = 'BOOST_METAPARSE_V1_CPP11_IMPL_STRING_HPP'
        self.out_f.write('#ifndef {0}\n#define {0}\n'.format(name))
        write_autogen_info(self.out_f)
399559
function( startFunc ) {
		var self = this,
			message = self.state === munit.ASSERT_STATE_DEFAULT ? "'" + self.nsPath + "' hasn't been triggered yet" :
				self.state === munit.ASSERT_STATE_SETUP ? "'" + self.nsPath + "' is in the setup processs" :
				self.state === munit.ASSERT_STATE_ACTIVE ? "'" + self.nsPath + "' is active" :
				self.state === munit.ASSERT_STATE_TEARDOWN ? "'" + self.nsPath + "' is in the teardown processs" :
				self.state === munit.ASSERT_STATE_CLOSED ? "'" + self.nsPath + "' is closed" :
				self.state === munit.ASSERT_STATE_FINISHED ? "'" + self.nsPath + "' is finished" :
				"'" + self.nsPath + "' is in an unknown state";

		throw new munit.AssertionError( message, startFunc || self._stateError );
	}
1179982
def push_current(self, project):
        """"""
        if __debug__:
            from .targets import ProjectTarget
            assert isinstance(project, ProjectTarget)
        self.saved_current_project.append(self.current_project)
        self.current_project = project
1335701
function initializeState(requester, updateParams) {
        var currentRequester = requester || "";
        _updateParams = updateParams;
        installerPath = path.resolve(updateDir, updateParams.installerName);
        postMessageToBrackets(MessageIds.NOTIFY_INITIALIZATION_COMPLETE, currentRequester);
    }
717903
function initialize(done) {
		debug('prepare');

		parser(options.index, options, function(err,  modules) {
			if(err) return done(err)

			debug('Parser return, now build the tree...');
			tree          = buildTree(options, modules, true);

			debug('Tree builded');

			// Extract from tree as a flatten list of packets to compile
			packets       = tree.getAllBundles(options);

			done(null);
		})

	}
440188
def start
      puts "\n******************************************************************************************************************************************\n\n"
      puts "  JumpStarting....\n".purple
      check_setup
      execute_install_command
      run_scripts_from_yaml(:run_after_install_command)
      parse_template_dir
      create_dirs
      populate_files_from_whole_templates
      populate_files_from_append_templates
      populate_files_from_line_templates
      remove_unwanted_files
      run_scripts_from_yaml(:run_after_jumpstart)
      check_for_strings_to_replace
      run_scripts_from_yaml(:run_after_string_replace)
      check_local_nginx_configuration
      exit_with_success
    end
878806
def _prepack(self):
        '''
        
        '''
        current = self
        while current is not None:
            current._parser.prepack(current, skip_self = True)
            current = getattr(current, '_sub', None)
        current = self
        while current is not None:
            current._parser.prepack(current, skip_sub = True)
            current = getattr(current, '_sub', None)
938530
function pushLoadingState(xhrEvent, stateName, modelOrCollection, context, force) {
        var currentLoads = getState(stateName, context),
            currentlyLoading = currentLoads && currentLoads.length;
        if (!currentLoads) {
            currentLoads = [];
        }
        if (_.isArray(currentLoads)) {
            if (_.indexOf(currentLoads, xhrEvent) >= 0) {
                if (!force) {
                    return;
                }
                
            } else {
                currentLoads.push(xhrEvent);
            }
            
            if (!currentlyLoading) {
                var toSet = {};
                toSet[stateName] = currentLoads;
                setState(toSet, context);
            }

            xhrEvent.on('complete', function() {
                popLoadingState(xhrEvent, stateName, modelOrCollection, context);
            });
        }
    }
1048908
function askForDockerPushCommand() {
    if (this.regenerate) return;

    const done = this.async();

    const prompts = [
        {
            type: 'input',
            name: 'dockerPushCommand',
            message: 'What command should we use for push Docker image to repository?',
            default: this.dockerPushCommand ? this.dockerPushCommand : 'docker push'
        }
    ];

    this.prompt(prompts).then(props => {
        this.dockerPushCommand = props.dockerPushCommand;
        done();
    });
}
14080
protected void pushContext() {
    antOut = System.out;
    antErr = System.err;
    System.setOut(new PrintStream(out));
    System.setErr(out == err ? System.out : new PrintStream(err));
  }
1156308
function parseState (cb) {
    if (my.command === 'init') return cb(null)
    if ( isEmpty(my.state.bins) ) {
      return cb( erf('Please initialize a bin before continuing') )
    }
    if ( !getActiveBin(my.state.bins)
         && (my.command !== 'checkout') ) {
      return cb( erf("Please use 'checkout' <bin> command to activate a bin") )
    }
    cb(null)
  }
76151
private void tryInitialize(boolean checkTermination) {
        if (runState == 0) { // bootstrap by locking static field
            int p = config & SMASK;
            int n = (p > 1) ? p - 1 : 1; // ensure at least 2 slots
            n |= n >>> 1;    // create workQueues array with size a power of two
            n |= n >>> 2;
            n |= n >>> 4;
            n |= n >>> 8;
            n |= n >>> 16;
            n = ((n + 1) << 1) & SMASK;
            AuxState aux = new AuxState();
            WorkQueue[] ws = new WorkQueue[n];
            synchronized (modifyThreadPermission) { // double-check
                if (runState == 0) {
                    workQueues = ws;
                    auxState = aux;
                    runState = STARTED;
                }
            }
        }
        if (checkTermination && runState < 0) {
            tryTerminate(false, false); // help terminate
            throw new RejectedExecutionException();
        }
    }
1096113
def push_state(self):
        

        new = dict(self.states[-1])
        self.states.append(new)
        return self.state
21883
function (container) {
                if (container[parProp]) {
                    // back references already present, nothing to do
                    return;
                }
                // back references are not present yet
                container[parProp] = [];
                for (var childName in container) {
                    if (container.hasOwnProperty(childName) && __includePropForBackRef(childName)) {
                        var childValue = container[childName];
                        if (__isValidContainer(childValue)) {
                            this.__checkBackRefs(childValue);
                            // Add the container reference and property name to the child 'aria:parent' array
                            childValue[parProp].push({
                                parent : container,
                                property : childName
                            });
                            this.$raiseEvent({
                                name : 'aria-parent-metadata-added',
                                child: childValue,
                                parent: container,
                                property: childName
                            });
                        }
                    }
                }
            }