Returns the current delegation execution or null if the
execution is not available.

@return the current delegation execution or null if not available
772127
public static DelegateExecution getCurrentDelegationExecution() {
    BpmnExecutionContext bpmnExecutionContext = Context.getBpmnExecutionContext();
    ExecutionEntity executionEntity = null;
    if (bpmnExecutionContext != null) {
      executionEntity = bpmnExecutionContext.getExecution();
    }
    return executionEntity;
  }
85434
protected FlowElement getCurrentFlowElement(final ExecutionEntity execution) {
    if (execution.getCurrentFlowElement() != null) {
      return execution.getCurrentFlowElement();
    } else if (execution.getCurrentActivityId() != null) {
      String processDefinitionId = execution.getProcessDefinitionId();
      org.activiti.bpmn.model.Process process = ProcessDefinitionUtil.getProcess(processDefinitionId);
      String activityId = execution.getCurrentActivityId();
      FlowElement currentFlowElement = process.getFlowElement(activityId, true);
      return currentFlowElement;
    }
    return null;
  }
27879
public final I getInvocation(Object protocolKey)
  {
    I invocation = null;

    // XXX: see if can remove this
    LruCache<Object,I> invocationCache = _invocationCache;

    if (invocationCache != null) {
      invocation = invocationCache.get(protocolKey);
    }

    if (invocation == null) {
      return null;
    }
    else if (invocation.isModified()) {
      return null;
    }
    else {
      return invocation;
    }
  }
426111
@Override
	public Status execute () {
		return GdxAI.getTimepiece().getTime() - startTime < timeout ? Status.RUNNING : Status.SUCCEEDED;
	}
978908
public int getPreviousRemaining() {
        int remaining = mPrevRemaining;
        if (remaining < 0) {
            mPrevRemaining = remaining =
                ((mPrev == null) ? 0 : (mPrev.getPreviousRemaining() + 1));
        }
        return remaining;
    }
524818
public Context getInnermostDelegateContext() {
        final Context delegateContext = this.getDelegateContext();

        if (delegateContext instanceof DelegatingContext) {
            return ((DelegatingContext)delegateContext).getInnermostDelegateContext();
        }

        return delegateContext;
    }
943165
@Override
	public final T get() throws InterruptedException, ExecutionException {
		block(0);
		if (!isUnblocked()) throw new InterruptedException();
		if (hasError()) throw new ExecutionException(error);
		if (isCancelled()) throw new ExecutionException(cancel);
		return result;
	}
1157028
public Object getState()
	{
		Map<ElementDescriptor<?>, Object> stateMap = getDepthStateMap(mObjectPullParser.getCurrentDepth(), false);
		if (stateMap == null)
		{
			return null;
		}

		ElementDescriptor<?> currentDescriptor = mObjectPullParser.getCurrentElementDescriptor();
		return stateMap.get(currentDescriptor);
	}
1018415
public FlowElement getCurrentFlowElement() {
    if (currentFlowElement == null) {
      String processDefinitionId = getProcessDefinitionId();
      if (processDefinitionId != null) {
        org.activiti.bpmn.model.Process process = ProcessDefinitionUtil.getProcess(processDefinitionId);
        currentFlowElement = process.getFlowElement(getCurrentActivityId(), true);
      }
    }
    return currentFlowElement;
  }
1172053
public String getState()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getState"); 
    String state = messageProcessor.getDestinationManager().getLinkIndex().getState(baseDest).toString();
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getState", state); 
    return state;
  }
613
@Override
    public Object preInvoke(String servletName) throws SecurityViolationException, IOException {
        // preInvoke will ensure delegation is done when run-as is specified
        return preInvoke(null, null, servletName, true);
    }
1159892
public boolean isLeader() {
    MemberId leader = this.leader;
    return leader != null && leader.equals(cluster.getMember().memberId());
  }
278379
@Override
	public synchronized T get() {
		@Nullable T checkedObject = this.object;

		if (checkedObject == null) {
			this.object = checkedObject = Objects.requireNonNull(this.initializer.get());
		}
		return checkedObject;
	}
473462
def get(self):
        
        return ExecutionContextContext(
            self._version,
            flow_sid=self._solution['flow_sid'],
            execution_sid=self._solution['execution_sid'],
        )
675985
@Override
    public Throwable getCause() {
        if (exceptions != null && exceptions.size() > 0)
            return (Throwable) exceptions.get(0);
        else
            return null;
    }
57955
public final MobicentsSipSession getSipSession() {
		if(logger.isDebugEnabled()) {
			logger.debug("getSipSession");
		}

		if(sipSession == null && sessionKey == null) {
			sessionKey = getSipSessionKey();
			if(logger.isDebugEnabled()) {
				logger.debug("sessionKey is " + sessionKey);
			}
			if(sessionKey == null) {
				if(sipSession == null) {
					if(transactionApplicationData != null) {
						this.sessionKey =  transactionApplicationData.getSipSessionKey();
						if(logger.isDebugEnabled()) {
							logger.debug("session Key is " + sessionKey + ", retrieved from the txAppData " + transactionApplicationData);
						}
					} else if (transaction != null && transaction.getApplicationData() != null) {
						this.sessionKey =  ((TransactionApplicationData)transaction.getApplicationData()).getSipSessionKey();
						if(logger.isDebugEnabled()) {
							logger.debug("session Key is " + sessionKey + ", retrieved from the transaction txAppData " +
									(TransactionApplicationData)transaction.getApplicationData());
						}
					} else {
						if(logger.isDebugEnabled()) {
							logger.debug("txAppData and transaction txAppData are both null, there is no wya to retrieve the sessionKey anymore");
						}
					}
				} else {
					this.sessionKey = sipSession.getKey();
				}
			}
			if(logger.isDebugEnabled()) {
				logger.debug("sessionKey is " + sessionKey);
			}
		}
		if(sipSession == null && sessionKey != null) {
			if(logger.isDebugEnabled()) {
				logger.debug("session is null, trying to load the session from the sessionKey " + sessionKey);
			}
			final String applicationName = sessionKey.getApplicationName();
			final SipContext sipContext = sipFactoryImpl.getSipApplicationDispatcher().findSipApplication(applicationName);
			SipApplicationSessionKey sipApplicationSessionKey = new SipApplicationSessionKey(sessionKey.getApplicationSessionId(), sessionKey.getApplicationName(), null);
			MobicentsSipApplicationSession sipApplicationSession = sipContext.getSipManager().getSipApplicationSession(sipApplicationSessionKey, false);
			sipSession = sipContext.getSipManager().getSipSession(sessionKey, false, sipFactoryImpl, sipApplicationSession);
			if(logger.isDebugEnabled()) {
				if(sipSession == null) {
					logger.debug("couldn't find any session with sessionKey " + sessionKey);
				} else {
					logger.debug("reloaded session session " + sipSession + " with sessionKey " + sessionKey);
				}
			}
		}
		return sipSession;
	}
1212413
public IoSession getSession() {
        synchronized (lock) {
            if (sessions.isEmpty()) {
                return null;
            } else {
                final Object[] keys = sessions.keySet().toArray();
                for (int i = 0; i < sessions.size(); i++) { //
                    counter++;
                    final int pos = Math.abs(counter % sessions.size());
                    final IoSession session = sessions.get(keys[pos]);
                    if (isAvailable(session)) {
                        return session;
                    }
                }
                return null;
            }
        }
    }