(for example when class of method argument type has not been loaded by class loader)
975518
private List<String> getArgClassQualifiedNames(CtMethod method) throws NotFoundException {
        CtClass[] paramTypes = method.getParameterTypes();
        List<String> result = new ArrayList<>(paramTypes.length);
        for (CtClass paramType : paramTypes) {
            result.add(paramType.getName());
        }
        return result;
    }
75680
private static Class<?> tryLoadClass(String value) {
    try {
      return CLASSLOADER.loadClass(value);
    }
    catch(ClassNotFoundException e) {
      return null;
    }
  }
446156
private void checkRunnable(Class<?> type) {
    if(Runnable.class.isAssignableFrom(type)) {
      try{
        this.method = type.getMethod("run");
      } catch(Exception e) {
        throw new RuntimeException("Cannot get run method of runnable class.", e);
      }
    }
  }
429528
@Override
    @Trivial
    public void addClassLoader(ClassLoader classLoader) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "addClassLoader - " + classLoader);
        }

        if (classLoader instanceof ContainerClassLoader) {
            synchronized (classLoaders) {
                classLoaders.add((ContainerClassLoader) classLoader);
            }
        } else {
            throw new IllegalArgumentException("classLoader is not a ContainerClassLoader");
        }
    }
549187
def _get_not_annotated(func, annotations=None):
    """"""
    argspec = inspect.getfullargspec(func)
    args = argspec.args
    if argspec.defaults is not None:
        args = args[:-len(argspec.defaults)]
    if inspect.isclass(func) or inspect.ismethod(func):
        args = args[1:]  # Strip off ``cls`` or ``self``.
    kwonlyargs = argspec.kwonlyargs
    if argspec.kwonlydefaults is not None:
        kwonlyargs = kwonlyargs[:-len(argspec.kwonlydefaults)]
    annotations = annotations or argspec.annotations
    return [arg for arg in args + kwonlyargs if arg not in annotations]
953857
private void loadMethod() {

		// load method with information from format string
		if (StringUtils.isNotBlank(this.format)) {

			final String[] parts = this.format.split(",");
			if (parts.length == 2) {

				final String fqcn       = parts[0].trim();
				final String methodName = parts[1].trim();

				try {

					final Class type = Class.forName(fqcn);
					this.method      = type.getMethod(methodName);

				} catch (Throwable t) {
					t.printStackTrace();
				}
			}
		}
	}
675167
def _onClass(self, name, line, pos, absPosition,
                 keywordLine, keywordPos,
                 colonLine, colonPos, level):
        """"""
        self.__flushLevel(level)
        c = Class(name, line, pos, absPosition, keywordLine, keywordPos,
                  colonLine, colonPos)
        if self.__lastDecorators is not None:
            c.decorators = self.__lastDecorators
            self.__lastDecorators = None
        self.objectsStack.append(c)
401495
protected void visitGetClassForType(Type classType) {
        if (isLdcFromClassTypeAllowed()) {
            visitLdcInsn(classType);
        } else {
            mv.visitLdcInsn(classType.getClassName());
            mv.visitMethodInsn(
                               INVOKESTATIC,
                               Type.getInternalName(Class.class),
                               "forName",
                               Type.getMethodDescriptor(Type.getType(Class.class), new Type[] { Type.getType(String.class) }), false);
        }
    }
252054
private void validateMethod(Method method, CallbackType callbackType) {
    int modifiers = method.getModifiers();
    if (!Modifier.isPublic(modifiers)) {
      String message = String.format("Method %s in class %s must be public", method.getName(),
          method.getDeclaringClass().getName());
      throw new EntityManagerException(message);
    }
    if (Modifier.isStatic(modifiers)) {
      String message = String.format("Method %s in class %s must not be static", method.getName(),
          method.getDeclaringClass().getName());
      throw new EntityManagerException(message);
    }
    if (Modifier.isAbstract(modifiers)) {
      String message = String.format("Method %s in class %s must not be abstract", method.getName(),
          method.getDeclaringClass().getName());
      throw new EntityManagerException(message);
    }
    Class<?>[] parameters = method.getParameterTypes();
    if (parameters.length != 0) {
      String pattern = "Method %s in class %s is not a valid %s callback method. Method must not "
          + "have any parameters. ";
      String message = String.format(pattern, method.getName(),
          method.getDeclaringClass().getName(), callbackType);
      throw new EntityManagerException(message);
    }
    if (method.getReturnType() != void.class) {
      String message = String.format("Method %s in class %s must have a return type of %s",
          method.getName(), method.getDeclaringClass().getName(), void.class.getName());
      throw new EntityManagerException(message);
    }
  }
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());
        }
    }
