private void extractConfigureScriptEvidence ( Dependency dependency , final String name , final String contents ) { final Matcher matcher = PACKAGE_VAR . matcher ( contents ) ; while ( matcher . find ( ) ) { final String variable = matcher . group ( 1 ) ; final String value = matcher . group ( 2 ) ; if ( ! value . isEmpty ( ) ) { if ( variable . endsWith ( "NAME" ) ) { dependency . addEvidence ( EvidenceType . PRODUCT , name , variable , value , Confidence . HIGHEST ) ; } else if ( "VERSION" . equals ( variable ) ) { dependency . addEvidence ( EvidenceType . VERSION , name , variable , value , Confidence . HIGHEST ) ; } else if ( "BUGREPORT" . equals ( variable ) ) { dependency . addEvidence ( EvidenceType . VENDOR , name , variable , value , Confidence . HIGH ) ; } else if ( "URL" . equals ( variable ) ) { dependency . addEvidence ( EvidenceType . VENDOR , name , variable , value , Confidence . HIGH ) ; } } } }
Extracts evidence from the configuration .