<commit_before>package com.estep.bigcodebang.model

/**
 * Returns properties related to the View project.
 */
class ViewProperty {
    static ViewProperty INSTANCE
    ConfigObject configs

    private ViewProperty() {
        configs = new ConfigSlurper().parse(WebProperty.class)

        final URL url = this.getClass().getClassLoader().getResource("view_project.properties").toURI().toURL()
        final ConfigObject projectProps = new ConfigSlurper().parse(url)
        configs.merge(projectProps)
    }

    private static ViewProperty instanceOf() {
        if (INSTANCE == null) {
            INSTANCE = new ViewProperty()
        }
        return INSTANCE
    }

    /**
     * Returns the value of the supplied property.
     *
     * @param propertyName the property.
     * @return the value or null if not found.
     */
    static String get(propertyName) {
        ViewProperty manager = ViewProperty.instanceOf()
        def value

        def elements = propertyName.split("\\.")
        for (element in elements) {
            value = value == null ? manager.configs[element] : value[element]
        }

        value instanceof ConfigObject ? null : value
    }
}
<commit_msg>Windows file paths.<commit_after>package com.estep.bigcodebang.model

/**
 * Returns properties related to the View project.
 */
class ViewProperty {
    static ViewProperty INSTANCE
    ConfigObject configs

    private ViewProperty() {
        configs = new ConfigSlurper().parse(WebProperty.class)

        final URL url = this.getClass().getClassLoader().getResource("view_project.properties").toURI().toURL()
        final ConfigObject projectProps = new ConfigSlurper().parse(url)
        configs.merge(projectProps)
    }

    private static ViewProperty instanceOf() {
        if (INSTANCE == null) {
            INSTANCE = new ViewProperty()
        }
        return INSTANCE
    }

    /**
     * Returns the value of the supplied property.
     *
     * @param propertyName the property.
     * @return the value or null if not found.
     */
    static String get(propertyName) {
        ViewProperty manager = ViewProperty.instanceOf()
        def value

        def elements = propertyName.split("\\.")
        for (element in elements) {
            value = value == null ? manager.configs[element] : value[element]
        }

        value = value instanceof ConfigObject ? null : value
        if (value == null) {
            return null;
        }

        String propertyValue = (String) value;
        if (propertyValue != null) {
            propertyValue = propertyValue.replace("\\", "\\\\")
        }
        propertyValue
    }
}

{'fraction_non_alphanumeric': 0.09875612514134942, 'fraction_numerical': 0.0, 'mean_word_length': 2.309226932668329, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1371879', 'n_tokens_mistral': 695, 'n_tokens_neox': 684, 'n_words': 192}