Source:
<code>protected void executeVmCommand() { boolean isNicToBePlugged = getParameters().getAction() == PlugAction.PLUG; if (isNicToBePlugged){ clearAddressIfPciSlotIsDuplicated(vmDevice); } if (hotPlugVmNicRequired(getVm().getStatus())) { <START> boolean externalNetworkIsPlugged = isNicToBePlugged && getNetwork() != null && getNetwork().isExternal(); <END> if (externalNetworkIsPlugged) { plugToExternalNetwork(); } String vfToUse = null; try { boolean shouldAcquireVF = isNicToBePlugged && isPassthrough(); if (shouldAcquireVF) { vfToUse = acquireVF(); if (vfToUse == null) { failValidationCannotPlugPassthroughVnicNoSuitableVf(); return; } else { vmDevice.setHostDevice(vfToUse); } } VDSReturnValue returnValue = runVdsCommand(getParameters().getAction().getCommandType(), new VmNicDeviceVDSParameters(getVdsId(), getVm(), getParameters().getNic(), vmDevice)); if (returnValue.getSucceeded()) { boolean passthroughHotPlug = vfToUse != null; boolean passthroughHotUnplug = isPassthrough() && getParameters().getAction() == PlugAction.UNPLUG; if (passthroughHotUnplug) { networkDeviceHelper.setVmIdOnVfs(getVdsId(), null, new HashSet<>(Arrays.asList(vmDevice.getHostDevice()))); } if (passthroughHotPlug || passthroughHotUnplug) { runInternalAction(VdcActionType.RefreshHost, new VdsActionParameters(getVdsId())); } } else { clearPassthroughData(vfToUse); } } catch (EngineException e) { if (externalNetworkIsPlugged && getParameters().isNewNic()) { unplugFromExternalNetwork(); } clearPassthroughData(vfToUse); throw e; } } TransactionSupport.executeInNewTransaction(updateDevice()); setSucceeded(true); }</code><technical_language>I more line shorter 120</technical_language>

Target:
protected void executeVmCommand() { boolean isNicToBePlugged = getParameters().getAction() == PlugAction.PLUG; if (isNicToBePlugged){ clearAddressIfPciSlotIsDuplicated(vmDevice); } if (hotPlugVmNicRequired(getVm().getStatus())) { boolean externalNetworkIsPlugged = isNicToBePlugged && getNetwork() != null && getNetwork().isExternal(); if (externalNetworkIsPlugged) { plugToExternalNetwork(); } String vfToUse = null; try { boolean shouldAcquireVF = isNicToBePlugged && isPassthrough(); if (shouldAcquireVF) { vfToUse = acquireVF(); if (vfToUse == null) { failValidationCannotPlugPassthroughVnicNoSuitableVf(); return; } vmDevice.setHostDevice(vfToUse); } VDSReturnValue returnValue = runVdsCommand(getParameters().getAction().getCommandType(), new VmNicDeviceVDSParameters(getVdsId(), getVm(), getParameters().getNic(), vmDevice)); if (returnValue.getSucceeded()) { boolean passthroughHotPlug = vfToUse != null; boolean passthroughHotUnplug = isPassthrough() && getParameters().getAction() == PlugAction.UNPLUG; if (passthroughHotUnplug) { networkDeviceHelper.setVmIdOnVfs(getVdsId(), null, new HashSet<>(Arrays.asList(vmDevice.getHostDevice()))); } if (passthroughHotPlug || passthroughHotUnplug) { runInternalAction(VdcActionType.RefreshHost, new VdsActionParameters(getVdsId())); } } else { clearPassthroughData(vfToUse); } } catch (EngineException e) { if (externalNetworkIsPlugged && getParameters().isNewNic()) { unplugFromExternalNetwork(); } clearPassthroughData(vfToUse); throw e; } } TransactionSupport.executeInNewTransaction(updateDevice()); setSucceeded(true); }