<commit_before>package camp.xit.identity.services.config;

import camp.xit.identity.services.google.NoPrivateKeyException;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.security.*;
import java.security.cert.CertificateException;
import java.util.*;
import org.osgi.service.cm.ConfigurationAdmin;
import org.osgi.service.cm.ConfigurationException;
import org.osgi.service.cm.ManagedService;
import org.osgi.service.event.Event;
import org.osgi.service.event.EventAdmin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Configuration implements ManagedService, AppConfiguration {

    private static final Logger log = LoggerFactory.getLogger(Configuration.class);
    public static final String TOPIC_CHANGE = "camp/xit/account/Configuration/CHANGED";
    public static final String CONFIG_PROP = "config";
    private static final String COLLECTIONS_VALUE_SEPARATOR = "|";
    private Dictionary<String, ?> properties;
    private final EventAdmin eventAdmin;
    private final ConfigurationAdmin cfgAdmin;


    public Configuration(EventAdmin eventAdmin, ConfigurationAdmin cfgAdmin) {
        this.eventAdmin = eventAdmin;
        this.cfgAdmin = cfgAdmin;
        try {
            org.osgi.service.cm.Configuration cfg = this.cfgAdmin.getConfiguration("camp.xit.identity");
            log.info("CONFIGURATION: " + cfg.getProperties());
            this.properties = cfg.getProperties();
        } catch (IOException e) {
            log.warn("Can't load configuration", e);
        }
    }


    public String get(String name) {
        Object value = properties.get(name);
        return value != null ? String.valueOf(value) : null;
    }


    public String get(String name, String defaultValue) {
        String value = get(name);<commit_msg>don't log all configuration properties<commit_after>package camp.xit.identity.services.config;

import camp.xit.identity.services.google.NoPrivateKeyException;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.security.*;
import java.security.cert.CertificateException;
import java.util.*;
import org.osgi.service.cm.ConfigurationAdmin;
import org.osgi.service.cm.ConfigurationException;
import org.osgi.service.cm.ManagedService;
import org.osgi.service.event.Event;
import org.osgi.service.event.EventAdmin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Configuration implements ManagedService, AppConfiguration {

    private static final Logger log = LoggerFactory.getLogger(Configuration.class);
    public static final String TOPIC_CHANGE = "camp/xit/account/Configuration/CHANGED";
    public static final String CONFIG_PROP = "config";
    private static final String COLLECTIONS_VALUE_SEPARATOR = "|";
    private Dictionary<String, ?> properties;
    private final EventAdmin eventAdmin;
    private final ConfigurationAdmin cfgAdmin;


    public Configuration(EventAdmin eventAdmin, ConfigurationAdmin cfgAdmin) {
        this.eventAdmin = eventAdmin;
        this.cfgAdmin = cfgAdmin;
        try {
            org.osgi.service.cm.Configuration cfg = this.cfgAdmin.getConfiguration("camp.xit.identity");
            this.properties = cfg.getProperties();
        } catch (IOException e) {
            log.warn("Can't load configuration", e);
        }
    }


    public String get(String name) {
        Object value = properties.get(name);
        return value != null ? String.valueOf(value) : null;
    }


    public String get(String name, String defaultValue) {
        String value = get(name);
{'fraction_non_alphanumeric': 0.09630032644178455, 'fraction_numerical': 0.001088139281828074, 'mean_word_length': 3.8831341301460824, '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': '3022937', 'n_tokens_mistral': 986, 'n_tokens_neox': 966, 'n_words': 235}