region > findByRoleAndRuleAndFeature (programmatic)
486896
@Programmatic
    public ApplicationPermission findByRoleAndRuleAndFeatureCached(
            final ApplicationRole role,
            final ApplicationPermissionRule rule,
            final ApplicationFeatureType type,
            final String featureFqn) {
        return queryResultsCache.execute(new Callable<ApplicationPermission>() {
            @Override public ApplicationPermission call() throws Exception {
                return findByRoleAndRuleAndFeature(role, rule, type, featureFqn);
            }
        }, ApplicationPermissionRepository.class, "findByRoleAndRuleAndFeatureCached", role, rule, type, featureFqn);
    }
375146
def _getFeatureById(self, featureId):
        
        featureRef = rdflib.URIRef(featureId)
        featureDetails = self._detailTuples([featureRef])
        feature = {}
        for detail in featureDetails:
            feature[detail['predicate']] = []

        for detail in featureDetails:
            feature[detail['predicate']].append(detail['object'])

        pbFeature = protocol.Feature()

        term = protocol.OntologyTerm()
        # Schema for feature only supports one type of `type`
        # here we default to first OBO defined
        for featureType in sorted(feature[TYPE]):
            if "obolibrary" in featureType:
                term.term = self._featureTypeLabel(featureType)
                term.term_id = featureType
                pbFeature.feature_type.MergeFrom(term)
                break

        pbFeature.id = featureId
        # Schema for feature only supports one type of `name` `symbol`
        # here we default to shortest for symbol and longest for name
        feature[LABEL].sort(key=len)
        pbFeature.gene_symbol = feature[LABEL][0]
        pbFeature.name = feature[LABEL][-1]

        pbFeature.attributes.MergeFrom(protocol.Attributes())
        for key in feature:
            for val in sorted(feature[key]):
                pbFeature.attributes.attr[key].values.add().string_value = val

        if featureId in self._locationMap:
            location = self._locationMap[featureId]
            pbFeature.reference_name = location["chromosome"]
            pbFeature.start = location["begin"]
            pbFeature.end = location["end"]

        return pbFeature
