Set<PsiElement> (@NotNull List<Instruction> subGraph) { final Set<PsiElement> result = new HashSet<>(); for (Instruction instruction : subGraph) { final PsiElement element = instruction.getElement(); if (element != null) { result.add(element); } } return result; }