// Path: hawtio-log/src/main/java/io/hawt/log/support/Objects.java
// public final class Objects {
// 
//     public static boolean isBlank(String text) {
//         return text == null || text.trim().length() == 0;
//     }
// 
//     /**
//      * A helper method for comparing objects for equality while handling nulls
//      */
//     public static boolean equal(Object a, Object b) {
//         if (a == b) {
//             return true;
//         }
//         return a != null && b != null && a.equals(b);
//     }
// 
//     /**
//      * A helper method for performing an ordered comparison on the objects
//      * handling nulls and objects which do not handle sorting gracefully
//      *
//      * @param a  the first object
//      * @param b  the second object
//      */
//     @SuppressWarnings("unchecked")
//     public static int compare(Object a, Object b) {
//         if (a == b) {
//             return 0;
//         }
//         if (a == null) {
//             return -1;
//         }
//         if (b == null) {
//             return 1;
//         }
//         if (a instanceof Comparable) {
//             Comparable comparable = (Comparable)a;
//             return comparable.compareTo(b);
//         }
//         int answer = a.getClass().getName().compareTo(b.getClass().getName());
//         if (answer == 0) {
//             answer = a.hashCode() - b.hashCode();
//         }
//         return answer;
//     }
// 
//     public static boolean contains(String matchesText, String... values) {
//         for (String v : values) {
//             if (v != null && v.contains(matchesText)) {
//                 return true;
//             }
//         }
//         return false;
//     }
// }


import java.io.File;
import java.lang.reflect.Method;
import java.net.URL;
import java.security.CodeSource;
import java.util.HashMap;
import java.util.Map;
import io.hawt.log.support.Objects;
                for (int i = 0; i < elements.length; i++) {
                    lines[i + 1] = formatElement(elements[i], classMap);
                }
                return lines;
            } catch (Exception ex) {
            }
        }
        return null;
    }

    /**
     * Format one element from stack trace.
     *
     * @param element  element, may not be null.
     * @param classMap map of class name to location.
     * @return string representation of element.
     */
    private String formatElement(final Object element, final Map classMap) {
        StringBuffer buf = new StringBuffer("\tat ");
        buf.append(element);
        try {
            String className = getClassNameMethod.invoke(element, (Object[])null).toString();
            Object classDetails = classMap.get(className);
            if (classDetails != null) {
                buf.append(classDetails);
            } else {
                Class cls = findClass(className);
                int detailStart = buf.length();
                buf.append('[');
                String mavenCoordinates = MavenCoordHelper.getMavenCoordinates(cls);
// Path: hawtio-log/src/main/java/io/hawt/log/support/Objects.java
// public final class Objects {
// 
//     public static boolean isBlank(String text) {
//         return text == null || text.trim().length() == 0;
//     }
// 
//     /**
//      * A helper method for comparing objects for equality while handling nulls
//      */
//     public static boolean equal(Object a, Object b) {
//         if (a == b) {
//             return true;
//         }
//         return a != null && b != null && a.equals(b);
//     }
// 
//     /**
//      * A helper method for performing an ordered comparison on the objects
//      * handling nulls and objects which do not handle sorting gracefully
//      *
//      * @param a  the first object
//      * @param b  the second object
//      */
//     @SuppressWarnings("unchecked")
//     public static int compare(Object a, Object b) {
//         if (a == b) {
//             return 0;
//         }
//         if (a == null) {
//             return -1;
//         }
//         if (b == null) {
//             return 1;
//         }
//         if (a instanceof Comparable) {
//             Comparable comparable = (Comparable)a;
//             return comparable.compareTo(b);
//         }
//         int answer = a.getClass().getName().compareTo(b.getClass().getName());
//         if (answer == 0) {
//             answer = a.hashCode() - b.hashCode();
//         }
//         return answer;
//     }
// 
//     public static boolean contains(String matchesText, String... values) {
//         for (String v : values) {
//             if (v != null && v.contains(matchesText)) {
//                 return true;
//             }
//         }
//         return false;
//     }
// }


// Path: hawtio-log/src/main/java/io/hawt/log/log4j/ThrowableFormatter.java
import java.io.File;
import java.lang.reflect.Method;
import java.net.URL;
import java.security.CodeSource;
import java.util.HashMap;
import java.util.Map;
import io.hawt.log.support.Objects;

                for (int i = 0; i < elements.length; i++) {
                    lines[i + 1] = formatElement(elements[i], classMap);
                }
                return lines;
            } catch (Exception ex) {
            }
        }
        return null;
    }

    /**
     * Format one element from stack trace.
     *
     * @param element  element, may not be null.
     * @param classMap map of class name to location.
     * @return string representation of element.
     */
    private String formatElement(final Object element, final Map classMap) {
        StringBuffer buf = new StringBuffer("\tat ");
        buf.append(element);
        try {
            String className = getClassNameMethod.invoke(element, (Object[])null).toString();
            Object classDetails = classMap.get(className);
            if (classDetails != null) {
                buf.append(classDetails);
            } else {
                Class cls = findClass(className);
                int detailStart = buf.length();
                buf.append('[');
                String mavenCoordinates = MavenCoordHelper.getMavenCoordinates(cls);
                if (!Objects.isBlank(mavenCoordinates)) {