The suggested simple fix to only include sibling packages if there is a common non-empty super package seems to work quite well. I have compiled a list to show the change in related packages listings generated for the JDK documentation (old output on the left, new output on the right).
https://gist.github.com/hns/d0f946255a69027405836201b047965d/revisions?diff=split I updated the test to include an unlisted sibling package. ------------- Commit messages: - JDK-8265613: False positives for "Related Packages" Changes: https://git.openjdk.java.net/jdk/pull/3655/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3655&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8265613 Stats: 38 lines in 2 files changed: 4 ins; 0 del; 34 mod Patch: https://git.openjdk.java.net/jdk/pull/3655.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/3655/head:pull/3655 PR: https://git.openjdk.java.net/jdk/pull/3655