<commit_before>package org.displaytag.tld;

import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import javax.servlet.jsp.tagext.TagSupport;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import junit.framework.TestCase;

import org.apache.commons.beanutils.PropertyUtils;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;


/**
 * Reads tlds and check tag classes for declared attributes. This simple reports missing/invalid setters in tag classes.
 * Basic tests only, other tests are performed by the maven-taglib plugin.
 * @author <NAME>
 * @version $Revision$ ($Author$)
 */
public class TldTest extends TestCase
{

    /**
     * logger.
     */
    private static Log log = LogFactory.getLog(TldTest.class);

    /**
     * @see junit.framework.TestCase#getName()
     */
    public String getName()
    {
        return getClass().getName() + "." + super.getName();
    }

    /**
     * Check displaytag 1.2 dtd.
     * @throws Exception any Exception generated during test.
     */
    public void test12Tld() throws Exception
    {
        checkTld("/src/tld/displaytag-12.tld");
    }

    /**
     * Check displaytag EL dtd.
     * @throws Exception any Exception generated during test.
     */
    public void testELTld() throws Exception
    {
        checkTld("/src/tld/displaytag-el-12.tld");
    }

    /**
     * Check the given tld. Assure then:
     * <ul><commit_msg>fix tld location<commit_after>package org.displaytag.tld;

import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import javax.servlet.jsp.tagext.TagSupport;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import junit.framework.TestCase;

import org.apache.commons.beanutils.PropertyUtils;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;


/**
 * Reads tlds and check tag classes for declared attributes. This simple reports missing/invalid setters in tag classes.
 * Basic tests only, other tests are performed by the maven-taglib plugin.
 * @author <NAME>
 * @version $Revision$ ($Author$)
 */
public class TldTest extends TestCase
{

    /**
     * logger.
     */
    private static Log log = LogFactory.getLog(TldTest.class);

    /**
     * @see junit.framework.TestCase#getName()
     */
    public String getName()
    {
        return getClass().getName() + "." + super.getName();
    }

    /**
     * Check displaytag 1.2 dtd.
     * @throws Exception any Exception generated during test.
     */
    public void test12Tld() throws Exception
    {
        checkTld("/src/main/resources/META-INF/displaytag-12.tld");
    }

    /**
     * Check displaytag EL dtd.
     * @throws Exception any Exception generated during test.
     */
    public void testELTld() throws Exception
    {
        checkTld("/src/main/resources/META-INF/displaytag-el-12.tld");
    }

    /**
     * Check the given tld. Assure then:
     * <ul>
{'fraction_non_alphanumeric': 0.11799729364005412, 'fraction_numerical': 0.005953991880920162, 'mean_word_length': 3.2336769759450172, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '4437991', 'n_tokens_mistral': 1159, 'n_tokens_neox': 1132, 'n_words': 271}