Source:
<code>private List<NetworkAttachment> getAttachmentsWithMissingUpdatedDefaultRoute() { NetworkCluster currentDefaultRouteNetworkCluster = findCurrentDefaultRouteNetworkForCluster(); NetworkAttachment currentDefaultRouteNetworkAttachment = currentDefaultRouteNetworkCluster == null ? null : findNetworkAttachmentBy( networkIdAttachmentPredicate(currentDefaultRouteNetworkCluster.getNetworkId()), getExistingAttachments()); VdsNetworkInterface previousDefaultRouteNic = findPreviousDefaultRouteNic(); NetworkAttachment previousDefaultRouteNetworkAttachment = previousDefaultRouteNic == null ? null : findNetworkAttachmentBy(networkNameAttachmentPredicate(previousDefaultRouteNic.getNetworkName()), getExistingAttachments()); if (currentDefaultRouteNetworkAttachment != null && previousDefaultRouteNetworkAttachment != null && currentDefaultRouteNetworkAttachment.getId().equals(previousDefaultRouteNetworkAttachment.getId())) { return getParameters().getNetworkAttachments(); } <START> if (previousDefaultRouteNetworkAttachment != null && previousDefaultRouteNetworkAttachment.getIpConfiguration() != null && previousDefaultRouteNetworkAttachment.getIpConfiguration().getIpv6PrimaryAddress() != null) { <END> previousDefaultRouteNetworkAttachment.getIpConfiguration().getIpv6PrimaryAddress().setGateway(null); } List<NetworkAttachment> extendedAttachments = getParameters().getNetworkAttachments(); NetworkAttachment potentialyMissingAttachment = getPotentialyMissingAttachment( currentDefaultRouteNetworkCluster == null ? null : currentDefaultRouteNetworkCluster.getNetworkId(), currentDefaultRouteNetworkAttachment, previousDefaultRouteNetworkAttachment); addAttachmentIfMissing(potentialyMissingAttachment, extendedAttachments); return extendedAttachments; }</code><technical_language>nit: formatting</technical_language>

Target:
private List<NetworkAttachment> getAttachmentsWithMissingUpdatedDefaultRoute() { NetworkCluster currentDefaultRouteNetworkCluster = findCurrentDefaultRouteNetworkForCluster(); NetworkAttachment currentDefaultRouteNetworkAttachment = currentDefaultRouteNetworkCluster == null ? null : findNetworkAttachmentBy( networkIdAttachmentPredicate(currentDefaultRouteNetworkCluster.getNetworkId()), getExistingAttachments()); VdsNetworkInterface previousDefaultRouteNic = findPreviousDefaultRouteNic(); NetworkAttachment previousDefaultRouteNetworkAttachment = previousDefaultRouteNic == null ? null : findNetworkAttachmentBy(networkNameAttachmentPredicate(previousDefaultRouteNic.getNetworkName()), getExistingAttachments()); if (currentDefaultRouteNetworkAttachment != null && previousDefaultRouteNetworkAttachment != null && currentDefaultRouteNetworkAttachment.getId().equals(previousDefaultRouteNetworkAttachment.getId())) { return getParameters().getNetworkAttachments(); } if (hasIpv6PrimaryAddress(previousDefaultRouteNetworkAttachment)) { previousDefaultRouteNetworkAttachment.getIpConfiguration().getIpv6PrimaryAddress().setGateway(null); } List<NetworkAttachment> extendedAttachments = getParameters().getNetworkAttachments(); NetworkAttachment potentialyMissingAttachment = getPotentialyMissingAttachment( currentDefaultRouteNetworkCluster == null ? null : currentDefaultRouteNetworkCluster.getNetworkId(), currentDefaultRouteNetworkAttachment, previousDefaultRouteNetworkAttachment); addAttachmentIfMissing(potentialyMissingAttachment, extendedAttachments); return extendedAttachments; }