Get the initial context.

@return the initial context.
193495
public InitialContext getInitialContext() throws ControlException {
        if (_initialContext != null) {
            return _initialContext;
        }
        Properties props = (Properties) _context.getControlPropertySet(Properties.class);
        String url = nullIfEmpty(props.url());
        String factory = nullIfEmpty(props.factory());
        if (url == null && factory == null) {
            try {
                return new InitialContext();
            }
            catch (NamingException e) {
                throw new ControlException("Cannot get default JNDI initial context", e);
            }

        }
        if (url == null || factory == null) {
            throw new ControlException("Both the provider-url and jndi factory need to be provided");

        }
        Hashtable<String, String> env = new Hashtable<String, String>();
        env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, factory);
        env.put(javax.naming.Context.PROVIDER_URL, url);

        String username = nullIfEmpty(props.jndiSecurityPrincipal());
        if (username != null)
            env.put(javax.naming.Context.SECURITY_PRINCIPAL, username);

        String password = nullIfEmpty(props.jndiSecurityCredentials());
        if (password != null)
            env.put(javax.naming.Context.SECURITY_CREDENTIALS, password);

        try {
            return _initialContext = new InitialContext(env);
        }
        catch (NamingException e) {
            throw new ControlException("Cannot get JNDI initial context at provider '" + url + "' with factory '" + factory + "'", e);
        }
    }
1183168
public DirContext getReadOnlyContext() {
		if (!anonymousReadOnly) {
			return doGetContext(
                    authenticationSource.getPrincipal(),
                    authenticationSource.getCredentials(),
                    DONT_DISABLE_POOLING);
		}
		else {
			return createContext(getAnonymousEnv());
		}
	}
1038555
public Map getDestinationContext()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getDestinationContext");
      
    Map context = foreignDest.getDefinition().getDestinationContext();
      
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getDestinationContext", context);
      
    return context;
  }
25100
@Pure
	public static Object getContext() throws AndroidException {
		final Object ctx;
		synchronized (Android.class) {
			if (context == null) {
				throw new AndroidException();
			}
			ctx = context.get();
		}
		if (ctx == null) {
			throw new AndroidException();
		}
		return ctx;
	}
1331479
public static PageFlowContext getContext() {
        PageFlowContext ctxt = (PageFlowContext) pageflowContext.get();
        if (ctxt == null) {
            ctxt = new PageFlowContext();
            pageflowContext.set(ctxt);
        }
        return ctxt;
    }
623050
public long getStartTick()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getStartTick");
    long startTick=0;
    startTick = msgItem.getMessage().getGuaranteedValueStartTick();

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getStartTick", new Long(startTick));
    return startTick;
  }
1277028
public static void initialize() {
        AccessController.doPrivileged(new PrivilegedAction<Void>() {
            @Override
            public Void run() {
                System.setProperty("java.naming.factory.initial", SingletonInitialContextFactory.class.getName());
                return null;
            }
        });

    }
1194367
@Override
	public Context getInitialContext(Hashtable<?,?> environment) throws NamingException
    {
        FFMQJNDIContext context = new FFMQJNDIContext(environment);
        preLoad(context);
        return context;
    }
213108
public final String getStartFormattedShort() {
        Granularity startGran = this.interval.getStartGranularity();
        return formatStart(startGran != null ? startGran.getShortFormat()
                : null);
    }
1157884
public Context getContext() {
		if (context == null) {
			context = Model.getSingleton().getSession().getContext(this.contextId);
		}
		return context;
	}
531357
public MethodInfo getInitializer() {
        int size = mMethods.size();

        for (int i=0; i<size; i++) {
            MethodInfo method = mMethods.get(i);
            if ("<clinit>".equals(method.getName())) {
                return method;
            }
        }

        return null;
    }
1054198
public function getContext()
    {
        if (!isset($this->context)) {
            $request = $this->container->get('request');

            $this->context = new RequestContext();
            $this->context->fromRequest($request);
        }

        return $this->context;
    }
902125
def get_initial(self):
        
        initial = {}

        if self.kwargs.get('mode', None):
            filename = "{}.txt".format(self.kwargs['mode'])
            filepath = os.path.join(settings.BASE_DIR, 'demo_datas', filename)
            if os.path.exists(filepath):
                with io.open(filepath, 'r', encoding='utf-8') as fp:
                    initial['foo'] = fp.read()

        return initial
1199683
@SuppressWarnings("unchecked")
    public static ISharedContext<IUser> getUserContext() {
        return (ISharedContext<IUser>) ContextManager.getInstance().getSharedContext(UserContext.class.getName());
    }
1229300
def get_context(self):
        
        ctx = self._obj.get_context()
        return _ContextProxy(ctx, self._factory)
119097
public RandomVariable[] getInitialValue() {
		RandomVariable[] initialState = getInitialState();

		RandomVariable[] value = new RandomVariable[initialState.length];
		for(int i= 0; i<value.length; i++) {
			value[i] = applyStateSpaceTransform(i,initialState[i]);
		}

		return value;
	}
1097518
public ServletContext getServletContext()
    {
        RequestContext reqContext = peekRequestContext();
        if (reqContext == null)
            return null;

        return  reqContext._context;
    }