<commit_before>/*
 * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package net.java.sip.communicator.impl.gui.utils;

import java.util.*;

import net.java.sip.communicator.util.*;

/**
 * Accesses the color resources saved in the colorResources.properties file.
 * 
 * @author <NAME>
 */
public class ColorProperties
{
    /**
     * Logger for this class.
     */
    private static Logger log = Logger.getLogger(ColorProperties.class);

    /**
     * Name of the bundle where we will search for color resources.
     */
    private static final String BUNDLE_NAME
        = "resources.colors.colorResources";

    /**
     * Bundle which handle access to localized resources.
     */
    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
            .getBundle( BUNDLE_NAME,
                        Locale.getDefault(),
                        ColorProperties.class.getClassLoader());

    /**
     * Returns an int RGB color corresponding to the given key.
     *
     * @param key The key of the string.
     *
     * @return An internationalized string corresponding to the given key.
     */
    public static int getColor(String key)
    {
        try
        {
            return Integer.parseInt(RESOURCE_BUNDLE.getString(key), 16);
        }
        catch (MissingResourceException e)
        {
            log.error("Missing color resource.", e);

            return 0xFFFFFF;
        }
    }
}<commit_msg>new method added to get colors as strings<commit_after>/*
 * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package net.java.sip.communicator.impl.gui.utils;

import java.util.*;

import net.java.sip.communicator.util.*;

/**
 * Accesses the color resources saved in the colorResources.properties file.
 * 
 * @author <NAME>
 */
public class ColorProperties
{
    /**
     * Logger for this class.
     */
    private static Logger log = Logger.getLogger(ColorProperties.class);

    /**
     * Name of the bundle where we will search for color resources.
     */
    private static final String BUNDLE_NAME
        = "resources.colors.colorResources";

    /**
     * Bundle which handle access to localized resources.
     */
    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
            .getBundle( BUNDLE_NAME,
                        Locale.getDefault(),
                        ColorProperties.class.getClassLoader());

    /**
     * Returns an int RGB color corresponding to the given key.
     *
     * @param key The key of the string.
     *
     * @return An internationalized string corresponding to the given key.
     */
    public static int getColor(String key)
    {
        try
        {
            return Integer.parseInt(RESOURCE_BUNDLE.getString(key), 16);
        }
        catch (MissingResourceException e)
        {
            log.error("Missing color resource.", e);

            return 0xFFFFFF;
        }
    }

    /**
     * Returns an int RGB color corresponding to the given key.
     *
     * @param key The key of the string.
     *
     * @return An internationalized string corresponding to the given key.
     */
    public static String getColorString(String key)
    {
        try
        {
            return RESOURCE_BUNDLE.getString(key);
        }
        catch (MissingResourceException e)
        {
            log.error("Missing color resource.", e);

            return "0xFFFFFF";
        }
    }
}
{'fraction_non_alphanumeric': 0.08724461623412479, 'fraction_numerical': 0.001932633903920486, 'mean_word_length': 2.101883561643836, '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': '1372735', 'n_tokens_mistral': 979, 'n_tokens_neox': 955, 'n_words': 306}