1364850
private static Object[] extractExtendedFeatures(Configuration configuration, int length)
    {
        Object[] featureMap = new Object[length];

        State state = configuration.state;
        Sentence sentence = configuration.sentence;

        int b0Position = 0;
        int b1Position = 0;
        int b2Position = 0;
        int s0Position = 0;

        long svr = 0; // stack right valency
        long svl = 0; // stack left valency
        long bvl = 0; // buffer left valency

        long b0w = 0;
        long b0p = 0;

        long b1w = 0;
        long b1p = 0;

        long b2w = 0;
        long b2p = 0;

        long s0w = 0;
        long s0p = 0;
        long s0l = 0;

        long bl0p = 0;
        long bl0w = 0;
        long bl0l = 0;

        long bl1w = 0;
        long bl1p = 0;
        long bl1l = 0;

        long sr0p = 0;
        long sr0w = 0;
        long sr0l = 0;

        long sh0w = 0;
        long sh0p = 0;
        long sh0l = 0;

        long sl0p = 0;
        long sl0w = 0;
        long sl0l = 0;

        long sr1w = 0;
        long sr1p = 0;
        long sr1l = 0;

        long sh1w = 0;
        long sh1p = 0;

        long sl1w = 0;
        long sl1p = 0;
        long sl1l = 0;

        long sdl = 0;
        long sdr = 0;
        long bdl = 0;

        int[] words = sentence.getWords();
        int[] tags = sentence.getTags();

        if (0 < state.bufferSize())
        {
            b0Position = state.bufferHead();
            b0w = b0Position == 0 ? 0 : words[b0Position - 1];
            b0w += 2;
            b0p = b0Position == 0 ? 0 : tags[b0Position - 1];
            b0p += 2;
            bvl = state.leftValency(b0Position);

            int leftMost = state.leftMostModifier(state.getBufferItem(0));
            if (leftMost >= 0)
            {
                bl0p = leftMost == 0 ? 0 : tags[leftMost - 1];
                bl0p += 2;
                bl0w = leftMost == 0 ? 0 : words[leftMost - 1];
                bl0w += 2;
                bl0l = state.getDependent(leftMost);
                bl0l += 2;

                int l2 = state.leftMostModifier(leftMost);
                if (l2 >= 0)
                {
                    bl1w = l2 == 0 ? 0 : words[l2 - 1];
                    bl1w += 2;
                    bl1p = l2 == 0 ? 0 : tags[l2 - 1];
                    bl1p += 2;
                    bl1l = state.getDependent(l2);
                    bl1l += 2;
                }
            }

            if (1 < state.bufferSize())
            {
                b1Position = state.getBufferItem(1);
                b1w = b1Position == 0 ? 0 : words[b1Position - 1];
                b1w += 2;
                b1p = b1Position == 0 ? 0 : tags[b1Position - 1];
                b1p += 2;

                if (2 < state.bufferSize())
                {
                    b2Position = state.getBufferItem(2);

                    b2w = b2Position == 0 ? 0 : words[b2Position - 1];
                    b2w += 2;
                    b2p = b2Position == 0 ? 0 : tags[b2Position - 1];
                    b2p += 2;
                }
            }
        }

        if (0 < state.stackSize())
        {
            s0Position = state.stackTop();
            s0w = s0Position == 0 ? 0 : words[s0Position - 1];
            s0w += 2;
            s0p = s0Position == 0 ? 0 : tags[s0Position - 1];
            s0p += 2;
            s0l = state.getDependent(s0Position);
            s0l += 2;

            svl = state.leftValency(s0Position);
            svr = state.rightValency(s0Position);

            int leftMost = state.leftMostModifier(s0Position);
            if (leftMost >= 0)
            {
                sl0p = leftMost == 0 ? 0 : tags[leftMost - 1];
                sl0p += 2;
                sl0w = leftMost == 0 ? 0 : words[leftMost - 1];
                sl0w += 2;
                sl0l = state.getDependent(leftMost);
                sl0l += 2;
            }

            int rightMost = state.rightMostModifier(s0Position);
            if (rightMost >= 0)
            {
                sr0p = rightMost == 0 ? 0 : tags[rightMost - 1];
                sr0p += 2;
                sr0w = rightMost == 0 ? 0 : words[rightMost - 1];
                sr0w += 2;
                sr0l = state.getDependent(rightMost);
                sr0l += 2;
            }

            int headIndex = state.getHead(s0Position);
            if (headIndex >= 0)
            {
                sh0w = headIndex == 0 ? 0 : words[headIndex - 1];
                sh0w += 2;
                sh0p = headIndex == 0 ? 0 : tags[headIndex - 1];
                sh0p += 2;
                sh0l = state.getDependent(headIndex);
                sh0l += 2;
            }

            if (leftMost >= 0)
            {
                int l2 = state.leftMostModifier(leftMost);
                if (l2 >= 0)
                {
                    sl1w = l2 == 0 ? 0 : words[l2 - 1];
                    sl1w += 2;
                    sl1p = l2 == 0 ? 0 : tags[l2 - 1];
                    sl1p += 2;
                    sl1l = state.getDependent(l2);
                    sl1l += 2;
                }
            }
            if (headIndex >= 0)
            {
                if (state.hasHead(headIndex))
                {
                    int h2 = state.getHead(headIndex);
                    sh1w = h2 == 0 ? 0 : words[h2 - 1];
                    sh1w += 2;
                    sh1p = h2 == 0 ? 0 : tags[h2 - 1];
                    sh1p += 2;
                }
            }
            if (rightMost >= 0)
            {
                int r2 = state.rightMostModifier(rightMost);
                if (r2 >= 0)
                {
                    sr1w = r2 == 0 ? 0 : words[r2 - 1];
                    sr1w += 2;
                    sr1p = r2 == 0 ? 0 : tags[r2 - 1];
                    sr1p += 2;
                    sr1l = state.getDependent(r2);
                    sr1l += 2;
                }
            }
        }
        int index = 0;

        long b0wp = b0p;
        b0wp |= (b0w << 8);
        long b1wp = b1p;
        b1wp |= (b1w << 8);
        long s0wp = s0p;
        s0wp |= (s0w << 8);
        long b2wp = b2p;
        b2wp |= (b2w << 8);

        /**
         * From single words
         */
        if (s0w != 1)
        {
            featureMap[index++] = s0wp;
            featureMap[index++] = s0w;
        }
        else
        {
            featureMap[index++] = null;
            featureMap[index++] = null;
        }
        featureMap[index++] = s0p;

        if (b0w != 1)
        {
            featureMap[index++] = b0wp;
            featureMap[index++] = b0w;
        }
        else
        {
            featureMap[index++] = null;
            featureMap[index++] = null;
        }
        featureMap[index++] = b0p;

        if (b1w != 1)
        {
            featureMap[index++] = b1wp;
            featureMap[index++] = b1w;
        }
        else
        {
            featureMap[index++] = null;
            featureMap[index++] = null;
        }
        featureMap[index++] = b1p;

        if (b2w != 1)
        {
            featureMap[index++] = b2wp;
            featureMap[index++] = b2w;
        }
        else
        {
            featureMap[index++] = null;
            featureMap[index++] = null;
        }
        featureMap[index++] = b2p;

        /**
         * from word pairs
         */
        if (s0w != 1 && b0w != 1)
        {
            featureMap[index++] = (s0wp << 28) | b0wp;
            featureMap[index++] = (s0wp << 20) | b0w;
            featureMap[index++] = (s0w << 28) | b0wp;
        }
        else
        {
            featureMap[index++] = null;
            featureMap[index++] = null;
            featureMap[index++] = null;
        }

        if (s0w != 1)
        {
            featureMap[index++] = (s0wp << 8) | b0p;
        }
        else
        {
            featureMap[index++] = null;
        }

        if (b0w != 1)
        {
            featureMap[index++] = (s0p << 28) | b0wp;
        }
        else
        {
            featureMap[index++] = null;
        }

        if (s0w != 1 && b0w != 1)
        {
            featureMap[index++] = (s0w << 20) | b0w;
        }
        else
        {
            featureMap[index++] = null;
        }
        featureMap[index++] = (s0p << 8) | b0p;
        featureMap[index++] = (b0p << 8) | b1p;

        /**
         * from three words
         */
        featureMap[index++] = (b0p << 16) | (b1p << 8) | b2p;
        featureMap[index++] = (s0p << 16) | (b0p << 8) | b1p;
        featureMap[index++] = (sh0p << 16) | (s0p << 8) | b0p;
        featureMap[index++] = (s0p << 16) | (sl0p << 8) | b0p;
        featureMap[index++] = (s0p << 16) | (sr0p << 8) | b0p;
        featureMap[index++] = (s0p << 16) | (b0p << 8) | bl0p;

        /**
         * distance
         */
        long distance = 0;
        if (s0Position > 0 && b0Position > 0)
            distance = Math.abs(b0Position - s0Position);
        if (s0w != 1)
        {
            featureMap[index++] = s0w | (distance << 20);
        }
        else
        {
            featureMap[index++] = null;
        }
        featureMap[index++] = s0p | (distance << 8);
        if (b0w != 1)
        {
            featureMap[index++] = b0w | (distance << 20);
        }
        else
        {
            featureMap[index++] = null;
        }
        featureMap[index++] = b0p | (distance << 8);
        if (s0w != 1 && b0w != 1)
        {
            featureMap[index++] = s0w | (b0w << 20) | (distance << 40);
        }
        else
        {
            featureMap[index++] = null;
        }
        featureMap[index++] = s0p | (b0p << 8) | (distance << 28);

        /**
         * Valency information
         */
        if (s0w != 1)
        {
            featureMap[index++] = s0w | (svr << 20);
        }
        else
        {
            featureMap[index++] = null;
        }
        featureMap[index++] = s0p | (svr << 8);
        if (s0w != 1)
        {
            featureMap[index++] = s0w | (svl << 20);
        }
        else
        {
            featureMap[index++] = null;
        }
        featureMap[index++] = s0p | (svl << 8);
        if (b0w != 1)
        {
            featureMap[index++] = b0w | (bvl << 20);
        }
        else
        {
            featureMap[index++] = null;
        }
        featureMap[index++] = b0p | (bvl << 8);

        /**
         * Unigrams
         */
        if (sh0w != 1)
        {
            featureMap[index++] = sh0w;
        }
        else
        {
            featureMap[index++] = null;
        }
        featureMap[index++] = sh0p;
        featureMap[index++] = s0l;
        if (sl0w != 1)
        {
            featureMap[index++] = sl0w;
        }
        else
        {
            featureMap[index++] = null;
        }
        featureMap[index++] = sl0p;
        featureMap[index++] = sl0l;
        if (sr0w != 1)
        {
            featureMap[index++] = sr0w;
        }
        else
        {
            featureMap[index++] = null;
        }
        featureMap[index++] = sr0p;
        featureMap[index++] = sr0l;
        if (bl0w != 1)
        {
            featureMap[index++] = bl0w;
        }
        else
        {
            featureMap[index++] = null;
        }
        featureMap[index++] = bl0p;
        featureMap[index++] = bl0l;

        /**
         * From third order features
         */
        if (sh1w != 1)
        {
            featureMap[index++] = sh1w;
        }
        else
        {
            featureMap[index++] = null;
        }
        featureMap[index++] = sh1p;
        featureMap[index++] = sh0l;
        if (sl1w != 1)
        {
            featureMap[index++] = sl1w;
        }
        else
        {
            featureMap[index++] = null;
        }
        featureMap[index++] = sl1p;
        featureMap[index++] = sl1l;
        if (sr1w != 1)
        {
            featureMap[index++] = sr1w;
        }
        else
        {
            featureMap[index++] = null;
        }
        featureMap[index++] = sr1p;
        featureMap[index++] = sr1l;
        if (bl1w != 1)
        {
            featureMap[index++] = bl1w;
        }
        else
        {
            featureMap[index++] = null;
        }
        featureMap[index++] = bl1p;
        featureMap[index++] = bl1l;
        featureMap[index++] = s0p | (sl0p << 8) | (sl1p << 16);
        featureMap[index++] = s0p | (sr0p << 8) | (sr1p << 16);
        featureMap[index++] = s0p | (sh0p << 8) | (sh1p << 16);
        featureMap[index++] = b0p | (bl0p << 8) | (bl1p << 16);

        /**
         * label set
         */
        if (s0Position >= 0)
        {
            sdl = state.leftDependentLabels(s0Position);
            sdr = state.rightDependentLabels(s0Position);
        }

        if (b0Position >= 0)
        {
            bdl = state.leftDependentLabels(b0Position);
        }

        if (s0w != 1)
        {
            featureMap[index++] = (s0w + "|" + sdr);
        }
        else
        {
            featureMap[index++] = null;
        }
        featureMap[index++] = (s0p + "|" + sdr);
        if (s0w != 1)
        {
            featureMap[index++] = s0w + "|" + sdl;
        }
        else
        {
            featureMap[index++] = null;
        }
        featureMap[index++] = (s0p + "|" + sdl);
        if (b0w != 1)
        {
            featureMap[index++] = (b0w + "|" + bdl);
        }
        else
        {
            featureMap[index++] = null;
        }
        featureMap[index++] = (b0p + "|" + bdl);
        return featureMap;
    }
