Int2ObjectMap<int[]> (@NotNull final List<DefinitionMap> dfaResult, Instruction @NotNull [] flow) { Int2ObjectMap<int[]> result = new Int2ObjectOpenHashMap<>(); for (int i = 0; i < flow.length; i++) { Instruction insn = flow[i]; if (!(insn instanceof ReadWriteVariableInstruction rwInsn)) { continue; } if (rwInsn.isWrite()) { continue; } DefinitionMap definitionMap = dfaResult.get(i); definitionMap = definitionMap == null ? DefinitionMap.NEUTRAL : definitionMap; int varIndex = rwInsn.getDescriptor(); IntSet defs = definitionMap.getDefinitions(varIndex); if (defs == null) { defs = IntSet.of(); } result.put(i, defs.toIntArray()); } return result; }