void peepStringInit() { List<Integer> peepAddresses = addresses.stream().filter(this::canPeepStringInit).collect(Collectors.toList()); if (0 == peepAddresses.size()) { return; } madeChanges = true; peepCount += peepAddresses.size(); Collections.sort(peepAddresses, Collections.reverseOrder()); for (int address : peepAddresses) { BuilderInstruction original = manipulator.getInstruction(address); Instruction35c instr = (Instruction35c) original; int instanceRegister = instr.getRegisterC(); HeapItem item = manipulator.getRegisterConsensus(address, instanceRegister); BuilderInstruction replacement = ConstantBuilder.buildConstant(item.getValue(), item.getUnboxedType(), instanceRegister, manipulator.getDexBuilder()); if (log.isDebugEnabled()) { log.debug("Peeping string init @{} {}", address, manipulator.getOp(address)); } manipulator.replaceInstruction(address, replacement); } }