896080
private boolean exactMatch(String str, int i) {
    int end = str.length() - i;
    for (String p : _patterns) {
      int start = end - p.length();
      if (start >= 0 && str.regionMatches(start, p, 0, p.length())) {
        return true;
      }
    }
    return false;
  }
371623
private void getFilesForFeature(File installRoot,
                                    final Set<String> absPathsForLibertyContent,
                                    final Set<String> absPathsForLibertyBundles,
                                    final Set<String> absPathsForLibertyLocalizations,
                                    final Set<String> absPathsForLibertyIcons,
                                    final ProvisioningFeatureDefinition fd,
                                    final ContentBasedLocalBundleRepository br) {
        Collection<FeatureResource> frs = fd.getConstituents(null);

        for (FeatureResource fr : frs) {
            switch (fr.getType()) {
                case FEATURE_TYPE: {
                    // No resource for this feature
                    break;
                }

                case BUNDLE_TYPE:
                case BOOT_JAR_TYPE: {
                    // Add to the list of bundle files
                    addJarResource(absPathsForLibertyBundles, fd, br, fr);
                    break;
                }

                case JAR_TYPE: {
                    // Add to the list of normal files
                    addJarResource(absPathsForLibertyContent, fd, br, fr);
                    break;
                }

                case FILE_TYPE: {
                    // file uses loc as a relative path from install root.
                    String locString = fr.getLocation();
                    if (locString != null) {
                        addFileResource(installRoot, absPathsForLibertyContent,
                                        locString);
                    } else {
                        // a file type without a loc is bad, means misuse of the
                        // type.
                        throw new BuildException("No location on file type for resource "
                                                 + fr.getSymbolicName() + " in feature "
                                                 + fd.getFeatureName());
                    }
                    break;
                }

                case UNKNOWN: {
                    // if its not jar,bundle,feature, or file.. then something
                    // is wrong.
                    log("Unknown feature resource for " + fr.getSymbolicName()
                        + " in feature " + fd.getFeatureName()
                        + ". The type is: " + fr.getRawType(),
                        Project.MSG_ERR);
                    // we assume that other types will use the location field as
                    // something useful.
                    String locString = fr.getLocation();
                    if (locString != null) {
                        addFileResource(installRoot, absPathsForLibertyContent,
                                        locString);
                    }
                }
            }
        }
        // add in (all) the NLS files for this featuredef.. if any..
        for (File nls : fd.getLocalizationFiles()) {
            if (nls.exists()) {
                absPathsForLibertyLocalizations.add(nls.getAbsolutePath());
            }
        }

        for (String icon : fd.getIcons()) {
            File iconFile = new File(fd.getFeatureDefinitionFile().getParentFile(), "icons/" + fd.getSymbolicName() + "/" + icon);
            if (iconFile.exists()) {
                absPathsForLibertyIcons.add(iconFile.getAbsolutePath());
            } else {
                throw new BuildException("Icon file " + iconFile.getAbsolutePath() + " doesn't exist");
            }
        }
    }
