HierarchicalMethodSignature (@NotNull PsiMethod method, @NotNull GlobalSearchScope resolveScope) { Map<GlobalSearchScope, HierarchicalMethodSignature> signatures = CachedValuesManager.getCachedValue(method, () -> { ConcurrentMap<GlobalSearchScope, HierarchicalMethodSignature> map = ConcurrentFactoryMap.createMap(scope -> { PsiClass aClass = method.getContainingClass(); MethodSignature signature = method.getSignature(PsiSubstitutor.EMPTY); HierarchicalMethodSignature result = null; if (aClass != null) { result = SIGNATURES_BY_NAME_KEY.getValue(aClass).get(Pair.create(method.getName(), scope)).get(signature); } if (result == null) { result = new HierarchicalMethodSignatureImpl((MethodSignatureBackedByPsiMethod)signature); } return result; }); return CachedValueProvider.Result.create(map, PsiModificationTracker.MODIFICATION_COUNT); }); return signatures.get(resolveScope); }