### Question:
DeadRemovalStrategy implements OptimizationStrategy { @Override public boolean perform() { addresses = getValidAddresses(manipulator); exceptionHandlingAddresses = getExceptionHandlerAddresses(manipulator); Set<Integer> removeSet = new HashSet<>(); List<Integer> removeAddresses; removeAddresses = getDeadAddresses(); unvisitedCount += removeAddresses.size(); removeSet.addAll(removeAddresses); removeAddresses = getDeadAssignmentAddresses(); unusedAssignmentCount += removeAddresses.size(); removeSet.addAll(removeAddresses); removeAddresses = getDeadResultAddresses(); unusedResultCount += removeAddresses.size(); removeSet.addAll(removeAddresses); removeAddresses = getUselessBranchAddresses(); uselessBranchCount += removeAddresses.size(); removeSet.addAll(removeAddresses); removeAddresses = getNopAddresses(); nopCount += removeAddresses.size(); removeSet.addAll(removeAddresses); List<Integer> deadAddresses = new LinkedList<>(removeSet); if (deadAddresses.size() > 0) { manipulator.removeInstructions(deadAddresses); } return !removeSet.isEmpty(); } DeadRemovalStrategy(ExecutionGraphManipulator manipulator); @Override Map<String, Integer> getOptimizationCounts(); @Override boolean perform(); void setRemoveWeak(boolean removeWeak);  }### Answer:
@Test public void doesNotDetectInstanceInitializer() { VirtualMachine vm = VMTester.spawnVM(true); VirtualClass virtualClass = vm.getClassManager().getVirtualClass(CLASS_NAME); VMState initial = new VMState(); initial.setRegisters(0, new UninitializedInstance(virtualClass), CLASS_NAME); String methodName = "<init>()V"; ExecutionGraphManipulator manipulator = OptimizerTester.getGraphManipulator(CLASS_NAME, methodName, initial); DeadRemovalStrategy strategy = new DeadRemovalStrategy(manipulator); strategy.perform(); BuilderInstruction instruction = manipulator.getInstruction(0); assertEquals(Opcode.INVOKE_DIRECT, instruction.getOpcode()); }