org_apache_dubbo_common_logger_LoggerTest_java
org.apache.logging.log4j.core.pattern.PatternParser
private PatternConverter createConverter(String converterId, StringBuilder currentLiteral, Map<String, Class<PatternConverter>> rules, List<String> options, boolean disableAnsi, boolean noConsoleNoAnsi) {
        Object[] parms;
        String converterName = converterId;
        Class<PatternConverter> converterClass = null;
        if (rules == null) {
            LOGGER.error("Null rules for [" + converterId + ']');
            return null;
        }
        for (int i = converterId.length(); i > 0 && converterClass == null; --i) {
            converterName = converterName.substring(0, i);
            converterClass = rules.get(converterName);
        }
        if (converterClass == null) {
            LOGGER.error("Unrecognized format specifier [" + converterId + ']');
            return null;
        }
        if (AnsiConverter.class.isAssignableFrom(converterClass)) {
            options.add("disableAnsi=" + disableAnsi);
            options.add("noConsoleNoAnsi=" + noConsoleNoAnsi);
        }
        Method[] methods = converterClass.getDeclaredMethods();
        Method newInstanceMethod = null;
        for (Method method : methods) {
            if (!Modifier.isStatic(method.getModifiers()) || !method.getDeclaringClass().equals(converterClass) || !method.getName().equals("newInstance") || !PatternParser.areValidNewInstanceParameters(method.getParameterTypes())) continue;
            if (newInstanceMethod == null) {
                newInstanceMethod = method;
                continue;
            }
            if (!method.getReturnType().equals(newInstanceMethod.getReturnType())) continue;
            LOGGER.error("Class " + converterClass + " cannot contain multiple static newInstance methods");
            return null;
        }
        if (newInstanceMethod == null) {
            LOGGER.error("Class " + converterClass + " does not contain a static newInstance method");
            return null;
        }
        Class<?>[] parmTypes = newInstanceMethod.getParameterTypes();
        Object[] objectArray = parms = parmTypes.length > 0 ? new Object[parmTypes.length] : null;
        if (parms != null) {
            int i = 0;
            boolean errors = false;
            for (Class<Configuration> clazz : parmTypes) {
                if (clazz.isArray() && clazz.getName().equals("[Ljava.lang.String;")) {
                    String[] optionsArray;
                    parms[i] = optionsArray = options.toArray(new String[options.size()]);
                } else if (clazz.isAssignableFrom(Configuration.class)) {
                    parms[i] = this.config;
                } else {
                    LOGGER.error("Unknown parameter type " + clazz.getName() + " for static newInstance method of " + converterClass.getName());
                    errors = true;
                }
                ++i;
            }
            if (errors) {
                return null;
            }
        }
        try {
            Object newObj = newInstanceMethod.invoke(null, parms);
            if (newObj instanceof PatternConverter) {
                currentLiteral.delete(0, currentLiteral.length() - (converterId.length() - converterName.length()));
                return (PatternConverter)newObj;
            }
            LOGGER.warn("Class {} does not extend PatternConverter.", (Object)converterClass.getName());
        }
        catch (Exception ex) {
            LOGGER.error("Error creating converter for " + converterId, (Throwable)ex);
        }
        return null;
    }
 -> java.lang.String.length(): int -> java.lang.String.substring(int,int): java.lang.String -> java.util.Map.get(java.lang.Object): java.lang.Object -> java.lang.Class.isAssignableFrom(java.lang.Class): boolean -> java.lang.Class.getDeclaredMethods(): java.lang.reflect.Method[] -> java.lang.reflect.Method.getModifiers(): int -> java.lang.reflect.Modifier.isStatic(int): boolean -> java.lang.reflect.Method.getModifiers(): int -> java.lang.reflect.Modifier.isStatic(int): boolean -> java.lang.reflect.Method.getModifiers(): int -> java.lang.reflect.Modifier.isStatic(int): boolean -> java.lang.reflect.Method.getModifiers(): int -> java.lang.reflect.Modifier.isStatic(int): boolean -> java.lang.reflect.Method.getModifiers(): int -> java.lang.reflect.Modifier.isStatic(int): boolean -> java.lang.reflect.Method.getDeclaringClass(): java.lang.Class -> java.lang.Object.equals(java.lang.Object): boolean -> java.lang.reflect.Method.getName(): java.lang.String -> java.lang.String.equals(java.lang.Object): boolean -> java.lang.reflect.Method.getParameterTypes(): java.lang.Class[] -> java.lang.Class.isAssignableFrom(java.lang.Class): boolean -> java.lang.Class.isArray(): boolean -> java.lang.Class.getName(): java.lang.String -> java.lang.String.equals(java.lang.Object): boolean -> java.lang.reflect.Method.getParameterTypes(): java.lang.Class[] -> java.lang.Class.isArray(): boolean -> java.lang.Class.getName(): java.lang.String -> java.lang.String.equals(java.lang.Object): boolean -> java.util.List.size(): int -> java.util.List.toArray(java.lang.Object[]): java.lang.Object[] -> java.lang.reflect.Method.invoke(java.lang.Object,java.lang.Object[]): java.lang.Object -> java.lang.StringBuilder.length(): int -> java.lang.String.length(): int -> java.lang.String.length(): int -> java.lang.StringBuilder.delete(int,int): java.lang.StringBuilder
 [CALL] -> java.lang.String.length(): int -> java.lang.String.substring(int,int): java.lang.String -> java.util.Map.get(java.lang.Object): java.lang.Object -> java.lang.Class.isAssignableFrom(java.lang.Class): boolean -> java.lang.Class.getDeclaredMethods(): java.lang.reflect.Method[] -> java.lang.reflect.Method.getModifiers(): int -> java.lang.reflect.Modifier.isStatic(int): boolean -> java.lang.reflect.Method.getModifiers(): int -> java.lang.reflect.Modifier.isStatic(int): boolean -> java.lang.reflect.Method.getModifiers(): int -> java.lang.reflect.Modifier.isStatic(int): boolean -> java.lang.reflect.Method.getModifiers(): int -> java.lang.reflect.Modifier.isStatic(int): boolean -> java.lang.reflect.Method.getModifiers(): int -> java.lang.reflect.Modifier.isStatic(int): boolean -> java.lang.reflect.Method.getDeclaringClass(): java.lang.Class -> java.lang.Object.equals(java.lang.Object): boolean -> java.lang.reflect.Method.getName(): java.lang.String -> java.lang.String.equals(java.lang.Object): boolean -> java.lang.reflect.Method.getParameterTypes(): java.lang.Class[] [CALL] -> java.lang.Class.isAssignableFrom(java.lang.Class): boolean -> java.lang.Class.isArray(): boolean -> java.lang.Class.getName(): java.lang.String -> java.lang.String.equals(java.lang.Object): boolean [EXIT] -> java.lang.reflect.Method.getParameterTypes(): java.lang.Class[] -> java.lang.Class.isArray(): boolean -> java.lang.Class.getName(): java.lang.String -> java.lang.String.equals(java.lang.Object): boolean -> java.util.List.size(): int -> java.util.List.toArray(java.lang.Object[]): java.lang.Object[] -> java.lang.reflect.Method.invoke(java.lang.Object,java.lang.Object[]): java.lang.Object [CALL] [CALL] [CALL] [EXIT] [EXIT] [EXIT] [CALL] [EXIT] -> java.lang.StringBuilder.length(): int -> java.lang.String.length(): int -> java.lang.String.length(): int -> java.lang.StringBuilder.delete(int,int): java.lang.StringBuilder [EXIT]