boolean (@Nullable PsiAnnotation a, @Nullable PsiAnnotation b) { if (a == null) { return b == null; } if (b == null) { return false; } final String name = a.getQualifiedName(); if (name == null || !name.equals(b.getQualifiedName())) { return false; } final Map<String, PsiAnnotationMemberValue> valueMap1 = new HashMap<>(2); final Map<String, PsiAnnotationMemberValue> valueMap2 = new HashMap<>(2); if (!fillValueMap(a.getParameterList(), valueMap1) || !fillValueMap(b.getParameterList(), valueMap2) || valueMap1.size() != valueMap2.size()) { return false; } for (Map.Entry<String, PsiAnnotationMemberValue> entry : valueMap1.entrySet()) { if (!equal(entry.getValue(), valueMap2.get(entry.getKey()))) { return false; } } return true; }