Source:
<code>protected void executeQueryCommand() { String volumeName = getParameters().getVolumeName(); if (getParameters().isDetailRequired() || StringUtils.isNotEmpty(volumeName)) { <START> executeAndSetReturnValue(volumeName); <END> return; } VDSReturnValue nfsReturnValue = null; VDSReturnValue replicateReturnValue = null; GlusterVolumeEntity nfsReplicateVolume = getNfsReplicateVolume(getParameters().getClusterId()); if (nfsReplicateVolume != null) { executeAndSetReturnValue(nfsReplicateVolume.getName()); return; } GlusterVolumeEntity nfsVolume = getNfsVolume(getParameters().getClusterId()); GlusterVolumeEntity replicateVolume = getReplicateVolume(getParameters().getClusterId()); if (nfsVolume == null && replicateVolume == null) { log.error("To get service details, no Nfs or Replicated volumes found in the cluster."); getQueryReturnValue().setReturnValue(new GlusterVolumeAdvancedDetails()); return; } if (nfsVolume != null) { nfsReturnValue = executeCommand(nfsVolume.getName()); } if (replicateVolume != null) { replicateReturnValue = executeCommand(replicateVolume.getName()); } if (nfsReturnValue != null && replicateReturnValue != null) { GlusterVolumeAdvancedDetails volumeAdvancedDetailsForNfs = (GlusterVolumeAdvancedDetails) nfsReturnValue.getReturnValue(); GlusterVolumeAdvancedDetails volumeAdvancedDetailsForShd = (GlusterVolumeAdvancedDetails) replicateReturnValue.getReturnValue(); volumeAdvancedDetailsForNfs.getServiceInfo().addAll(volumeAdvancedDetailsForShd.getServiceInfo()); getQueryReturnValue().setReturnValue(volumeAdvancedDetailsForNfs); } else if (nfsReturnValue == null && replicateReturnValue != null) { getQueryReturnValue().setReturnValue(replicateReturnValue.getReturnValue()); } else if (nfsReturnValue != null && replicateVolume == null) { getQueryReturnValue().setReturnValue(nfsReturnValue.getReturnValue()); } }</code><technical_language>if condition true isDetailsRequired() == true volumeName is empty. work? Do need add a validation this scenario</technical_language>

Target:
protected void executeQueryCommand() { String volumeName = getParameters().getVolumeName(); if (getParameters().isDetailRequired() && StringUtils.isNotEmpty(volumeName)) { executeAndSetReturnValue(volumeName); return; } VDSReturnValue nfsReturnValue = null; VDSReturnValue replicateReturnValue = null; GlusterVolumeEntity nfsReplicateVolume = getNfsReplicateVolume(getParameters().getClusterId()); if (nfsReplicateVolume != null) { executeAndSetReturnValue(nfsReplicateVolume.getName()); return; } GlusterVolumeEntity nfsVolume = getNfsVolume(getParameters().getClusterId()); GlusterVolumeEntity replicateVolume = getReplicateVolume(getParameters().getClusterId()); if (nfsVolume == null && replicateVolume == null) { log.error("To get service details, no Nfs or Replicated volumes found in the cluster."); getQueryReturnValue().setReturnValue(new GlusterVolumeAdvancedDetails()); return; } if (nfsVolume != null) { nfsReturnValue = executeCommand(nfsVolume.getName()); } if (replicateVolume != null) { replicateReturnValue = executeCommand(replicateVolume.getName()); } if (nfsReturnValue != null && replicateReturnValue != null) { GlusterVolumeAdvancedDetails volumeAdvancedDetailsForNfs = (GlusterVolumeAdvancedDetails) nfsReturnValue.getReturnValue(); GlusterVolumeAdvancedDetails volumeAdvancedDetailsForShd = (GlusterVolumeAdvancedDetails) replicateReturnValue.getReturnValue(); volumeAdvancedDetailsForNfs.getServiceInfo().addAll(volumeAdvancedDetailsForShd.getServiceInfo()); getQueryReturnValue().setReturnValue(volumeAdvancedDetailsForNfs); } else if (nfsReturnValue == null && replicateReturnValue != null) { getQueryReturnValue().setReturnValue(replicateReturnValue.getReturnValue()); } else if (nfsReturnValue != null && replicateVolume == null) { getQueryReturnValue().setReturnValue(nfsReturnValue.getReturnValue()); } }