code: public boolean isBothAccessible(@Nullable JavaModelElement a, @Nullable JavaModelElement b) {
          if (a == null || b == null) {
              return false;
          }
  
          return isAccessible(a) && isAccessible(b);
      }
docs: Checks whether both provided elements are public or protected. If one at least one of them is null, the method
  returns false, because the accessibility cannot be truthfully detected in that case.
  
  @param a first element
  @param b second element
  @return true if both elements are not null and accessible (i.e. public or protected)