dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/SwiftPackageManagerAnalyzer.java
/**
     * Extracts evidence from the package description and adds it to the given
     * evidence collection.
     *
     * @param evidences the evidence collection to update
     * @param packageDescription the text to extract evidence from
     * @param field the name of the field being searched for
     * @param fieldPattern the field pattern within the contents to search for
     * @param confidence the confidence level of the evidence if found
     * @return the string that was added as evidence
     */
Extracts evidence from the package description and adds it to the given
evidence collection.


Extracts evidence from the package description and adds it to the given evidence collection .
private String addStringEvidence(EvidenceCollection evidences,
            String packageDescription, String field, String fieldPattern, Confidence confidence) {
        String value = "";
        final Matcher matcher = Pattern.compile(
                String.format("%s *:\\s*\"([^\"]*)", fieldPattern), Pattern.DOTALL).matcher(packageDescription);
        if (matcher.find()) {
            value = matcher.group(1);
        }
        if (value != null) {
            value = value.trim();
            if (value.length() > 0) {
                evidences.addEvidence(SPM_FILE_NAME, field, value, confidence);
            }
        }
        return value;
    }
private String addStringEvidence ( EvidenceCollection evidences , String packageDescription , String field , String fieldPattern , Confidence confidence ) { String value = "" ; final Matcher matcher = Pattern . compile ( String . format ( "%s *:\\s*\"([^\"]*)" , fieldPattern ) , Pattern . DOTALL ) . matcher ( packageDescription ) ; if ( matcher . find ( ) ) { value = matcher . group ( 1 ) ; } if ( value != null ) { value = value . trim ( ) ; if ( value . length ( ) > 0 ) { evidences . addEvidence ( SPM_FILE_NAME , field , value , confidence ) ; } } return value ; }
Extracts evidence from the package description and adds it to the given
 evidence collection.
Extracts evidence from the package description and adds it to the given evidence collection .