Source:
<code>public RunInstancesOptions withBlockDeviceMappings(Set<? extends BlockDeviceMapping> mappings) { int i = 1; for (BlockDeviceMapping mapping : checkNotNull(mappings, "mappings")) { checkNotNull(mapping.getDeviceName(), "deviceName"); formParameters.put(String.format("BlockDeviceMapping.%d.DeviceName", i), mapping.getDeviceName()); if (mapping.getVirtualName() != null) formParameters.put(String.format("BlockDeviceMapping.%d.VirtualName", i), mapping.getVirtualName()); if (mapping.getEbsSnapshotId() != null) formParameters.put(String.format("BlockDeviceMapping.%d.Ebs.SnapshotId", i), mapping.getEbsSnapshotId()); if (mapping.getEbsVolumeSize() != null) formParameters.put(String.format("BlockDeviceMapping.%d.Ebs.VolumeSize", i), String.valueOf(mapping.getEbsVolumeSize())); if (mapping.getEbsNoDevice() != null) formParameters.put(String.format("BlockDeviceMapping.%d.Ebs.NoDevice", i), String.valueOf(mapping.getEbsNoDevice())); if (mapping.getEbsDeleteOnTermination() != null) formParameters.put(String.format("BlockDeviceMapping.%d.Ebs.DeleteOnTermination", i), String.valueOf(mapping.getEbsDeleteOnTermination())); if (mapping.getEbsVolumeType() != null) formParameters.put(String.format("BlockDeviceMapping.%d.Ebs.VolumeType", i), mapping.getEbsVolumeType()); if (mapping.getEbsIops() != null) formParameters.put(String.format("BlockDeviceMapping.%d.Ebs.Iops", i), String.valueOf(mapping.getEbsIops())); <START> if (mapping.getEbsEncrypted() != null && mapping.getEbsEncrypted() != false) <END> formParameters.put(String.format("BlockDeviceMapping.%d.Ebs.Encrypted", i), String.valueOf(mapping.getEbsEncrypted())); i++; } return this; }</code><technical_language>yeah of truthy dance</technical_language>

Target:
public RunInstancesOptions withBlockDeviceMappings(Set<? extends BlockDeviceMapping> mappings) { int i = 1; for (BlockDeviceMapping mapping : checkNotNull(mappings, "mappings")) { checkNotNull(mapping.getDeviceName(), "deviceName"); formParameters.put(String.format("BlockDeviceMapping.%d.DeviceName", i), mapping.getDeviceName()); if (mapping.getVirtualName() != null) formParameters.put(String.format("BlockDeviceMapping.%d.VirtualName", i), mapping.getVirtualName()); if (mapping.getEbsSnapshotId() != null) formParameters.put(String.format("BlockDeviceMapping.%d.Ebs.SnapshotId", i), mapping.getEbsSnapshotId()); if (mapping.getEbsVolumeSize() != null) formParameters.put(String.format("BlockDeviceMapping.%d.Ebs.VolumeSize", i), String.valueOf(mapping.getEbsVolumeSize())); if (mapping.getEbsNoDevice() != null) formParameters.put(String.format("BlockDeviceMapping.%d.Ebs.NoDevice", i), String.valueOf(mapping.getEbsNoDevice())); if (mapping.getEbsDeleteOnTermination() != null) formParameters.put(String.format("BlockDeviceMapping.%d.Ebs.DeleteOnTermination", i), String.valueOf(mapping.getEbsDeleteOnTermination())); if (mapping.getEbsVolumeType() != null) formParameters.put(String.format("BlockDeviceMapping.%d.Ebs.VolumeType", i), mapping.getEbsVolumeType()); if (mapping.getEbsIops() != null) formParameters.put(String.format("BlockDeviceMapping.%d.Ebs.Iops", i), String.valueOf(mapping.getEbsIops())); if (mapping.getEbsEncrypted() != null && mapping.getEbsEncrypted()) formParameters.put(String.format("BlockDeviceMapping.%d.Ebs.Encrypted", i), String.valueOf(mapping.getEbsEncrypted())); i++; } return this; }