<commit_before>/*
 * Copyright (C) The Apache Software Foundation. All rights reserved.
 *
 * This software is published under the terms of the Apache Software
 * License version 1.1, a copy of which has been included with this
 * distribution in the LICENSE.txt file.  */

package org.apache.log4j.varia;

import org.apache.log4j.NDC;
import org.apache.log4j.spi.Filter;
import org.apache.log4j.spi.LoggingEvent;
import org.apache.log4j.helpers.OptionConverter;

/**
   This is a simple filter based on {@link NDC} value matching.

   <p>The filter admits three options <b>ValueToMatch</b> and
   <b>ExactMatch</b> and <b>AcceptOnMatch</b>.

   <p>If a match occurs, then the {@link #decide decide} method
   returns {@link Filter#ACCEPT} but only in case the
   <b>AcceptOnMatch</b> option value is set to <code>true</code>, if
   it is set to <code>false</code> then {@link Filter#DENY} is
   returned. If no match occurs, the {@link #decide decide} method
   returns {@link Filter#NEUTRAL}.

   <p>As the name indicates, the value of <b>ValueToMatch</b> property
   determines the string value to match. If <b>ExactMatch</b> is set
   to true, a match will occur only when the value to match exactly
   matches the NDC value of the logging event.  Otherwise, if the
   <b>ExactMatch</b> property is set to <code>false</code>, a match
   will occur if the NDC value is contained anywhere within the value
   to match. The <b>ExactMatch</b> property is set to<commit_msg>Updated javadoc error.<commit_after>/*
 * Copyright (C) The Apache Software Foundation. All rights reserved.
 *
 * This software is published under the terms of the Apache Software
 * License version 1.1, a copy of which has been included with this
 * distribution in the LICENSE.txt file.  */

package org.apache.log4j.varia;

import org.apache.log4j.NDC;
import org.apache.log4j.spi.Filter;
import org.apache.log4j.spi.LoggingEvent;
import org.apache.log4j.helpers.OptionConverter;

/**
   This is a simple filter based on {@link NDC} value matching.

   <p>The filter admits three options <b>ValueToMatch</b> and
   <b>ExactMatch</b> and <b>AcceptOnMatch</b>.

   <p>If a match occurs, then the {@link #decide decide} method
   returns {@link Filter#ACCEPT} but only in case the
   <b>AcceptOnMatch</b> option value is set to <code>true</code>, if
   it is set to <code>false</code> then {@link Filter#DENY} is
   returned. If no match occurs, the {@link #decide decide} method
   returns {@link Filter#NEUTRAL}.

   <p>As the name indicates, the value of <b>ValueToMatch</b> property
   determines the string value to match. If <b>ExactMatch</b> is set
   to true, a match will occur only when the value to match exactly
   matches the NDC value of the logging event.  Otherwise, if the
   <b>ExactMatch</b> property is set to <code>false</code>, a match
   will occur if the value to match is contained anywhere within the
   NDC value. The <b>ExactMatch</b> property is set to
{'fraction_non_alphanumeric': 0.09780033840947547, 'fraction_numerical': 0.0047377326565143825, 'mean_word_length': 3.910299003322259, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5039020', 'n_tokens_mistral': 914, 'n_tokens_neox': 903, 'n_words': 377}