org_apache_struts2_convention_PackageBasedActionConfigBuilderTest_java
org.apache.struts2.convention.PackageBasedActionConfigBuilder
protected List<String> determineActionNamespace(Class<?> actionClass) {
        int indexOfDot;
        Namespaces namespacesAnnotation;
        ArrayList<String> namespaces = new ArrayList<String>();
        Namespace namespaceAnnotation = AnnotationUtils.findAnnotation(actionClass, Namespace.class);
        if (namespaceAnnotation != null) {
            LOG.trace("Using non-default action namespace from Namespace annotation of [{}]", (Object)namespaceAnnotation.value());
            namespaces.add(namespaceAnnotation.value());
        }
        if ((namespacesAnnotation = AnnotationUtils.findAnnotation(actionClass, Namespaces.class)) != null) {
            if (LOG.isTraceEnabled()) {
                StringBuilder sb = new StringBuilder();
                Namespace[] namespaceArray = namespacesAnnotation.value();
                int n = namespaceArray.length;
                for (int i = 0; i < n; ++i) {
                    Namespace namespace = namespaceArray[i];
                    sb.append(namespace.value()).append(",");
                }
                sb.deleteCharAt(sb.length() - 1);
                LOG.trace("Using non-default action namespaces from Namespaces annotation of [{}]", (Object)sb.toString());
            }
            for (Namespace namespace : namespacesAnnotation.value()) {
                namespaces.add(namespace.value());
            }
        }
        if (!namespaces.isEmpty()) {
            return namespaces;
        }
        String pkg = actionClass.getPackage().getName();
        String pkgPart = null;
        if (this.actionPackages != null) {
            for (String actionPackage : this.actionPackages) {
                if (!pkg.startsWith(actionPackage)) continue;
                pkgPart = actionClass.getName().substring(actionPackage.length() + 1);
            }
        }
        if (pkgPart == null && this.packageLocators != null) {
            for (String packageLocator : this.packageLocators) {
                int index = pkg.lastIndexOf("." + packageLocator + ".");
                if (index < 0 || index + packageLocator.length() != pkg.length() && index != 0 && (pkg.charAt(index) != '.' || pkg.charAt(index + 1 + packageLocator.length()) != '.')) continue;
                pkgPart = actionClass.getName().substring(index + packageLocator.length() + 2);
            }
        }
        if (pkgPart != null && (indexOfDot = pkgPart.lastIndexOf(46)) >= 0) {
            String convertedNamespace = this.actionNameBuilder.build(pkgPart.substring(0, indexOfDot));
            namespaces.add("/" + convertedNamespace.replace('.', '/'));
            return namespaces;
        }
        namespaces.add("");
        return namespaces;
    }
 -> java.lang.Class.getAnnotation(java.lang.Class): java.lang.annotation.Annotation -> java.lang.Class.getAnnotation(java.lang.Class): java.lang.annotation.Annotation -> java.lang.Class.getPackage(): java.lang.Package -> java.lang.Package.getAnnotation(java.lang.Class): java.lang.annotation.Annotation -> java.util.List.add(java.lang.Object): boolean -> java.lang.Class.getAnnotation(java.lang.Class): java.lang.annotation.Annotation -> java.util.List.add(java.lang.Object): boolean -> java.util.List.isEmpty(): boolean
 [CALL] [CALL] -> java.lang.Class.getAnnotation(java.lang.Class): java.lang.annotation.Annotation -> java.lang.Class.getAnnotation(java.lang.Class): java.lang.annotation.Annotation -> java.lang.Class.getPackage(): java.lang.Package -> java.lang.Package.getAnnotation(java.lang.Class): java.lang.annotation.Annotation [EXIT] [CALL] [CALL] [CALL] [CALL] [EXIT] [CALL] [EXIT] [EXIT] [EXIT] [EXIT] -> java.util.List.add(java.lang.Object): boolean [CALL] -> java.lang.Class.getAnnotation(java.lang.Class): java.lang.annotation.Annotation [EXIT] [CALL] [CALL] [CALL] [EXIT] [CALL] [EXIT] [EXIT] [EXIT] -> java.util.List.add(java.lang.Object): boolean -> java.util.List.isEmpty(): boolean [EXIT]