class CwePolicyEvaluator extends AbstractPolicyEvaluator {

    private static final Logger LOGGER = Logger.getLogger(CwePolicyEvaluator.class);

    /**
     * {@inheritDoc}
     */
    @Override
    public PolicyCondition.Subject supportedSubject() {
        return PolicyCondition.Subject.CWE;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<PolicyConditionViolation> evaluate(final Policy policy, final Component component) {<FILL_FUNCTION_BODY>}

    public boolean matches(final PolicyCondition.Operator operator, final List<Integer> vulnerabilityCwes, final String conditionValue) {

        if (conditionValue == null || vulnerabilityCwes == null) {
            return false;
        }
        if("*".equals(conditionValue.trim())){
            return true;
        }
        List<Integer> cweIdsToMatch = new ArrayList<>();
        List<String> conditionCwes = Arrays.asList(conditionValue.split(","));
        conditionCwes.replaceAll(String::trim);
        conditionCwes.stream().forEach(cwe -> {
            Integer id = CweResolver.getInstance().parseCweString(cwe);
            if(id != null)
                cweIdsToMatch.add(id);
        });
        if (!cweIdsToMatch.isEmpty()) {
            if (PolicyCondition.Operator.CONTAINS_ANY == operator) {
                return CollectionUtils.containsAny(vulnerabilityCwes, cweIdsToMatch);
            } else if (PolicyCondition.Operator.CONTAINS_ALL == operator) {
                return CollectionUtils.containsAll(vulnerabilityCwes, cweIdsToMatch);
            }
        }
        return false;
    }

}

        final List<PolicyConditionViolation> violations = new ArrayList<>();

        final List<PolicyCondition> policyConditions = super.extractSupportedConditions(policy);
        if (policyConditions.isEmpty()) {
            return violations;
        }

        for (final Vulnerability vulnerability : qm.getAllVulnerabilities(component, false)) {
            for (final PolicyCondition condition: policyConditions) {
                LOGGER.debug("Evaluating component (" + component.getUuid() + ") against policy condition (" + condition.getUuid() + ")");
                if (matches(condition.getOperator(), vulnerability.getCwes(), condition.getValue())) {
                    violations.add(new PolicyConditionViolation(condition, component));
                }
            }
        }
        return violations;
    
<methods>public non-sealed void <init>() ,public void setQueryManager(org.dependencytrack.persistence.QueryManager) <variables>protected org.dependencytrack.persistence.QueryManager qm