Source:
<code>private VdsNetworkInterface findNicToSetupManagementNetwork() { if (StringUtils.isEmpty(host.getActiveNic())) { <START> log.warnFormat("No interface was reported as lastClientInterface by host {0} capabilities. " + <END> "There will be no attempt to create the management network on the host.", host.getName()); return null; } VdsNetworkInterface nic = Entities.entitiesByName(host.getInterfaces()).get(host.getActiveNic()); if (nic == null) { log.warnFormat("The lastClientInterface {0} of host {1} is not a valid interface for the mangement network. " + "If the interface is a bridge, it should be teared-down manually.", host.getActiveNic(), host.getName()); throw new NetworkConfiguratorException(String.format("lastClientIface %s is not a valid interface for management network", host.getActiveNic())); } Network managementNetwork = getDbFacade().getNetworkDao() .getByNameAndDataCenter(Config.<String> GetValue(ConfigValues.ManagementNetwork), host.getStoragePoolId()); if (managementNetwork.getName().equals(nic.getNetworkName())) { return null; } if (!nicHasValidVlanId(managementNetwork, nic)) { final AuditLogableBase event = new AuditLogableBase(); event.setVds(host); event.addCustomValue("VlanId", resolveVlanId(nic.getVlanId())); event.addCustomValue("MgmtVlanId", resolveVlanId(managementNetwork.getVlanId())); event.addCustomValue("InterfaceName", nic.getName()); AuditLogDirector.log(event, AuditLogType.VLAN_ID_MISMATCH_FOR_MANAGEMENT_NETWORK_CONFIGURATION, NETWORK_CONFIG_LOG_ERR); throw new NetworkConfiguratorException(MANAGEMENET_NETWORK_CONFIG_ERR); } return nic; }</code><technical_language>I split lines sense put operator first, easier new line is continuing line it.. For example: methodCall("a" + "b") Versus: methodCall("a" + "b") In form (on long complex lines) is harder string "b" is a concatenation, a new parameter</technical_language>

Target:
private VdsNetworkInterface findNicToSetupManagementNetwork() { if (StringUtils.isEmpty(host.getActiveNic())) { log.warnFormat("No interface was reported as lastClientInterface by host {0} capabilities. " + "There will be no attempt to create the management network on the host.", host.getName()); return null; } VdsNetworkInterface nic = Entities.entitiesByName(host.getInterfaces()).get(host.getActiveNic()); if (nic == null) { log.warnFormat("The lastClientInterface {0} of host {1} is not a valid interface for the mangement network. " + "If the interface is a bridge, it should be torn-down manually.", host.getActiveNic(), host.getName()); throw new NetworkConfiguratorException( String.format("lastClientIface %s is not a valid interface for management network", host.getActiveNic())); } Network managementNetwork = getDbFacade().getNetworkDao() .getByNameAndDataCenter(Config.<String> GetValue(ConfigValues.ManagementNetwork), host.getStoragePoolId()); if (managementNetwork.getName().equals(nic.getNetworkName())) { return null; } if (!nicHasValidVlanId(managementNetwork, nic)) { final AuditLogableBase event = createEvent(); event.addCustomValue("VlanId", resolveVlanId(nic.getVlanId())); event.addCustomValue("MgmtVlanId", resolveVlanId(managementNetwork.getVlanId())); event.addCustomValue("InterfaceName", nic.getName()); AuditLogDirector.log(event, AuditLogType.VLAN_ID_MISMATCH_FOR_MANAGEMENT_NETWORK_CONFIGURATION, NETWORK_CONFIG_LOG_ERR); throw new NetworkConfiguratorException(MANAGEMENET_NETWORK_CONFIG_ERR); } return nic; }