253820
def _class_dispatch(args, kwargs):
    """"""
    _ = kwargs
    if not args:
        raise ValueError(
            "Multimethods must be passed at least one positional arg.")

    if not isinstance(args[0], type):
        raise TypeError(
            "class_multimethod must be called with a type, not instance.")

    return args[0]
406440
def resolve_method(state, method_name, class_name, params=(), ret_type=None,
                   include_superclasses=True, init_class=True,
                   raise_exception_if_not_found=False):
    
    base_class = state.javavm_classloader.get_class(class_name)
    if include_superclasses:
        class_hierarchy = state.javavm_classloader.get_class_hierarchy(base_class)
    else:
        class_hierarchy = [base_class]
    # walk up in class hierarchy, until method is found
    for class_descriptor in class_hierarchy:
        java_binary = state.project.loader.main_object
        soot_method = java_binary.get_soot_method(method_name, class_descriptor.name,
                                                  params, none_if_missing=True)
        if soot_method is not None:
            # init the class
            if init_class:
                state.javavm_classloader.init_class(class_descriptor)
            return SootMethodDescriptor.from_soot_method(soot_method)

    # method could not be found
    # => we are executing code that is not loaded (typically library code)
    # => fallback: continue with infos available from the invocation, so we
    #              still can use SimProcedures
    if raise_exception_if_not_found:
        raise SootMethodNotLoadedException()
    else:
        return SootMethodDescriptor(class_name, method_name, params, ret_type=ret_type)
901368
@FFDCIgnore(ClassNotFoundException.class)
    private Class<?> findClassCommonLibraryClassLoaders(String name) throws ClassNotFoundException {
        for (LibertyLoader cl : delegateLoaders) {
            try {
                return cl.findClass(name);
            } catch (ClassNotFoundException e) {
                // Ignore. Will throw at the end if class is not found.
            }
        }
        // If we reached here, then the class was not loaded.
        throw new ClassNotFoundException(name);
    }
114317
def method_missing(method_symbol, *method_args)
      if method_args.length > 0
        _set(method_symbol, method_args.first)
      end

      _get(method_symbol)
    end
968092
private static Method getMethod(final Class<?> mbean,
                                  final String method,
                                  final String... params) {
    try {
      final ClassLoader loader = mbean.getClassLoader();
      final Class<?>[] paramClasses = new Class<?>[params.length];
      for (int i = 0; i < params.length; i++) {
        paramClasses[i] = primitives.get(params[i]);
        if (paramClasses[i] == null) {
          paramClasses[i] = Class.forName(params[i], false, loader);
        }
      }
      return mbean.getMethod(method, paramClasses);
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
      return null;
    }
  }
981952
def method_missing(meth, *args, &block)
      # Check to see if it can be evaluated
      if(matches? meth)
        #Defines the method and caches it to the class
        self.class.send(:define_method, meth) do
          # Splits the method and parameter. See formatize and directionize
          send directionize(meth).to_sym, formatize(meth)
        end
        # calls the method
        send meth, *args, &block
      else
        super
      end
    end
168780
public static void checkUnusedParameters(SQLiteModelMethod method, Set<String> usedMethodParameters, TypeName excludedClasses) {
		int paramsCount = method.getParameters().size();
		int usedCount = usedMethodParameters.size();

		if (paramsCount > usedCount) {
			StringBuilder sb = new StringBuilder();
			String separator = "";
			for (Pair<String, TypeName> item : method.getParameters()) {
				if (excludedClasses != null && item.value1.equals(excludedClasses)) {
					usedCount++;
				} else {
					if (!usedMethodParameters.contains(item.value0)) {
						sb.append(separator + "'" + item.value0 + "'");
						separator = ", ";
					}
				}
			}

			if (paramsCount > usedCount) {
				throw (new InvalidMethodSignException(method, "unused parameter(s) " + sb.toString()));
			}
		}
	}