<commit_before>// Copyright (c) 2003-2014, Jodd Team (jodd.org). All Rights Reserved.

package jodd.madvoc.config;

import jodd.io.StreamUtil;
import jodd.madvoc.ActionWrapper;
import jodd.madvoc.MadvocException;
import jodd.madvoc.component.MadvocConfig;
import jodd.madvoc.filter.ActionFilter;
import jodd.madvoc.interceptor.ActionInterceptor;
import jodd.madvoc.meta.Action;
import jodd.madvoc.result.ActionResult;
import jodd.petite.meta.PetiteInject;
import jodd.typeconverter.Convert;
import jodd.util.ArraysUtil;
import jodd.util.ClassLoaderUtil;
import jodd.util.ReflectUtil;
import jodd.util.StringPool;
import jodd.util.StringUtil;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

/**
 * {@link jodd.madvoc.config.MadvocConfigurator} that reads
 * routes defined in external file <code>madvoc-routes.txt</code>
 * (name can be changed in @link MadvocConfig).
 * <p>
 * These are the routes rules:
 * <ul>
 *     <li>if line ends with <code>\</code>, it continues to the next line.</li>
 *     <li>if line starts with <code>#</code>, it's a comment and it is ignored.</li>
 *     <li>if line starts with <code>@</code> and it contains a <code>=</code> sign,
 *     		it's a variable definition.
 *     		Variables are processed as they appear in the file.</li>
 *     <li>default area is defined by <code>[]</code></li>. Default area defines section
 *     		with the same wrappers.
 *     <li>paths start with <code>/</code>. Action path is first such path
 *     		and result path is last such path.
 *     </li>
 *     <li>flags, like <code>async</code> are defined in words that starts with a <code>#</code>.</li>
 *     <li>target class and method is given in this form: <code>className#methodName</code>.</li>
 *     <li>classes are defined by single word that ends with <code>.class</code>. If class is
 *     		a result class, everything else will be ignored. If class is a wrapper, it overrides
 *     		default wrappers.</li>
 *     <li>alias is defined by last unprocessed word.</li>
 * </ul>
 */<commit_msg>javadoc fixed<commit_after>// Copyright (c) 2003-2014, Jodd Team (jodd.org). All Rights Reserved.

package jodd.madvoc.config;

import jodd.io.StreamUtil;
import jodd.madvoc.ActionWrapper;
import jodd.madvoc.MadvocException;
import jodd.madvoc.component.MadvocConfig;
import jodd.madvoc.filter.ActionFilter;
import jodd.madvoc.interceptor.ActionInterceptor;
import jodd.madvoc.meta.Action;
import jodd.madvoc.result.ActionResult;
import jodd.petite.meta.PetiteInject;
import jodd.typeconverter.Convert;
import jodd.util.ArraysUtil;
import jodd.util.ClassLoaderUtil;
import jodd.util.ReflectUtil;
import jodd.util.StringPool;
import jodd.util.StringUtil;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

/**
 * {@link jodd.madvoc.config.MadvocConfigurator} that reads
 * routes defined in external file <code>madvoc-routes.txt</code>
 * (name can be changed in @link MadvocConfig).
 * <p>
 * These are the routes rules:
 * <ul>
 *     <li>if line ends with <code>\</code>, it continues to the next line.</li>
 *     <li>if line starts with <code>#</code>, it's a comment and it is ignored.</li>
 *     <li>if line starts with <code>@</code> and it contains a <code>=</code> sign,
 *     		it's a variable definition.
 *     		Variables are processed as they appear in the file.</li>
 *     <li>default area is defined by <code>[]</code>. Default area defines section
 *     		with the same wrappers.</li>
 *     <li>paths start with <code>/</code>. Action path is first such path
 *     		and result path is last such path.
 *     </li>
 *     <li>flags, like <code>async</code> are defined in words that starts with a <code>#</code>.</li>
 *     <li>target class and method is given in this form: <code>className#methodName</code>.</li>
 *     <li>classes are defined by single word that ends with <code>.class</code>. If class is
 *     		a result class, everything else will be ignored. If class is a wrapper, it overrides
 *     		default wrappers.</li>
 *     <li>alias is defined by last unprocessed word.</li>
 * </ul>
 */
{'fraction_non_alphanumeric': 0.12511715089034678, 'fraction_numerical': 0.0037488284910965324, 'mean_word_length': 3.7645089285714284, 'pattern_counts': {'":': 0, '<': 89, '<?xml version=': 0, '>': 89, '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': '5833569', 'n_tokens_mistral': 1398, 'n_tokens_neox': 1386, 'n_words': 435}