348237
def search(cls, element, pattern):
        
        if isinstance(element, Layout):
            return [el for cell in element for el in cls.search(cell, pattern)]
        if isinstance(element, (NdOverlay, Overlay)):
            return [el for el in element if el.matches(pattern)]
        elif isinstance(element, Element):
            return [element] if element.matches(pattern) else []
545829
private void findLinesInRegion( List<LineSegment2D_F32> gridLines ) {

		List<Edgel> list = edgels.copyIntoList(null);

		int iterations = 0;

		// exit if not enough points or max iterations exceeded
		while( iterations++ < maxDetectLines) {
			if( !robustMatcher.process(list) )
				break;

			// remove the found edges from the main list
			List<Edgel> matchSet = robustMatcher.getMatchSet();

			// make sure the match set is large enough
			if( matchSet.size() < minInlierSize )
				break;

			for( Edgel e : matchSet ) {
				list.remove(e);
			}

			gridLines.add(convertToLineSegment(matchSet, robustMatcher.getModelParameters()));
		}
	}
50081
@Override
    public boolean getFeature(String featureId)
            throws SAXNotRecognizedException, SAXNotSupportedException {
        if ((FEATURE + "validation").equals(featureId)) {
            return false;
        }

        // external entities (both types) are optionally included
        if ((FEATURE + "external-general-entities").equals(featureId)) {
            return extGE;
        }
        if ((FEATURE + "external-parameter-entities").equals(featureId)) {
            return extPE;
        }

        // element/attribute names are as written in document; no mangling
        if ((FEATURE + "namespace-prefixes").equals(featureId)) {
            return xmlNames;
        }

        // report element/attribute namespaces?
        if ((FEATURE + "namespaces").equals(featureId)) {
            return namespaces;
        }

        // all PEs and GEs are reported
        if ((FEATURE + "lexical-handler/parameter-entities").equals(featureId)) {
            return true;
        }

        // default is true
        if ((FEATURE + "string-interning").equals(featureId)) {
            return stringInterning;
        }

        // EXTENSIONS 1.1

        // always returns isSpecified info
        if ((FEATURE + "use-attributes2").equals(featureId)) {
            return true;
        }

        // meaningful between startDocument/endDocument
        if ((FEATURE + "is-standalone").equals(featureId)) {
            if (parser == null) {
                throw new SAXNotSupportedException(featureId);
            }
            return parser.isStandalone();
        }

        // optionally don't absolutize URIs in declarations
        if ((FEATURE + "resolve-dtd-uris").equals(featureId)) {
            return resolveAll;
        }

        // optionally use resolver2 interface methods, if possible
        if ((FEATURE + "use-entity-resolver2").equals(featureId)) {
            return useResolver2;
        }

        if ("http://xml.org/sax/features/unicode-normalization-checking".equals(featureId)) {
            return checkNormalization;
        }

        throw new SAXNotRecognizedException(featureId);
    }
