<commit_before>/*
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 *
 */
package org.xwiki.velocity;

import java.util.Properties;

/**
 * Allows creating different Velocity engine instances. This is useful when you need to have
 * different Velocity engines running in the same JVM but with different configurations. Since
 * global templates in Velocity are part of the configuration the only solution to use different
 * global templates is to use different Velocity engines. As an example we need this in XWiki since
 * we want to allow each Skin to provide its own global macros.
 *
 * @version $Id: $
 */
public interface VelocityFactory
{
    /**
     * This component's role, used when code needs to look it up.
     */
    public final static String ROLE = VelocityFactory.class.getName();

    /**
     * @param key the key used to cache the Velocity engine instance to return
     * @return true if there is a cached Velocity Engine matching the passed key
     */
    boolean hasVelocityEngine(String key);

    /**
     * @param key the key used to cache the Velocity engine instance to return
     * @return the cached Velocity engine instance corresponding to the passed or null if not found
     */
    VelocityEngine getVelocityEngine(String key);
<commit_msg>testing $Id expansion once more...<commit_after>/*
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 *
 */
package org.xwiki.velocity;

import java.util.Properties;

/**
 * Allows creating different Velocity engine instances. This is useful when you need to have
 * different Velocity engines running in the same JVM but with different configurations. Since
 * global templates in Velocity are part of the configuration the only solution to use different
 * global templates is to use different Velocity engines. As an example we need this in XWiki since
 * we want to allow each Skin to provide its own global macros.
 *
 * @version $Id $
 */
public interface VelocityFactory
{
    /**
     * This component's role, used when code needs to look it up.
     */
    public final static String ROLE = VelocityFactory.class.getName();

    /**
     * @param key the key used to cache the Velocity engine instance to return
     * @return true if there is a cached Velocity Engine matching the passed key
     */
    boolean hasVelocityEngine(String key);

    /**
     * @param key the key used to cache the Velocity engine instance to return
     * @return the cached Velocity engine instance corresponding to the passed or null if not found
     */
    VelocityEngine getVelocityEngine(String key);

{'fraction_non_alphanumeric': 0.05761994355597366, 'fraction_numerical': 0.0061147695202257765, 'mean_word_length': 3.5438034188034186, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3141114', 'n_tokens_mistral': 1044, 'n_tokens_neox': 1011, 'n_words': 590}