void (@NotNull Map<String, List<CandidateInfo>> allMethods, @NotNull PsiMethod method, @NotNull PsiSubstitutor substitutor) { String name = method.getName(); List<CandidateInfo> methods = allMethods.get(name); if (methods == null) { methods = new ArrayList<>(); allMethods.put(name, methods); } methods.add(new CandidateInfo(method, substitutor)); }