boolean (@NotNull final ControlFlow flow, final int @NotNull [] instructionOffsets, final int startOffset) { ControlFlowGraph graph = new ControlFlowGraph(flow.getSize()) { @Override boolean isComplete(int offset, int nextOffset) { return ArrayUtil.indexOf(instructionOffsets, nextOffset) >= 0; } }; graph.buildFrom(flow); return graph.depthFirstSearch(startOffset); }