<commit_before>package org.synyx.plugin.core.config;

import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.ManagedMap;
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
import org.w3c.dom.Element;


/**
 * @author <NAME> - <EMAIL>
 */
public class PluginListDefinitionParser extends
        AbstractSingleBeanDefinitionParser {

    /*
     * (non-Javadoc)
     * 
     * @see
     * org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
     * #getBeanClassName(org.w3c.dom.Element)
     */
    @Override
    protected String getBeanClassName(Element element) {

        return "org.synyx.plugin.core.support.BeanListBeanFactoryPostProcessor";
    }


    /*
     * (non-Javadoc)
     * 
     * @see
     * org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
     * #doParse(org.w3c.dom.Element,
     * org.springframework.beans.factory.support.BeanDefinitionBuilder)
     */
    @Override
    @SuppressWarnings("unchecked")
    protected void doParse(Element element, BeanDefinitionBuilder builder) {

        ManagedMap map = new ManagedMap();
        map.put(element.getAttribute("id"), element.getAttribute("class"));

        builder.addPropertyValue("lists", map);
    }

}<commit_msg> * added parsing of init-factories attribute<commit_after>package org.synyx.plugin.core.config;

import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.ManagedMap;
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
import org.springframework.util.StringUtils;
import org.w3c.dom.Element;


/**
 * @author <NAME> - <EMAIL>
 */
public class PluginListDefinitionParser extends
        AbstractSingleBeanDefinitionParser {

    /*
     * (non-Javadoc)
     * 
     * @see
     * org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
     * #getBeanClassName(org.w3c.dom.Element)
     */
    @Override
    protected String getBeanClassName(Element element) {

        return "org.synyx.plugin.core.support.BeanListBeanFactoryPostProcessor";
    }


    /*
     * (non-Javadoc)
     * 
     * @see
     * org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
     * #doParse(org.w3c.dom.Element,
     * org.springframework.beans.factory.support.BeanDefinitionBuilder)
     */
    @Override
    @SuppressWarnings("unchecked")
    protected void doParse(Element element, BeanDefinitionBuilder builder) {

        ManagedMap map = new ManagedMap();
        map.put(element.getAttribute("id"), element.getAttribute("class"));

        builder.addPropertyValue("lists", map);

        String initFactories = element.getAttribute("init-factories");

        if (StringUtils.hasText(initFactories)) {
            builder.addPropertyValue("allowEagerInit", initFactories);
        }
    }


    /*
     * (non-Javadoc)
     * 
     * @seeorg.springframework.beans.factory.xml.AbstractBeanDefinitionParser#
     * shouldGenerateId()
     */
    @Override
    protected boolean shouldGenerateId() {

        return true;
    }
}
{'fraction_non_alphanumeric': 0.1107963487566887, 'fraction_numerical': 0.0018885741265344666, 'mean_word_length': 3.389502762430939, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 7}, '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': '2281311', 'n_tokens_mistral': 913, 'n_tokens_neox': 880, 'n_words': 123}