Return "isInitialized" Hibernate static method
@param cl - "Hibernate" class instance
@return "isInitialized" Hibernate static method
777874
private static Method getInitializeMethod(Class< ? > cl) {
        Method method = null;
        
        try {
            method = cl.getDeclaredMethod(IS_INITIALIZED, new Class[]{Object.class});
        } catch (NoSuchMethodException e) {
			//in this case 'isInitialized' method can't be null
        } 
        return method;		
    }
70400
public static ClassInfo classInfo(final ClassLoader cl, final Class<?> clasz) {
        return classInfo(cl, clasz.getName());
    }
970399
Reference getInitializingReferenceForConstants() {
    int size = references.size();
    for (int i = 0; i < size; i++) {
      if (isInitializingDeclarationAt(i) || isInitializingAssignmentAt(i)) {
        return references.get(i);
      }
    }
    return null;
  }
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;
    }
332551
public static boolean isSyntheticInit(JCTree stat) {
        if (stat.hasTag(EXEC)) {
            JCExpressionStatement exec = (JCExpressionStatement)stat;
            if (exec.expr.hasTag(ASSIGN)) {
                JCAssign assign = (JCAssign)exec.expr;
                if (assign.lhs.hasTag(SELECT)) {
                    JCFieldAccess select = (JCFieldAccess)assign.lhs;
                    if (select.sym != null &&
                        (select.sym.flags() & SYNTHETIC) != 0) {
                        Name selected = name(select.selected);
                        if (selected != null && selected == selected.table.names._this)
                            return true;
                    }
                }
            }
        }
        return false;
    }
623699
public boolean toPostInit()
   {
     synchronized (this) {
       if (_state == STOPPED) {
         _state = INIT;

         _lastChangeTime = CurrentTime.currentTime();

         notifyListeners(STOPPED, INIT);

         return true;
       }
       else {
         return _state.isInit();
       }
     }
   }
28599
public static ClassLoader getClassLoader(Class<?> cls) {
        ClassLoader cl = cls.getClassLoader();
        if (cl == null) {
            cl = getClassLoader();
        }
        return cl;
    }
1269346
@SuppressWarnings("unchecked")
    public T get() {
        if (HystrixRequestContext.getContextForCurrentThread() == null) {
            throw new IllegalStateException(HystrixRequestContext.class.getSimpleName() + ".initializeContext() must be called at the beginning of each request before RequestVariable functionality can be used.");
        }
        ConcurrentHashMap<HystrixRequestVariableDefault<?>, LazyInitializer<?>> variableMap = HystrixRequestContext.getContextForCurrentThread().state;

        // short-circuit the synchronized path below if we already have the value in the ConcurrentHashMap
        LazyInitializer<?> v = variableMap.get(this);
        if (v != null) {
            return (T) v.get();
        }

        /*
         * Optimistically create a LazyInitializer to put into the ConcurrentHashMap.
         * 
         * The LazyInitializer will not invoke initialValue() unless the get() method is invoked
         * so we can optimistically instantiate LazyInitializer and then discard for garbage collection
         * if the putIfAbsent fails.
         * 
         * Whichever instance of LazyInitializer succeeds will then have get() invoked which will call
         * the initialValue() method once-and-only-once.
         */
        LazyInitializer<T> l = new LazyInitializer<T>(this);
        LazyInitializer<?> existing = variableMap.putIfAbsent(this, l);
        if (existing == null) {
            /*
             * We won the thread-race so can use 'l' that we just created.
             */
            return l.get();
        } else {
            /*
             * We lost the thread-race so let 'l' be garbage collected and instead return 'existing'
             */
            return (T) existing.get();
        }
    }
205587
@SuppressWarnings("unchecked")
    public static boolean isRunnable(Class cl, Method method, List<FilterDefinition> filters) {
        // Get the ROX annotations
        ProbeTest mAnnotation = method.getAnnotation(ProbeTest.class);
        ProbeTestClass cAnnotation = method.getDeclaringClass().getAnnotation(ProbeTestClass.class);

        String fingerprint = FingerprintGenerator.fingerprint(cl, method);

        if (mAnnotation != null || cAnnotation != null) {
            return isRunnable(new FilterTargetData(fingerprint, method, mAnnotation, cAnnotation), filters);
        } else {
            return isRunnable(new FilterTargetData(fingerprint, method), filters);
        }
    }
