<commit_before>package org.csstudio.logbook;

import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.Platform;

/** Factory class for obtaining a logbook factory.
 *  @author nypaver
 *  @author <NAME>
 */
public class LogbookFactory
{
    /** Get a logbook factory
     *  @return ILogbookFactory interface
     *  @throws Exception on error
     */
    @SuppressWarnings("nls")
    public static ILogbookFactory getInstance() throws Exception
    {
        final IConfigurationElement[] configs = Platform.getExtensionRegistry()
                .getConfigurationElementsFor(ILogbookFactory.EXTENSION_ID);
        if (configs.length != 1)
            throw new Exception("Got " + configs.length + " instead of 1 "
                    + ILogbookFactory.EXTENSION_ID + " implementations");
        return (ILogbookFactory) configs[0].createExecutableExtension("class");
    }<commit_msg>clarify<commit_after>package org.csstudio.logbook;

import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.Platform;

/** Factory class for obtaining a logbook factory.
 *  @author nypaver
 *  @author <NAME>
 */
public class LogbookFactory
{
    /** Get a logbook factory
     *  @return ILogbookFactory interface
     *  @throws Exception when finding anything but exactly one ELog implementation 
     */
    @SuppressWarnings("nls")
    public static ILogbookFactory getInstance() throws Exception
    {
        final IConfigurationElement[] configs = Platform.getExtensionRegistry()
                .getConfigurationElementsFor(ILogbookFactory.EXTENSION_ID);
        if (configs.length != 1)
            throw new Exception("Got " + configs.length + " instead of 1 "
                    + ILogbookFactory.EXTENSION_ID + " implementations");
        return (ILogbookFactory) configs[0].createExecutableExtension("class");
    }
{'fraction_non_alphanumeric': 0.09361702127659574, 'fraction_numerical': 0.0031914893617021275, 'mean_word_length': 3.275, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4631417', 'n_tokens_mistral': 513, 'n_tokens_neox': 502, 'n_words': 122}