Source:
<code>public void mergeTrackable(final Trackable newTrackable) { <START> guid = newTrackable.guid.equals("") ? guid : newTrackable.guid; <END> geocode = newTrackable.geocode.equals("") ? geocode : newTrackable.geocode; iconUrl = newTrackable.iconUrl.equals("") ? iconUrl : newTrackable.iconUrl; name = newTrackable.name.equals("") ? name : newTrackable.name; type = newTrackable.type == null ? type : newTrackable.type; released = newTrackable.released == null ? released : newTrackable.released; distance = newTrackable.distance == -1 ? distance : newTrackable.distance; origin = newTrackable.origin == null ? origin : newTrackable.origin; owner = newTrackable.owner == null ? owner : newTrackable.owner; ownerGuid = newTrackable.ownerGuid == null ? ownerGuid : newTrackable.ownerGuid; spottedName = newTrackable.spottedName == null ? spottedName : newTrackable.spottedName; spottedType = newTrackable.spottedType == SPOTTED_UNSET ? spottedType : newTrackable.spottedType; spottedGuid = newTrackable.spottedGuid == null ? spottedGuid : newTrackable.spottedGuid; goal = newTrackable.goal == null ? goal : newTrackable.goal; details = newTrackable.details == null ? details : newTrackable.details; image = newTrackable.image == null ? image : newTrackable.image; logs = newTrackable.logs == null ? logs : newTrackable.logs; trackingcode = newTrackable.trackingcode == null ? trackingcode : newTrackable.trackingcode; brand = newTrackable.brand == null ? brand : newTrackable.brand; trackableConnector = newTrackable.trackableConnector == null ? trackableConnector : newTrackable.trackableConnector; }</code><technical_language>StringUtils.defaultIfEmpty(...,...) this more readable avoiding repetition of conditional</technical_language>

Target:
public void mergeTrackable(final Trackable newTrackable) { guid = StringUtils.defaultIfEmpty(newTrackable.guid, guid); geocode = StringUtils.defaultIfEmpty(newTrackable.geocode, geocode); iconUrl = StringUtils.defaultIfEmpty(newTrackable.iconUrl, iconUrl); name = StringUtils.defaultIfEmpty(newTrackable.name, name); type = ObjectUtils.defaultIfNull(newTrackable.type, type); released = ObjectUtils.defaultIfNull(newTrackable.released, released); distance = newTrackable.distance == -1 ? distance : newTrackable.distance; origin = ObjectUtils.defaultIfNull(newTrackable.origin, origin); owner = ObjectUtils.defaultIfNull(newTrackable.owner, owner); ownerGuid = ObjectUtils.defaultIfNull(newTrackable.ownerGuid, ownerGuid); spottedName = ObjectUtils.defaultIfNull(newTrackable.spottedName, spottedName); spottedType = newTrackable.spottedType == SPOTTED_UNSET ? spottedType : newTrackable.spottedType; spottedGuid = ObjectUtils.defaultIfNull(newTrackable.spottedGuid, spottedGuid); goal = ObjectUtils.defaultIfNull(newTrackable.goal, goal); details = ObjectUtils.defaultIfNull(newTrackable.details, details); image = ObjectUtils.defaultIfNull(newTrackable.image, image); mergeLogEntry(newTrackable.logs); trackingcode = ObjectUtils.defaultIfNull(newTrackable.trackingcode, trackingcode); brand = ObjectUtils.defaultIfNull(newTrackable.brand, brand); trackableConnector = ObjectUtils.defaultIfNull(newTrackable.trackableConnector, trackableConnector); }