code: public boolean isBothPrivate(@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 (package) private. If one of them is null, the fact cannot be
  determined and therefore this method would return false.
  
  @param a first element
  @param b second element
  @return true if both elements are not null and are private or package private