private boolean vulnerabilitiesMatch ( Dependency dependency1 , Dependency dependency2 ) { final Set < Vulnerability > one = dependency1 . getVulnerabilities ( ) ; final Set < Vulnerability > two = dependency2 . getVulnerabilities ( ) ; return one != null && two != null && one . size ( ) == two . size ( ) && one . containsAll ( two ) ; }
Returns true if the two dependencies have the same vulnerabilities .