<commit_before>package azkaban.project.validator;

import azkaban.project.DirectoryFlowLoader;
import azkaban.project.Project;
import azkaban.utils.Props;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.log4j.Logger;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;

/**
 * Xml implementation of the ValidatorManager. Looks for the property project.validators.xml.file in
 * the azkaban properties.
 *
 * The xml to be in the following form: <azkaban-validators> <validator classname="validator class
 * name"> <!-- optional configurations for each individual validator --> <property key="validator
 * property key" value="validator property value" /> ... </validator> </azkaban-validators>
 */
public class XmlValidatorManager implements ValidatorManager {

  public static final String AZKABAN_VALIDATOR_TAG = "azkaban-validators";
  public static final String VALIDATOR_TAG = "validator";
  public static final String CLASSNAME_ATTR = "classname";<commit_msg>format: properly format the javadoc for the XmlValidatorManager class (#1404)<commit_after>package azkaban.project.validator;

import azkaban.project.DirectoryFlowLoader;
import azkaban.project.Project;
import azkaban.utils.Props;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.log4j.Logger;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;

/**
 * Xml implementation of the ValidatorManager.
 *
 * <p>Looks for the property project.validators.xml.file in the azkaban properties.
 *
 * <p>The xml to be in the following form:
 * <pre>{@code
 * <azkaban-validators>
 *   <validator classname="validator class name">
 *     <!-- optional configurations for each individual validator -->
 *      <property key="validator property key" value="validator property value" />
 *       ...
 *   </validator>
 * </azkaban-validators>
 * }</pre>
 */
public class XmlValidatorManager implements ValidatorManager {

  public static final String AZKABAN_VALIDATOR_TAG = "azkaban-validators";
  public static final String VALIDATOR_TAG = "validator";
  public static final String CLASSNAME_ATTR = "classname";
{'fraction_non_alphanumeric': 0.10512737826507579, 'fraction_numerical': 0.004514672686230248, 'mean_word_length': 5.279352226720648, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, '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': '6650607', 'n_tokens_mistral': 931, 'n_tokens_neox': 931, 'n_words': 236}