/*
Check context to see if profiling is enabled by checking
the observer mode in the context.  Generate inline profiling
calls to the observer if it is expecting events to be external
to the MergedClass.
174830
private boolean isProfilingEnabled() {
        Class<?> mergedClass = mUnit.getRuntimeContext();
        boolean profilingEnabled = true;

        try {
            Method a = mergedClass.getDeclaredMethod("getObserverMode");
            int observerMode = ((Integer) a.invoke(null)).intValue();
            profilingEnabled = (observerMode & MergedClass.OBSERVER_ENABLED) != 0 &&
                (observerMode & MergedClass.OBSERVER_EXTERNAL) != 0;
        }
        catch (Exception ex) { profilingEnabled = false; }
        return profilingEnabled;
    }
992489
public static synchronized void sdkInitialize(Context context) {
        if (sdkInitialized == true) {
          return;
        }
        BoltsMeasurementEventListener.getInstance(context.getApplicationContext());
        sdkInitialized = true;
    }
786980
protected void activate(ComponentContext context) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
            Tr.event(this, tc, "activate", context);
        configAdminRef.activate(context);
        variableRegistryRef.activate(context);
        metaTypeServiceRef.activate(context);
        wsConfigurationHelperRef.activate(context);
        bundleContext = priv.getBundleContext(context);

    }
1007420
function(){
		var foundNormalContext = false;
		return function shouldExitAfterFirstNormalContext(currentScope){
			if(foundNormalContext) {
				return true;
			}
			var isNormalContext = !currentScope.isSpecial();
			// leaks some state
			if(isNormalContext) {
				foundNormalContext = true;
			}
			return false;
		};
	}
150973
@SuppressWarnings("unchecked")
    void initThreadContext(WSContextService contextSvc, Map<String, String> execProps) {
        threadContext = contextSvc.captureThreadContext(execProps);
    }
317967
protected void activate(ComponentContext context) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled())
            Tr.event(tc, "activate", context);
        authDataServiceRef.activate(context);
        deferrableSchedXSvcRef.activate(context);
        execSvcRef.activate(context);
        nonDeferrableSchedXSvcRef.activate(context);
        rrsXAResFactorySvcRef.activate(context);
        variableRegistrySvcRef.activate(context);
    }
596736
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            stack = new OpcodeStack();
            localClassTypes = new HashMap<>();
            fieldClassTypes = new HashMap<>();
            JavaClass cls = classContext.getJavaClass();
            Method staticInit = findStaticInitializer(cls);
            if (staticInit != null) {
                setupVisitorForClass(cls);
                doVisitMethod(staticInit);
            }

            super.visitClassContext(classContext);
        } finally {
            stack = null;
            localClassTypes = null;
            fieldClassTypes = null;
        }
    }
109331
public static void startProfileActivity(Context context, int uid) {
        // Ignore call if context is empty, simple work-around when fragment was disconnected from
        // activity
        
        if (context == null) {
            return;
        }
        Bundle b = new Bundle();
        b.putInt(Intents.EXTRA_UID, uid);
        startActivity(context, b, ProfileActivity.class);
    }
1236258
private void performChecks(Contextual<?> contextual) {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "performChecks", this);

        if (!isActive()) {
            throw new ContextNotActiveException();
        }

        if (contextual == null) {
            throw new IllegalArgumentException("Contextual parameter should not be null");
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "performChecks");
    }
154042
public synchronized boolean enableContext(final String contextPath, final String jvmRoute, final List<String> aliases) {
        final Node node = nodes.get(jvmRoute);
        if (node != null) {
            Context context = node.getContext(contextPath, aliases);
            if (context == null) {
                context = node.registerContext(contextPath, aliases);
                UndertowLogger.ROOT_LOGGER.registeringContext(contextPath, jvmRoute);
                UndertowLogger.ROOT_LOGGER.registeringContext(contextPath, jvmRoute, aliases);
                for (final String alias : aliases) {
                    VirtualHost virtualHost = hosts.get(alias);
                    if (virtualHost == null) {
                        virtualHost = new VirtualHost();
                        hosts.put(alias, virtualHost);
                    }
                    virtualHost.registerContext(contextPath, jvmRoute, context);
                }
            }
            context.enable();
            return true;
        }
        return false;
    }
279490
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            if ((runtimeExceptionClass != null) && (exceptionClass != null)) {
                stack = new OpcodeStack();
                declaredCheckedExceptions = new HashSet<>(6);
                JavaClass cls = classContext.getJavaClass();
                classIsFinal = cls.isFinal();
                classIsAnonymous = cls.isAnonymous();
                super.visitClassContext(classContext);
            }
        } finally {
            declaredCheckedExceptions = null;
            stack = null;
        }
    }
1048393
protected Boolean _hasSideEffects(XMemberFeatureCall expression, ISideEffectContext context) {
		return internalHasOperationSideEffects(expression, context, false);
	}
974678
boolean evaluatePureAnnotationAdapters(org.eclipse.xtext.common.types.JvmOperation operation, ISideEffectContext context) {
		int index = -1;
		int i = 0;
		for (final Adapter adapter : operation.eAdapters()) {
			if (adapter.isAdapterForType(AnnotationJavaGenerationAdapter.class)) {
				index = i;
				break;
			}
			++i;
		}
		if (index >= 0) {
			final AnnotationJavaGenerationAdapter annotationAdapter = (AnnotationJavaGenerationAdapter) operation.eAdapters().get(index);
			assert annotationAdapter != null;
			return annotationAdapter.applyAdaptations(this, operation, context);
		}
		return false;
	}
1129252
protected boolean validateInternal(final J2EContext context, final String grantType, final ProfileManager manager,
                                       final UserProfile userProfile) {
        return false;
    }
1369461
@Override
  public void doProfileUpdateAnswerEvent(ClientShSession session, ProfileUpdateRequest request, ProfileUpdateAnswer answer)
      throws InternalException, IllegalDiameterStateException, RouteException, OverloadException {
    // TODO Auto-generated method stub
  }
715079
@Override
    public ClassContext analyze(IAnalysisCache analysisCache, ClassDescriptor descriptor) throws CheckedAnalysisException {

        JavaClass javaClass = analysisCache.getClassAnalysis(JavaClass.class, descriptor);
        ClassContext classContext = new ClassContext(javaClass, AnalysisContext.currentAnalysisContext());
        return classContext;
    }
428750
@AroundInvoke
	public Object monitor(InvocationContext context) throws Exception {
		if (isMonitored(context)) {
			String simonName = getSimonName(context);
			try (Split ignored = SimonManager.getStopwatch(simonName).start()) {
				return context.proceed();
			}
		} else {
			return context.proceed();
		}
	}