called before processing the current
420741
function switchToEmbeddedLanguageIfNecessary(context) {
			var i,
				embeddedLanguage;
			
			for (i = 0; i < context.language.embeddedLanguages.length; i++) {
				if (!languages[context.language.embeddedLanguages[i].language]) {
					//unregistered language
					continue;
				}
				
				embeddedLanguage = clone(context.language.embeddedLanguages[i]);
				
				if (embeddedLanguage.switchTo(context)) {
					embeddedLanguage.oldItems = clone(context.items);
					context.embeddedLanguageStack.push(embeddedLanguage);
					context.language = languages[embeddedLanguage.language];
					context.items = merge(context.items, clone(context.language.contextItems));
					break;
				}
			}
		}
1163398
public void onPrepareMenu(){
        if(mGroupChanged || mMenuDataChanged){
            mToolbar.getViewTreeObserver().addOnGlobalLayoutListener(mOnGlobalLayoutListener);

            Menu menu = mToolbar.getMenu();
            for(int i = 0, count = menu.size(); i < count; i++){
                MenuItem item = menu.getItem(i);
                item.setVisible(item.getGroupId() == mCurrentGroup || item.getGroupId() == 0);
            }

            mMenuDataChanged = false;
        }
    }
700854
public static void before(@NotNull String path, @NotNull Handler handler) {
        staticInstance().before(prefixPath(path), handler);
    }
497187
function setBeforeRouteChangeHandler(handler) {
            if (null == handler) {
                return _beforeRouteChange;
            }
            else {
                var oldHandler = _beforeRouteChange;
                _beforeRouteChange = handler;
                return oldHandler;
            }
        }
311402
def on_self
      scope  = current_scope
      method = scope.lookup(scope.method_call_type, 'self')

      push_value(method.return_value)
    end
294176
protected void _before(SarlCapacityUses uses, IExtraLanguageGeneratorContext context) {
		// Rename the function in order to produce the good features at the calls.
		for (final JvmTypeReference capacity : uses.getCapacities()) {
			final JvmType type = capacity.getType();
			if (type instanceof JvmDeclaredType) {
				computeCapacityFunctionMarkers((JvmDeclaredType) type);
			}
		}
	}
278788
public function _beforeInit()
    {
        $this->pm = $this->add($this->pagemanager_class, $this->pagemanager_options);
        /** @type Controller_PageManager $this->pm */
        $this->pm->parseRequestedURL();
        parent::_beforeInit();
    }
1247483
protected function BeforeGather()
    {  
        if ($this->IsTriggered() && $this->Elements()->Check(Request::MethodArray($this->Method())))
        {
            return $this->OnSuccess();
        }
        return parent::BeforeGather();
    }
725870
private void processNow() {
        List<T> toProcess;
        boolean scheduleNextBatchImmediately = false;
        synchronized (mutex) {
            int count = inbox.size();
            Log.v(Log.TAG_BATCHER, "%s: processNow() called, inbox size: %d", this, count);
            if (count == 0)
                return;
            else if (count <= capacity) {
                toProcess = new ArrayList<T>(inbox);
                inbox.clear();
            } else {
                toProcess = new ArrayList<T>(inbox.subList(0, capacity));
                for (int i = 0; i < capacity; i++)
                    inbox.remove(0);
                scheduleNextBatchImmediately = true;
            }
            mutex.notifyAll();
        }

        synchronized (processMutex) {
            if (toProcess != null && toProcess.size() > 0) {
                Log.v(Log.TAG_BATCHER, "%s: invoking processor %s with %d items",
                        this, processor, toProcess.size());
                processor.process(toProcess);
            } else
                Log.v(Log.TAG_BATCHER, "%s: nothing to process", this);

            synchronized (mutex) {
                lastProcessedTime = System.currentTimeMillis();
                scheduled = false;
                scheduleBatchProcess(scheduleNextBatchImmediately);
                Log.v(Log.TAG_BATCHER, "%s: invoking processor done",
                        this, processor, toProcess.size());
            }
            processMutex.notifyAll();
        }
    }
800561
function onBeforeShow() {
    var trigger = self.hc_.getAnchorElement();
    var ch = self.getChar_(trigger);
    if (ch) {
      goog.dom.setTextContent(self.zoomEl_, self.displayChar_(ch));
      goog.dom.setTextContent(self.unicodeEl_, goog.i18n.uChar.toHexString(ch));
      // Clear the character name since we don't want to show old data because
      // it is retrieved asynchronously and the DOM object is re-used
      goog.dom.setTextContent(self.charNameEl_, '');
      self.charNameFetcher_.getName(ch, function(charName) {
        if (charName) {
          goog.dom.setTextContent(self.charNameEl_, charName);
        }
      });
    }
  }
968334
public function onBeforeWrite()
    {
        parent::onBeforeWrite();

        if (!$this->Sort) {
            if ($this->hasExtension(Versioned::class)) {
                $records = Versioned::get_by_stage(BaseElement::class, Versioned::DRAFT);
            } else {
                $records = BaseElement::get();
            }

            $records = $records->filter('ParentID', $this->ParentID);

            $this->Sort = $records->max('Sort') + 1;
        }
    }
1299671
public void beforeRecover() {
		if (data.getPeriod() > 0) {			
			final long now = System.currentTimeMillis();
			long startTime = data.getStartTime();
			while(startTime <= now) {
				startTime += data.getPeriod();
				data.setStartTime(startTime);				
			}			
			if (logger.isDebugEnabled()) {
				logger.debug("Task with id "
						+ data.getTaskID() + " start time reset to " + data.getStartTime());
			}
		}
	}
768771
public function onBeforeWrite()
    {
        $owner = $this->owner;
        $owner->IDCustomValue = Convert::raw2url($owner->IDCustomValue);
    }
362953
protected function prefetch()
    {
        $this->valid = true;
        $this->current = $this->iterator->current();
        $this->key = $this->iterator->key();

        $this->iterator->next();
        if ( !$this->iterator->valid() ) {
            $this->valid = false;
            $this->end = true;
        }
    }
246634
public void preExecute() throws SQLException {
    lastQueryNanos = System.nanoTime();
    //if connection is closed or failed on slave
    if (this.currentProtocol != null && this.currentProtocol.isClosed()) {
      preAutoReconnect();
    }
  }
1204311
def pre(self, inputstring, **kwargs):
        """"""
        out = self.apply_procs(self.preprocs, kwargs, str(inputstring))
        logger.log_tag("skips", self.skips)
        return out
282242
@Override public void beforeBlock() {
    if (count > 0) {
      try {
        flush();
      } catch (IOException e) {
        logger.log(Level.SEVERE, "Flush from soy failed", e);
      }
    }
  }