Apply modification to the contextStack.
        This method never modifies input parameter list
339128
def getNextContextStack(self, contextStack, data=None):
        
        if self._popsCount:
            contextStack = contextStack.pop(self._popsCount)

        if self._contextToSwitch is not None:
            if not self._contextToSwitch.dynamic:
                data = None
            contextStack = contextStack.append(self._contextToSwitch, data)

        return contextStack
404493
private void updateParamBox() {
        if (this.variedParamValues == null || this.variedParamValues.length == 0) {
            // no varied parameter -> set to empty box
            this.paramBox.removeAllItems();
            this.paramBox.setEnabled(false);
        } else if (this.paramBox.getItemCount() != this.variedParamValues.length) {
            // varied parameter changed -> set the paramBox new
            this.paramBox.removeAllItems();
            for (int i = 0; i < variedParamValues.length; i++) {
                this.paramBox.addItem(String.format("%s: %s", this.variedParamName, this.variedParamValues[i]));
            }
            this.paramBox.setEnabled(true);
        }
    }
376842
public void setContextLimits(int contextStart, int contextLimit) {
        if(contextStart<0) {
            this.contextStart=0;
        } else if(contextStart<=rep.length()) {
            this.contextStart=contextStart;
        } else {
            this.contextStart=rep.length();
        }
        if(contextLimit<this.contextStart) {
            this.contextLimit=this.contextStart;
        } else if(contextLimit<=rep.length()) {
            this.contextLimit=contextLimit;
        } else {
            this.contextLimit=rep.length();
        }
        reachedLimit=false;
    }
1372898
public static void enrichContext(Context context) {
		context.setPostProperty(Context.MEMORY_TOTAL, Runtime.getRuntime().totalMemory());
		context.setPostProperty(Context.MEMORY_FREE, Runtime.getRuntime().freeMemory());
		context.setPostProperty(Context.MEMORY_USED, Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory());
	}
958999
protected void applyContext( ShuttleListBinding binding, Map context ) {
        if( context.containsKey(MODEL_KEY) ) {
            binding.setModel((ListModel) context.get(MODEL_KEY));
        }
        if( context.containsKey(SELECTABLE_ITEMS_HOLDER_KEY) ) {
            binding.setSelectableItemsHolder((ValueModel) context.get(SELECTABLE_ITEMS_HOLDER_KEY));
        }
        if( context.containsKey(SELECTED_ITEMS_HOLDER_KEY) ) {
            binding.setSelectedItemsHolder((ValueModel) context.get(SELECTED_ITEMS_HOLDER_KEY));
        }
        if( context.containsKey(RENDERER_KEY) ) {
            binding.setRenderer((ListCellRenderer) context.get(RENDERER_KEY));
        }
        if( context.containsKey(COMPARATOR_KEY) ) {
            binding.setComparator((Comparator) context.get(COMPARATOR_KEY));
        }
        if( context.containsKey(SELECTED_ITEM_TYPE_KEY) ) {
            binding.setSelectedItemType((Class) context.get(SELECTED_ITEM_TYPE_KEY));
        }
        if( context.containsKey(FORM_ID) ) {
            binding.setFormId((String) context.get(FORM_ID));
        }
    }
83767
protected void modified(ComponentContext context) {
        Dictionary<String, ?> newProperties = context.getProperties();
        modified(newProperties, true);
    }
1071541
@Trivial
    @Modified
    protected void modified(ComponentContext context) {
        Dictionary<String, ?> props = context.getProperties();
        final boolean trace = TraceComponent.isAnyTracingEnabled();
        if (trace && tc.isEntryEnabled())
            Tr.entry(this, tc, "modified", props);

        String contextSvcName = (String) props.get(JNDI_NAME);
        if (contextSvcName == null)
            contextSvcName = (String) props.get(CONFIG_ID);

        ContextServiceImpl[] listeners;

        lock.writeLock().lock();
        try {
            listeners = modificationListeners.toArray(new ContextServiceImpl[modificationListeners.size()]);
            modificationListeners.clear();

            componentContext = context;
            properties = props;
            name = contextSvcName;
            threadContextConfigurations = null;
        } finally {
            lock.writeLock().unlock();
        }

        for (ContextServiceImpl listener : listeners)
            listener.baseInstanceModified();

        if (trace && tc.isEntryEnabled())
            Tr.exit(this, tc, "modified");
    }
1070526
def set_context(self, context):
        """"""
        self._set_context(context, emit=False)
        self._modified = (not context.load_path)
        self.dataChanged.emit(self.CONTEXT_CHANGED |
                              self.REQUEST_CHANGED |
                              self.PACKAGES_PATH_CHANGED |
                              self.LOCKS_CHANGED |
                              self.LOADPATH_CHANGED |
                              self.PACKAGE_FILTER_CHANGED |
                              self.CACHING_CHANGED)
181389
static void apply(final String patchId, final Collection<ContentModification> modifications, final PatchEntry patchEntry, final ContentItemFilter filter) {
        for (final ContentModification modification : modifications) {

            final ContentItem item = modification.getItem();
            // Check if we accept the item
            if (!filter.accepts(item)) {
                continue;
            }

            final Location location = new Location(item);
            final ContentEntry contentEntry = new ContentEntry(patchId, modification);
            ContentTaskDefinition definition = patchEntry.get(location);
            if (definition == null) {
                definition = new ContentTaskDefinition(location, contentEntry, false);
                patchEntry.put(location, definition);
            } else {
                definition.setTarget(contentEntry);
            }
        }
    }
287300
@Override
	public void updateContext() {

		String newInstancePath = (this.parentInstancePath == null ? "" : this.parentInstancePath) + "/" + this.instanceName;
		this.context.instancePathToComponentName.put( newInstancePath, this.componentName );
	}
566684
@Override
    protected void updateStackingContexts()
    {
        super.updateStackingContexts();
        if (stackingParent != null)
        {
            if (formsStackingContext()) //all the positioned boxes are considered as separate stacking contexts
            {
                stackingParent.getStackingContext().registerChildContext(this);
                if (scontext != null) //clear this context if it exists (remove old children)
                    scontext.clear();
            }
        }
    }
978502
def insert_param(self, param):
        
        self._current_params = tuple([param] + list(self._current_params))
13433
def initialize_context(self, request: HttpRequest, *args, **kwargs) -> None:
        
        for key in self.CONTEXT_KEYS:
            setattr(self, key, kwargs.get(key))
        for key in self.QUERY_CONTEXT_KEYS:
            setattr(self, key, request.query_params.get(key))
        self._initialize_context()
        self.validate_context()
186076
function (thisArg, index, context, step, data) {
    var steps = this.steps;
    var stepIndex = steps.indexOf(step);

    if (typeof step !== 'string' || !step) {
      throw Error('The `step` parameter must be a non-empty string');
    }

    if (stepIndex === -1) {
      throw Error('The step `' + step + '` not exists');
    }

    this.next(thisArg, {stepIndex: stepIndex, flowIndex: 0}, context, null, data);

    return this;
  }
343797
def set_context(context):
    """"""
    global _context
    _context = {k: v for k, v in context.items()}
694231
public <T> void contextSet(Class<T> key, T value)
	{
		synchronized (TypeCheckInfo.class)
		{
			Stack<T> contextStack = lookupListForType(key);
			if (contextStack == null)
			{
				contextStack = new Stack<T>();
				context.put(key, contextStack);
			}
			contextStack.push(value);
		}
	}
1277744
private synchronized void removeContext(final EvaluatorContext context) {
    this.contextStack.remove(context);
    this.contextIds.remove(context.getId());
  }