+
+ /**
+ * Find duplicate NormalizedNode instances within a subtree. Duplicates are those, which compare
+ * as equal, but do not refer to the same object.
+ *
+ * @param node A normalized node subtree, may not be null
+ * @return A Map of NormalizedNode/DuplicateEntry relationships.
+ */
+ public static Map<NormalizedNode<?, ?>, DuplicateEntry> findDuplicates(@Nonnull final NormalizedNode<?, ?> node) {
+ return Maps.filterValues(DuplicateFinder.findDuplicates(node), DUPLICATES_ONLY);
+ }