711304
@Programmatic
    public ApplicationRole findByNameCached(final String name) {
        return queryResultsCache.execute(new Callable<ApplicationRole>() {
            @Override public ApplicationRole call() throws Exception {
                return findByName(name);
            }
        }, ApplicationRoleRepository.class, "findByNameCached", name);
    }
812858
private AbstractPlanNode indexAccessForGroupByExprs(SeqScanPlanNode root,
            IndexGroupByInfo gbInfo) {
        if (! root.isPersistentTableScan()) {
            // subquery and common tables are not handled
            return root;
        }

        String fromTableAlias = root.getTargetTableAlias();
        assert(fromTableAlias != null);

        List<ParsedColInfo> groupBys = m_parsedSelect.groupByColumns();
        Table targetTable = m_catalogDb.getTables().get(root.getTargetTableName());
        assert(targetTable != null);
        CatalogMap<Index> allIndexes = targetTable.getIndexes();

        List<Integer> maxCoveredGroupByColumns = new ArrayList<>();
        ArrayList<AbstractExpression> maxCoveredBindings = null;
        Index pickedUpIndex = null;
        boolean foundAllGroupByCoveredIndex = false;

        for (Index index : allIndexes) {
            if ( ! IndexType.isScannable(index.getType())) {
                continue;
            }

            if ( ! index.getPredicatejson().isEmpty()) {
                // do not try to look at Partial/Sparse index
                continue;
            }

            ArrayList<AbstractExpression> bindings = new ArrayList<>();
            List<Integer> coveredGroupByColumns = calculateGroupbyColumnsCovered(
                    index, fromTableAlias, bindings);

            if (coveredGroupByColumns.size() > maxCoveredGroupByColumns.size()) {
                maxCoveredGroupByColumns = coveredGroupByColumns;
                pickedUpIndex = index;
                maxCoveredBindings = bindings;

                if (maxCoveredGroupByColumns.size() == groupBys.size()) {
                    foundAllGroupByCoveredIndex = true;
                    break;
                }
            }
        }
        if (pickedUpIndex == null) {
            return root;
        }

        IndexScanPlanNode indexScanNode = new IndexScanPlanNode(
                root, null, pickedUpIndex, SortDirectionType.INVALID);
        indexScanNode.setForGroupingOnly();
        indexScanNode.setBindings(maxCoveredBindings);

        gbInfo.m_coveredGroupByColumns = maxCoveredGroupByColumns;
        gbInfo.m_canBeFullySerialized = foundAllGroupByCoveredIndex;
        return indexScanNode;
    }
