private static boolean containsConflictingDeclarations(
    Set<String> declarations, PsiElement context) {
    final DeclarationVisitor visitor = new DeclarationVisitor(declarations);
    context.accept(visitor);
    return visitor.hasConflict();
  }
private static boolean containsConflictingDeclarations(
    Set<String> declarations, PsiElement context)