126266
private boolean shouldEnlist(ConnectionListener cl)
   {
      if (cmConfiguration.isEnlistment() && cl.getManagedConnection() instanceof LazyEnlistableManagedConnection)
         return false;

      return true;
   }
152877
public Session getSession() throws HibernateException
    {
        Session s = threadSession.get();
        if (s == null)
        {
            s = initSession();
        }

        return s;
    }
632823
public I getNewInstance(Class<I> clazz) {
        Constructor<I> ctor;
        try {
            ctor = clazz.getConstructor();
            return ctor.newInstance();
        } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException
                | IllegalArgumentException | InvocationTargetException e) {
            throw new InitializationException("Given class not found", e);
        }
    }
1140149
private void setCL(final ClassLoader cl) {
        PrivilegedAction<Object> action = new PrivilegedAction<Object>() {
            @Override
            @FFDCIgnore(SecurityException.class)
            public Object run() {
                final Thread t = Thread.currentThread();
                try {
                    t.setContextClassLoader(cl);
                } catch (SecurityException e) {
                    // If this work happens to run on an java.util.concurrent.ForkJoinWorkerThread$InnocuousForkJoinWorkerThread,
                    // setting the ClassLoader may be rejected. If this happens, give a decent error message.
                    if (t instanceof ForkJoinWorkerThread && "InnocuousForkJoinWorkerThreadGroup".equals(t.getThreadGroup().getName())) {
                        throw new SecurityException(Tr.formatMessage(tc, "cannot.apply.classloader.context", t.getName()), e);
                    } else {
                        throw e;
                    }
                }
                return null;
            }
        };
        AccessController.doPrivileged(action);
    }
842272
public boolean finalizeNativeLibs(final ClassLoader cl) throws ValidatorManagerException {
    boolean res = false;
    final Class classClassLoader = ClassLoader.class;
    java.lang.reflect.Field nativeLibraries = null;
    try {
      nativeLibraries = classClassLoader.getDeclaredField("nativeLibraries");
    } catch (final NoSuchFieldException e) {
      throw new ValidatorManagerException(e);
    }
    if (nativeLibraries == null) {
      return res;
    }
    nativeLibraries.setAccessible(true);
    Object obj = null;
    try {
      obj = nativeLibraries.get(cl);
    } catch (final IllegalAccessException e) {
      throw new ValidatorManagerException(e);
    }
    if (!(obj instanceof Vector)) {
      return res;
    }
    res = true;
    final Vector java_lang_ClassLoader_NativeLibrary = (Vector) obj;
    for (final Object lib : java_lang_ClassLoader_NativeLibrary) {
      java.lang.reflect.Method finalize = null;
      try {
        finalize = lib.getClass().getDeclaredMethod("finalize", new Class[0]);
      } catch (final NoSuchMethodException e) {
        throw new ValidatorManagerException(e);
      }
      if (finalize != null) {
        finalize.setAccessible(true);
        try {
          finalize.invoke(lib, new Object[0]);
        } catch (final IllegalAccessException e) {
          throw new ValidatorManagerException(e);
        } catch (final InvocationTargetException e) {
          throw new ValidatorManagerException(e);
        }
      }
    }
    return res;
  }
1194367
@Override
	public Context getInitialContext(Hashtable<?,?> environment) throws NamingException
    {
        FFMQJNDIContext context = new FFMQJNDIContext(environment);
        preLoad(context);
        return context;
    }
1240327
static Class<?> reloadClass(ClassLoader cl, Class<?> classType) throws InvocationException {
        try {
            return cl.loadClass(classType.getName());
        } catch (ClassNotFoundException e) {
            throw new InvocationException(e, "Unable to reload class {0} with class loader {1}, previously loaded with {2}",
                    classType.getName(), cl, classType.getClassLoader());
        }
    }
276485
private MethodNode getSoleInitialisingMethod(final Initialisers initialisers) {
        final List<MethodNode> initialisingMethods = initialisers.getMethods();
        final MethodNode result;
        if (!initialisingMethods.isEmpty()) {
            result = initialisingMethods.get(0);
        } else {
            result = null;
        }
        return result;
    }