// Path: honeybadger-java/src/main/java/io/honeybadger/util/HBCollectionUtils.java
// public final class HBCollectionUtils {
//     private HBCollectionUtils() { }
// 
//     /**
//      * Checks a collection to see if it is null or empty.
//      * @param collection Collection to check
//      * @return true if null or empty
//      */
//     public static boolean isPresent(final Collection<?> collection) {
//         return collection != null && !collection.isEmpty();
//     }
// 
//     /**
//      * Parses a comma separated string into a collection of values.
//      * This is not a real CSV parser. This is a toy used for processing
//      * configuration values that should never have embedded commas or
//      * quotation marks.
//      *
//      * @param csv CSV string input
//      * @return a collection of values base on CSV
//      */
//     public static Collection<String> parseNaiveCsvString(final String csv) {
//         if (!HBStringUtils.isPresent(csv)) {
//             return Collections.emptyList();
//         }
// 
//         final String[] values = csv.split("(\\s*),(\\s*)");
//         return Arrays.asList(values);
//     }
// }


import io.honeybadger.util.HBCollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.URI;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
        if (value instanceof Number) return ((Number)value).intValue();

        String port = normalizeEmptyAndNullAndDefaultToStringValue(key);

        try {
            return Integer.parseInt(port);
        } catch (NumberFormatException e) {
            logger.warn("Error converting system property to integer. Property: {}",
                    key);
            return null;
        }
    }

    private Set<String> parseCsvStringSetOrPassOnObject(final Object key) {
        Object value = backingMap.get(key);

        if (value == null) return null;

        if (value instanceof Collection) {
            @SuppressWarnings("unchecked")
            Collection<String> collection = (Collection<String>)Collections.checkedCollection(
                    (Collection)value, String.class);
            return new HashSet<>(collection);
        }

        if (value instanceof String) {
            String stringValue = normalizeEmptyAndNullAndDefaultToStringValue(key);
            if (stringValue == null) return null;

            HashSet<String> set = new HashSet<>();
// Path: honeybadger-java/src/main/java/io/honeybadger/util/HBCollectionUtils.java
// public final class HBCollectionUtils {
//     private HBCollectionUtils() { }
// 
//     /**
//      * Checks a collection to see if it is null or empty.
//      * @param collection Collection to check
//      * @return true if null or empty
//      */
//     public static boolean isPresent(final Collection<?> collection) {
//         return collection != null && !collection.isEmpty();
//     }
// 
//     /**
//      * Parses a comma separated string into a collection of values.
//      * This is not a real CSV parser. This is a toy used for processing
//      * configuration values that should never have embedded commas or
//      * quotation marks.
//      *
//      * @param csv CSV string input
//      * @return a collection of values base on CSV
//      */
//     public static Collection<String> parseNaiveCsvString(final String csv) {
//         if (!HBStringUtils.isPresent(csv)) {
//             return Collections.emptyList();
//         }
// 
//         final String[] values = csv.split("(\\s*),(\\s*)");
//         return Arrays.asList(values);
//     }
// }


// Path: honeybadger-java/src/main/java/io/honeybadger/reporter/config/MapConfigContext.java
import io.honeybadger.util.HBCollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.URI;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

        if (value instanceof Number) return ((Number)value).intValue();

        String port = normalizeEmptyAndNullAndDefaultToStringValue(key);

        try {
            return Integer.parseInt(port);
        } catch (NumberFormatException e) {
            logger.warn("Error converting system property to integer. Property: {}",
                    key);
            return null;
        }
    }

    private Set<String> parseCsvStringSetOrPassOnObject(final Object key) {
        Object value = backingMap.get(key);

        if (value == null) return null;

        if (value instanceof Collection) {
            @SuppressWarnings("unchecked")
            Collection<String> collection = (Collection<String>)Collections.checkedCollection(
                    (Collection)value, String.class);
            return new HashSet<>(collection);
        }

        if (value instanceof String) {
            String stringValue = normalizeEmptyAndNullAndDefaultToStringValue(key);
            if (stringValue == null) return null;

            HashSet<String> set = new HashSet<>();
            set.addAll(HBCollectionUtils.parseNaiveCsvString(stringValue));