Source:
<code>public static VdsStatic map(PowerManagement model, VdsStatic template) { VdsStatic entity = template != null ? template : new VdsStatic(); entity.setManagementIp(getManagementIp(model, entity)); entity.setPmType(getManagementType(model, entity)); entity.setPmUser(getManagementUser(model, entity)); entity.setPmPassword(getManagementPassword(model, entity)); entity.setPmOptions(getManagementOptions(model, entity)); if (model.isSetEnabled()) { entity.setPmEnabled(model.isEnabled()); } if (model.isSetAutomaticPmEnabled()) { entity.setDisablePowerManagementPolicy(!model.isAutomaticPmEnabled()); } if (model.isSetPmProxies()) { String delim = ""; StringBuilder builder = new StringBuilder(); for (PmProxy pmProxy : model.getPmProxies().getPmProxy()) { builder.append(delim); builder.append(pmProxy.getType()); delim = ","; } entity.setPmProxyPreferences(builder.toString()); } if (model.isSetAgents()) { int order = 1; for (Agent agent : model.getAgents().getAgents()) { if (agent.isSetOrder()) { order = agent.getOrder(); } if (order == 1) { order++; } else if (order == 2) { if (agent.isSetType()) { entity.setPmSecondaryType(agent.getType()); } if (agent.isSetAddress()) { entity.setPmSecondaryIp(agent.getAddress()); } if (agent.isSetUsername()) { entity.setPmSecondaryUser(agent.getUsername()); } if (agent.isSetPassword()) { entity.setPmSecondaryPassword(agent.getPassword()); } if (agent.isSetOptions()) { entity.setPmSecondaryOptions(map(agent.getOptions(), null)); } if (agent.isSetConcurrent()) { entity.setPmSecondaryConcurrent(agent.isConcurrent()); } } } } <START> entity.setPmKdumpDetection(model.isKdumpDetection()); <END> return entity; }</code><technical_language>support situations caller provide "kdump_detection", call "isKdumpDetection" return null call "setPmKdumpDetection" try unbox produce a NPE: if (model.isSetKdumpDetection()) { entity.setPmKdumpDetection(model.isKdumpDetection()); }</technical_language>

Target:
public static VdsStatic map(PowerManagement model, VdsStatic template) { VdsStatic entity = template != null ? template : new VdsStatic(); entity.setManagementIp(getManagementIp(model, entity)); entity.setPmType(getManagementType(model, entity)); entity.setPmUser(getManagementUser(model, entity)); entity.setPmPassword(getManagementPassword(model, entity)); entity.setPmOptions(getManagementOptions(model, entity)); if (model.isSetEnabled()) { entity.setPmEnabled(model.isEnabled()); } if (model.isSetAutomaticPmEnabled()) { entity.setDisablePowerManagementPolicy(!model.isAutomaticPmEnabled()); } if (model.isSetPmProxies()) { String delim = ""; StringBuilder builder = new StringBuilder(); for (PmProxy pmProxy : model.getPmProxies().getPmProxy()) { builder.append(delim); builder.append(pmProxy.getType()); delim = ","; } entity.setPmProxyPreferences(builder.toString()); } if (model.isSetAgents()) { int order = 1; for (Agent agent : model.getAgents().getAgents()) { if (agent.isSetOrder()) { order = agent.getOrder(); } if (order == 1) { order++; } else if (order == 2) { if (agent.isSetType()) { entity.setPmSecondaryType(agent.getType()); } if (agent.isSetAddress()) { entity.setPmSecondaryIp(agent.getAddress()); } if (agent.isSetUsername()) { entity.setPmSecondaryUser(agent.getUsername()); } if (agent.isSetPassword()) { entity.setPmSecondaryPassword(agent.getPassword()); } if (agent.isSetOptions()) { entity.setPmSecondaryOptions(map(agent.getOptions(), null)); } if (agent.isSetConcurrent()) { entity.setPmSecondaryConcurrent(agent.isConcurrent()); } } } } if (model.isSetKdumpDetection()) { entity.setPmKdumpDetection(model.isKdumpDetection()); } return entity; }