582265
function findWhereUnwrapped(wrapper, predicate, filter = treeFilter) {
  return wrapper.flatMap(n => filter(n.getNodeInternal(), predicate));
}
153275
@Nullable
  public static TreePath findEnclosingMethodOrLambdaOrInitializer(TreePath path) {
    TreePath curPath = path.getParentPath();
    while (curPath != null) {
      if (curPath.getLeaf() instanceof MethodTree
          || curPath.getLeaf() instanceof LambdaExpressionTree) {
        return curPath;
      }
      TreePath parent = curPath.getParentPath();
      if (parent != null && parent.getLeaf() instanceof ClassTree) {
        if (curPath.getLeaf() instanceof BlockTree) {
          // found initializer block
          return curPath;
        }
        if (curPath.getLeaf() instanceof VariableTree
            && ((VariableTree) curPath.getLeaf()).getInitializer() != null) {
          // found field with an inline initializer
          return curPath;
        }
      }
      curPath = parent;
    }
    return null;
  }
1212696
@Override
  public Collection<String> getCliqueFeatures(PaddedList<IN> cInfo, int loc, Clique clique) {
    Collection<String> features = new HashSet<String>();

    boolean doFE = cInfo.get(0).containsKey(DomainAnnotation.class);
    String domain = (doFE ? cInfo.get(0).get(DomainAnnotation.class) : null);

//    System.err.println(doFE+"\t"+domain);

    if (clique == cliqueC) {
      //200710: tried making this clique null; didn't improve performance (rafferty)
      Collection<String> c = featuresC(cInfo, loc);
      addAllInterningAndSuffixing(features, c, "C");
      if (doFE) {
        addAllInterningAndSuffixing(features, c, domain+"-C");
      }
    } else if (clique == cliqueCpC) {
      Collection<String> c = featuresCpC(cInfo, loc);
      addAllInterningAndSuffixing(features, c, "CpC");
      if (doFE) {
        addAllInterningAndSuffixing(features, c, domain+"-CpC");
      }

      c = featuresCnC(cInfo, loc-1);
      addAllInterningAndSuffixing(features, c, "CnC");
      if (doFE) {
        addAllInterningAndSuffixing(features, c, domain+"-CnC");
      }
    } else if (clique == cliqueCp2C) {
      Collection<String> c = featuresCp2C(cInfo, loc);
      addAllInterningAndSuffixing(features, c, "Cp2C");
      if (doFE) {
        addAllInterningAndSuffixing(features, c, domain+"-Cp2C");
      }
    } else if (clique == cliqueCp3C) {
      Collection<String> c = featuresCp3C(cInfo, loc);
      addAllInterningAndSuffixing(features, c, "Cp3C");
      if (doFE) {
        addAllInterningAndSuffixing(features, c, domain+"-Cp3C");
      }
    } else if (clique == cliqueCp4C) {
      Collection<String> c = featuresCp4C(cInfo, loc);
      addAllInterningAndSuffixing(features, c, "Cp4C");
      if (doFE) {
        addAllInterningAndSuffixing(features, c, domain+"-Cp4C");
      }
    } else if (clique == cliqueCp5C) {
      Collection<String> c = featuresCp5C(cInfo, loc);
      addAllInterningAndSuffixing(features, c, "Cp5C");
      if (doFE) {
        addAllInterningAndSuffixing(features, c, domain+"-Cp5C");
      }
    } else if (clique == cliqueCpCp2C) {
      Collection<String> c = featuresCpCp2C(cInfo, loc);
      addAllInterningAndSuffixing(features, c, "CpCp2C");
      if (doFE) {
        addAllInterningAndSuffixing(features, c, domain+"-CpCp2C");
      }

      c = featuresCpCnC(cInfo, loc-1);
      addAllInterningAndSuffixing(features, c, "CpCnC");
      if (doFE) {
        addAllInterningAndSuffixing(features, c, domain+"-CpCnC");
      }
    } else if (clique == cliqueCpCp2Cp3C) {
      Collection<String> c = featuresCpCp2Cp3C(cInfo, loc);
      addAllInterningAndSuffixing(features, c, "CpCp2Cp3C");
      if (doFE) {
        addAllInterningAndSuffixing(features, c, domain+"-CpCp2Cp3C");
      }
    } else if (clique == cliqueCpCp2Cp3Cp4C) {
      Collection<String> c = featuresCpCp2Cp3Cp4C(cInfo, loc);
      addAllInterningAndSuffixing(features, c, "CpCp2Cp3Cp4C");
      if (doFE) {
        addAllInterningAndSuffixing(features, c, domain+"-CpCp2Cp3Cp4C");
      }
    }

    // System.err.println(StringUtils.join(features,"\n")+"\n");
    return features;
  }
