org_apache_struts2_StrutsSpringJUnit4TestCaseTest_java
org.springframework.beans.TypeConverterDelegate
private Map<?, ?> convertToTypedMap(Map<?, ?> original, String propertyName, Class<?> requiredType, TypeDescriptor typeDescriptor) {
        Map<?, ?> convertedCopy;
        Iterator<Map.Entry<?, ?>> it;
        if (!Map.class.isAssignableFrom(requiredType)) {
            return original;
        }
        boolean approximable = CollectionFactory.isApproximableMapType(requiredType);
        if (!approximable && !this.canCreateCopy(requiredType)) {
            if (logger.isDebugEnabled()) {
                logger.debug("Custom Map type [" + original.getClass().getName() + "] does not allow for creating a copy - injecting original Map as-is");
            }
            return original;
        }
        boolean originalAllowed = requiredType.isInstance(original);
        TypeDescriptor keyType = typeDescriptor.getMapKeyTypeDescriptor();
        TypeDescriptor valueType = typeDescriptor.getMapValueTypeDescriptor();
        if (keyType == null && valueType == null && originalAllowed && !this.propertyEditorRegistry.hasCustomEditorForElement(null, propertyName)) {
            return original;
        }
        try {
            it = original.entrySet().iterator();
            if (it == null) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Map of type [" + original.getClass().getName() + "] returned null Iterator - injecting original Map as-is");
                }
                return original;
            }
        }
        catch (Throwable ex) {
            if (logger.isDebugEnabled()) {
                logger.debug("Cannot access Map of type [" + original.getClass().getName() + "] - injecting original Map as-is: " + ex);
            }
            return original;
        }
        try {
            convertedCopy = approximable ? CollectionFactory.createApproximateMap(original, original.size()) : (Map<?, ?>)requiredType.newInstance();
        }
        catch (Throwable ex) {
            if (logger.isDebugEnabled()) {
                logger.debug("Cannot create copy of Map type [" + original.getClass().getName() + "] - injecting original Map as-is: " + ex);
            }
            return original;
        }
        while (it.hasNext()) {
            Map.Entry<?, ?> entry = it.next();
            Object key = entry.getKey();
            Object value = entry.getValue();
            String keyedPropertyName = this.buildKeyedPropertyName(propertyName, key);
            Object convertedKey = this.convertIfNecessary(keyedPropertyName, null, key, keyType != null ? keyType.getType() : null, keyType);
            Object convertedValue = this.convertIfNecessary(keyedPropertyName, null, value, valueType != null ? valueType.getType() : null, valueType);
            try {
                convertedCopy.put(convertedKey, convertedValue);
            }
            catch (Throwable ex) {
                if (logger.isDebugEnabled()) {
                    logger.debug("Map type [" + original.getClass().getName() + "] seems to be read-only - injecting original Map as-is: " + ex);
                }
                return original;
            }
            originalAllowed = originalAllowed && key == convertedKey && value == convertedValue;
        }
        return originalAllowed ? original : convertedCopy;
    }
 -> java.lang.Class.isAssignableFrom(java.lang.Class): boolean -> java.util.Set.contains(java.lang.Object): boolean -> java.lang.Class.isInstance(java.lang.Object): boolean -> java.lang.Class.isAssignableFrom(java.lang.Class): boolean -> java.lang.Class.isAssignableFrom(java.lang.Class): boolean -> java.util.Map.entrySet(): java.util.Set -> java.util.Set.iterator(): java.util.Iterator -> java.util.Map.size(): int -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.util.Map$Entry.getKey(): java.lang.Object -> java.util.Map$Entry.getValue(): java.lang.Object -> java.lang.StringBuilder.append(java.lang.String): java.lang.StringBuilder -> java.lang.StringBuilder.append(java.lang.String): java.lang.StringBuilder -> java.lang.StringBuilder.append(java.lang.Object): java.lang.StringBuilder -> java.lang.StringBuilder.append(java.lang.String): java.lang.StringBuilder -> java.lang.StringBuilder.toString(): java.lang.String -> java.lang.Object.getClass(): java.lang.Class -> java.lang.Class.isAssignableFrom(java.lang.Class): boolean -> java.lang.Class.isArray(): boolean -> java.lang.Object.getClass(): java.lang.Class -> java.lang.Class.isArray(): boolean -> java.lang.Object.getClass(): java.lang.Class -> java.lang.Class.isPrimitive(): boolean -> java.util.Map.containsKey(java.lang.Object): boolean -> java.lang.Class.isInstance(java.lang.Object): boolean -> java.lang.Object.getClass(): java.lang.Class -> java.lang.Class.isAssignableFrom(java.lang.Class): boolean -> java.lang.Object.getClass(): java.lang.Class -> java.lang.Class.isAssignableFrom(java.lang.Class): boolean -> java.util.Map.put(java.lang.Object,java.lang.Object): java.lang.Object -> java.util.Iterator.hasNext(): boolean
 [CALL] -> java.lang.Class.isAssignableFrom(java.lang.Class): boolean [CALL] -> java.util.Set.contains(java.lang.Object): boolean [EXIT] -> java.lang.Class.isInstance(java.lang.Object): boolean [CALL] [CALL] [CALL] [EXIT] -> java.lang.Class.isAssignableFrom(java.lang.Class): boolean [EXIT] [CALL] [EXIT] [CALL] [EXIT] [CALL] [CALL] [CALL] [CALL] [EXIT] [EXIT] [CALL] [EXIT] [EXIT] [EXIT] [CALL] [CALL] [EXIT] [CALL] [EXIT] [EXIT] [CALL] [CALL] [CALL] [EXIT] [EXIT] [CALL] [CALL] [EXIT] [EXIT] [CALL] [CALL] [EXIT] [CALL] [EXIT] [EXIT] [EXIT] [EXIT] [CALL] [CALL] [CALL] [EXIT] -> java.lang.Class.isAssignableFrom(java.lang.Class): boolean [EXIT] [CALL] [EXIT] [CALL] [EXIT] [CALL] [CALL] [CALL] [CALL] [EXIT] [EXIT] [CALL] [EXIT] [EXIT] [EXIT] [CALL] [CALL] [EXIT] [CALL] [EXIT] [EXIT] [CALL] [CALL] [CALL] [EXIT] [EXIT] [CALL] [CALL] [EXIT] [EXIT] [CALL] [CALL] [EXIT] [CALL] [EXIT] [EXIT] [EXIT] [EXIT] -> java.util.Map.entrySet(): java.util.Set -> java.util.Set.iterator(): java.util.Iterator -> java.util.Map.size(): int [CALL] [EXIT] -> java.util.Iterator.hasNext(): boolean -> java.util.Iterator.next(): java.lang.Object -> java.util.Map$Entry.getKey(): java.lang.Object -> java.util.Map$Entry.getValue(): java.lang.Object [CALL] -> java.lang.StringBuilder.append(java.lang.String): java.lang.StringBuilder -> java.lang.StringBuilder.append(java.lang.String): java.lang.StringBuilder -> java.lang.StringBuilder.append(java.lang.Object): java.lang.StringBuilder -> java.lang.StringBuilder.append(java.lang.String): java.lang.StringBuilder -> java.lang.StringBuilder.toString(): java.lang.String [EXIT] [CALL] [EXIT] [CALL] [CALL] [CALL] [EXIT] [EXIT] [CALL] [EXIT] [CALL] [CALL] [EXIT] -> java.lang.Object.getClass(): java.lang.Class [CALL] [CALL] [EXIT] [CALL] [EXIT] -> java.lang.Class.isAssignableFrom(java.lang.Class): boolean [EXIT] [EXIT] -> java.lang.Class.isArray(): boolean -> java.lang.Object.getClass(): java.lang.Class -> java.lang.Class.isArray(): boolean -> java.lang.Object.getClass(): java.lang.Class [CALL] [CALL] [EXIT] -> java.lang.Class.isPrimitive(): boolean [CALL] [CALL] [EXIT] -> java.util.Map.containsKey(java.lang.Object): boolean [EXIT] [EXIT] -> java.lang.Class.isInstance(java.lang.Object): boolean [CALL] [CALL] [EXIT] -> java.lang.Object.getClass(): java.lang.Class [CALL] [CALL] [EXIT] [CALL] [EXIT] -> java.lang.Class.isAssignableFrom(java.lang.Class): boolean [EXIT] [EXIT] [EXIT] [CALL] [EXIT] [CALL] [CALL] [CALL] [EXIT] [EXIT] [CALL] [EXIT] [CALL] [CALL] [EXIT] -> java.lang.Object.getClass(): java.lang.Class [CALL] [CALL] [EXIT] [CALL] [EXIT] -> java.lang.Class.isAssignableFrom(java.lang.Class): boolean [EXIT] [EXIT] [EXIT] -> java.util.Map.put(java.lang.Object,java.lang.Object): java.lang.Object -> java.util.Iterator.hasNext(): boolean [EXIT]