boolean (@NotNull UElement uElement) { if (uElement instanceof UVariable resolvedUVariable) { if (!isStaticField(resolvedUVariable) && isContextDependentType((resolvedUVariable).getType())) { return true; } } else if (uElement instanceof UMethod calledMethod) { UClass callingContainingClass = UastContextKt.getUastParentOfType(method.getSourcePsi(), UClass.class, true); UClass calledMethodClass = UastContextKt.getUastParentOfType(calledMethod.getSourcePsi(), UClass.class, true); if (calledMethodClass != null && callingContainingClass != null && (callingContainingClass.getSourcePsi() == calledMethodClass.getSourcePsi() || callingContainingClass.getJavaPsi().isInheritor(calledMethodClass.getJavaPsi(), true))) { if (doesMethodViolate(calledMethod, processedMethods)) { return true; } } } return false; }