709003
function findDirectiveMatches(tNode) {
    var registry = tView.directiveRegistry;
    var matches = null;
    if (registry) {
        for (var i = 0; i < registry.length; i++) {
            var def = registry[i];
            if (isNodeMatchingSelectorList(tNode, def.selectors)) {
                if (def.template) {
                    if (tNode.flags & 4096 /* isComponent */)
                        throwMultipleComponentError(tNode);
                    tNode.flags = 4096 /* isComponent */;
                }
                if (def.diPublic)
                    def.diPublic(def);
                (matches || (matches = [])).push(def, null);
            }
        }
    }
    return matches;
}
530689
@Override
  public AndroidElement findElement(final By by) {
    if (by == null) {
      throw new IllegalArgumentException("By cannot be null.");
    }

    SearchContext context = getSearchContext();
    AndroidElement found = by.findElement(context);
    long timeout = getTimeout();

    while (found == null && (System.currentTimeMillis() < timeout)) {
      sleepQuietly(AndroidWait.DEFAULT_SLEEP_INTERVAL);
      found = by.findElement(context);
    }
    return found;
  }
706398
private void findHomogeneousLeaves(AreaImpl root)
    {
        if (root.getChildCount() > 1)
            findSuperAreas(root, 1);
        for (int i = 0; i < root.getChildCount(); i++)
            findHomogeneousLeaves((AreaImpl) root.getChildAt(i));
    }
841357
private void findLocalComponentsForComponent(LocalComponents localComponents,
      TypeElement componentTypeElement) {
    Component componentAnnotation = componentTypeElement.getAnnotation(Component.class);
    if (componentAnnotation == null) {
      return;
    }

    processLocalComponentClass(localComponents, componentTypeElement);
    getComponentLocalComponents(elements, componentTypeElement)
        .stream()
        .map(DeclaredType.class::cast)
        .map(DeclaredType::asElement)
        .map(TypeElement.class::cast)
        .forEach(childTypeElement -> processLocalComponentClass(localComponents,
            childTypeElement));

    getSuperComponentType(componentTypeElement)
        .ifPresent(superComponentType -> findLocalComponentsForComponent(
            localComponents,
            superComponentType));
  }