dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/DependencyMergingAnalyzer.java
/**
     * Bundling same swift dependencies with the same packagePath but identified
     * by different file type analyzers.
     *
     * @param dependency1 dependency to test
     * @param dependency2 dependency to test
     * @return <code>true</code> if the dependencies appear to be the same;
     * otherwise <code>false</code>
     */
Bundling same swift dependencies with the same packagePath but identified
by different file type analyzers.

@param dependency1 dependency to test
@param dependency2 dependency to test
@return true if the dependencies appear to be the same;
otherwise false
Bundling same swift dependencies with the same packagePath but identified by different file type analyzers . @param dependency1 dependency to test @param dependency2 dependency to test @return true if the dependencies appear to be the same ; otherwise false
private boolean isSameSwiftPackage(Dependency dependency1, Dependency dependency2) {
        if (dependency1 == null || dependency2 == null
                || (!dependency1.getFileName().endsWith(".podspec")
                && !dependency1.getFileName().equals("Package.swift"))
                || (!dependency2.getFileName().endsWith(".podspec")
                && !dependency2.getFileName().equals("Package.swift"))
                || dependency1.getPackagePath() == null
                || dependency2.getPackagePath() == null) {
            return false;
        }
        return dependency1.getPackagePath().equalsIgnoreCase(dependency2.getPackagePath());
    }
private boolean isSameSwiftPackage ( Dependency dependency1 , Dependency dependency2 ) { if ( dependency1 == null || dependency2 == null || ( ! dependency1 . getFileName ( ) . endsWith ( ".podspec" ) && ! dependency1 . getFileName ( ) . equals ( "Package.swift" ) ) || ( ! dependency2 . getFileName ( ) . endsWith ( ".podspec" ) && ! dependency2 . getFileName ( ) . equals ( "Package.swift" ) ) || dependency1 . getPackagePath ( ) == null || dependency2 . getPackagePath ( ) == null ) { return false ; } return dependency1 . getPackagePath ( ) . equalsIgnoreCase ( dependency2 . getPackagePath ( ) ) ; }
Bundling same swift dependencies with the same packagePath but identified
 by different file type analyzers.
Bundling same swift dependencies with the same packagePath but identified by different file type analyzers .