question: private static boolean processParents ( int certIndex , boolean policiesCritical , boolean rejectPolicyQualifiers , PolicyNodeImpl rootNode , String curPolicy , Set < PolicyQualifierInfo > pQuals , boolean matchAny ) throws CertPathValidatorException { boolean foundMatch = false ; if ( debug != null ) debug . println ( "PolicyChecker.processParents(): matchAny = " + matchAny ) ; Set < PolicyNodeImpl > parentNodes = rootNode . getPolicyNodesExpected ( certIndex - 1 , curPolicy , matchAny ) ; for ( PolicyNodeImpl curParent : parentNodes ) { if ( debug != null ) debug . println ( "PolicyChecker.processParents() " + "found parent:\n" + curParent . asString ( ) ) ; foundMatch = true ; String curParPolicy = curParent . getValidPolicy ( ) ; PolicyNodeImpl curNode = null ; Set < String > curExpPols = null ; if ( curPolicy . equals ( ANY_POLICY ) ) { Set < String > parExpPols = curParent . getExpectedPolicies ( ) ; parentExplicitPolicies : for ( String curParExpPol : parExpPols ) { Iterator < PolicyNodeImpl > childIter = curParent . getChildren ( ) ; while ( childIter . hasNext ( ) ) { PolicyNodeImpl childNode = childIter . next ( ) ; String childPolicy = childNode . getValidPolicy ( ) ; if ( curParExpPol . equals ( childPolicy ) ) { if ( debug != null ) debug . println ( childPolicy + " in parent's " + "expected policy set already appears in " + "child node" ) ; continue parentExplicitPolicies ; } } Set < String > expPols = new HashSet < > ( ) ; expPols . add ( curParExpPol ) ; curNode = new PolicyNodeImpl ( curParent , curParExpPol , pQuals , policiesCritical , expPols , false ) ; } } else { curExpPols = new HashSet < String > ( ) ; curExpPols . add ( curPolicy ) ; curNode = new PolicyNodeImpl ( curParent , curPolicy , pQuals , policiesCritical , curExpPols , false ) ; } } return foundMatch ; }
target:  Finds the policy nodes of depth (certIndex-1) where curPolicy is in the expected policy set and creates a new child node appropriately. If matchAny is true, then a value of ANY_POLICY in the expected policy set will match any curPolicy. If matchAny is false, then the expected policy set must exactly contain the curPolicy to be considered a match. This method returns a boolean value indicating whether a match was found.