List<TaintNode> (@NotNull PsiElement psiElement, @NotNull PsiElement elementRef) { if (myTaintValueFactory == null) return List.of(); if (!myNext) return List.of(); TaintAnalyzer taintAnalyzer = new TaintAnalyzer(myTaintValueFactory); UExpression uExpression = UastContextKt.toUElementOfExpectedTypes(elementRef, UExpression.class); if (uExpression == null) return Collections.emptyList(); TaintValue taintValue; try { taintValue = taintAnalyzer.analyzeExpression(uExpression, true, TaintValue.TAINTED); } catch (DeepTaintAnalyzerException e) { return Collections.emptyList(); } myTaintValue = taintValue; if (taintValue == TaintValue.UNTAINTED) return Collections.emptyList(); if (taintValue == TaintValue.TAINTED) { markTainted(); return Collections.emptyList(); } Set<PsiElement> parents = collectParents(); parents.add(psiElement); List<TaintNode> children = new ArrayList<>(); for (NonMarkedElement nonMarkedElement : taintAnalyzer.getNonMarkedElements()) { if (parents.contains(nonMarkedElement.myNonMarked)) continue; TaintNode child = new TaintNode(this, nonMarkedElement.myNonMarked, nonMarkedElement.myRef, myTaintValueFactory, nonMarkedElement.myNext); children.add(child); } return children; }