org_apache_struts2_oval_interceptor_OValValidationInterceptorTest_java
net.sf.oval.Validator
private void _addChecks(ClassChecks cc, ClassConfiguration classCfg) throws InvalidConfigurationException, ReflectionException {
        if (Boolean.TRUE.equals(classCfg.overwrite)) {
            cc.clear();
        }
        if (classCfg.checkInvariants != null) {
            cc.isCheckInvariants = classCfg.checkInvariants;
        }
        boolean applyFieldConstraintsToConstructors = Boolean.TRUE.equals(classCfg.applyFieldConstraintsToConstructors);
        boolean applyFieldConstraintsToSetters = Boolean.TRUE.equals(classCfg.applyFieldConstraintsToSetters);
        boolean assertParametersNotNull = Boolean.TRUE.equals(classCfg.assertParametersNotNull);
        NotNullCheck sharedNotNullCheck = assertParametersNotNull ? new NotNullCheck() : null;
        try {
            if (classCfg.objectConfiguration != null) {
                ObjectConfiguration objectCfg = classCfg.objectConfiguration;
                if (Boolean.TRUE.equals(objectCfg.overwrite)) {
                    cc.clearObjectChecks();
                }
                cc.addObjectChecks(objectCfg.checks);
            }
            if (classCfg.fieldConfigurations != null) {
                for (FieldConfiguration fieldCfg : classCfg.fieldConfigurations) {
                    Field field = classCfg.type.getDeclaredField(fieldCfg.name);
                    if (Boolean.TRUE.equals(fieldCfg.overwrite)) {
                        cc.clearFieldChecks(field);
                    }
                    if (fieldCfg.checks == null || fieldCfg.checks.isEmpty()) continue;
                    cc.addFieldChecks(field, fieldCfg.checks);
                }
            }
            if (classCfg.constructorConfigurations != null) {
                for (ConstructorConfiguration ctorCfg : classCfg.constructorConfigurations) {
                    if (ctorCfg.parameterConfigurations == null) continue;
                    Class[] paramTypes = new Class[ctorCfg.parameterConfigurations.size()];
                    int i = 0;
                    int l = ctorCfg.parameterConfigurations.size();
                    while (i < l) {
                        paramTypes[i] = ctorCfg.parameterConfigurations.get((int)i).type;
                        ++i;
                    }
                    Constructor<?> ctor = classCfg.type.getDeclaredConstructor(paramTypes);
                    if (Boolean.TRUE.equals(ctorCfg.overwrite)) {
                        cc.clearConstructorChecks(ctor);
                    }
                    if (Boolean.TRUE.equals(ctorCfg.postCheckInvariants)) {
                        cc.methodsWithCheckInvariantsPost.add(ctor);
                    }
                    String[] paramNames = this.parameterNameResolver.getParameterNames(ctor);
                    int i2 = 0;
                    int l2 = ctorCfg.parameterConfigurations.size();
                    while (i2 < l2) {
                        Field field;
                        ParameterConfiguration paramCfg = ctorCfg.parameterConfigurations.get(i2);
                        if (Boolean.TRUE.equals(paramCfg.overwrite)) {
                            cc.clearConstructorParameterChecks(ctor, i2);
                        }
                        if (paramCfg.hasChecks()) {
                            cc.addConstructorParameterChecks(ctor, i2, paramCfg.checks);
                        }
                        if (paramCfg.hasCheckExclusions()) {
                            cc.addConstructorParameterCheckExclusions(ctor, i2, paramCfg.checkExclusions);
                        }
                        if (assertParametersNotNull) {
                            cc.addConstructorParameterChecks(ctor, i2, sharedNotNullCheck);
                        }
                        if (applyFieldConstraintsToConstructors && (field = ReflectionUtils.getField(cc.clazz, paramNames[i2])) != null && paramTypes[i2].isAssignableFrom(field.getType())) {
                            AssertFieldConstraintsCheck check = new AssertFieldConstraintsCheck();
                            check.setFieldName(field.getName());
                            cc.addConstructorParameterChecks(ctor, i2, check);
                        }
                        ++i2;
                    }
                }
            }
            if (classCfg.methodConfigurations != null) {
                for (MethodConfiguration methodCfg : classCfg.methodConfigurations) {
                    Field field;
                    Method method;
                    if (methodCfg.parameterConfigurations == null || methodCfg.parameterConfigurations.isEmpty()) {
                        method = classCfg.type.getDeclaredMethod(methodCfg.name, new Class[0]);
                    } else {
                        Class[] paramTypes = new Class[methodCfg.parameterConfigurations.size()];
                        int i = 0;
                        int l = methodCfg.parameterConfigurations.size();
                        while (i < l) {
                            paramTypes[i] = methodCfg.parameterConfigurations.get((int)i).type;
                            ++i;
                        }
                        method = classCfg.type.getDeclaredMethod(methodCfg.name, paramTypes);
                    }
                    if (Boolean.TRUE.equals(methodCfg.overwrite)) {
                        cc.clearMethodChecks(method);
                    }
                    if (applyFieldConstraintsToSetters && (field = ReflectionUtils.getFieldForSetter(method)) != null) {
                        AssertFieldConstraintsCheck check = new AssertFieldConstraintsCheck();
                        check.setFieldName(field.getName());
                        cc.addMethodParameterChecks(method, 0, check);
                    }
                    if (methodCfg.parameterConfigurations != null && !methodCfg.parameterConfigurations.isEmpty()) {
                        int i = 0;
                        int l = methodCfg.parameterConfigurations.size();
                        while (i < l) {
                            ParameterConfiguration paramCfg = methodCfg.parameterConfigurations.get(i);
                            if (Boolean.TRUE.equals(paramCfg.overwrite)) {
                                cc.clearMethodParameterChecks(method, i);
                            }
                            if (paramCfg.hasChecks()) {
                                cc.addMethodParameterChecks(method, i, paramCfg.checks);
                            }
                            if (paramCfg.hasCheckExclusions()) {
                                cc.addMethodParameterCheckExclusions(method, i, paramCfg.checkExclusions);
                            }
                            if (assertParametersNotNull) {
                                cc.addMethodParameterChecks(method, i, sharedNotNullCheck);
                            }
                            ++i;
                        }
                    }
                    if (methodCfg.returnValueConfiguration != null) {
                        if (Boolean.TRUE.equals(methodCfg.returnValueConfiguration.overwrite)) {
                            cc.clearMethodReturnValueChecks(method);
                        }
                        if (methodCfg.returnValueConfiguration.checks != null && !methodCfg.returnValueConfiguration.checks.isEmpty()) {
                            cc.addMethodReturnValueChecks(method, methodCfg.isInvariant, methodCfg.returnValueConfiguration.checks);
                        }
                    }
                    if (Boolean.TRUE.equals(methodCfg.preCheckInvariants)) {
                        cc.methodsWithCheckInvariantsPre.add(method);
                    }
                    if (methodCfg.preExecutionConfiguration != null) {
                        if (Boolean.TRUE.equals(methodCfg.preExecutionConfiguration.overwrite)) {
                            cc.clearMethodPreChecks(method);
                        }
                        if (methodCfg.preExecutionConfiguration.checks != null && !methodCfg.preExecutionConfiguration.checks.isEmpty()) {
                            cc.addMethodPreChecks(method, methodCfg.preExecutionConfiguration.checks);
                        }
                    }
                    if (Boolean.TRUE.equals(methodCfg.postCheckInvariants)) {
                        cc.methodsWithCheckInvariantsPost.add(method);
                    }
                    if (methodCfg.postExecutionConfiguration == null) continue;
                    if (Boolean.TRUE.equals(methodCfg.postExecutionConfiguration.overwrite)) {
                        cc.clearMethodPostChecks(method);
                    }
                    if (methodCfg.postExecutionConfiguration.checks == null || methodCfg.postExecutionConfiguration.checks.isEmpty()) continue;
                    cc.addMethodPostChecks(method, methodCfg.postExecutionConfiguration.checks);
                }
            }
        }
        catch (NoSuchMethodException ex) {
            throw new MethodNotFoundException(ex);
        }
        catch (NoSuchFieldException ex) {
            throw new FieldNotFoundException(ex);
        }
    }
 -> java.lang.Boolean.equals(java.lang.Object): boolean -> java.lang.Boolean.equals(java.lang.Object): boolean -> java.lang.Boolean.equals(java.lang.Object): boolean -> java.lang.Boolean.equals(java.lang.Object): boolean
 [CALL] -> java.lang.Boolean.equals(java.lang.Object): boolean -> java.lang.Boolean.equals(java.lang.Object): boolean -> java.lang.Boolean.equals(java.lang.Object): boolean -> java.lang.Boolean.equals(java.lang.Object): boolean [EXIT]