private static HashMap<PsiMethod, Collection<PsiReference>>
  buildReferenceMap(Set<PsiMethod> privateMethods) {
    final HashMap<PsiMethod, Collection<PsiReference>> referenceMap = new HashMap<>();
    for (PsiMethod method : privateMethods) {
      ProgressManager.checkCanceled();
      final SearchScope scope = method.getUseScope();
      final Collection<PsiReference> references = ReferencesSearch.search(method, scope).findAll();
      referenceMap.put(method, references);
    }
    return referenceMap;
  }
private static HashMap<PsiMethod, Collection<PsiReference>>
  buildReferenceMap(Set<PsiMethod> privateMethods)