TestStep targetTestStep = targetTestCase.getTestStepByName(targetSecurityTestStepName);
boolean overwrite = dialog.getBooleanValue(CloneParameterDialog.OVERWRITE);
for (String scanName : targetSecurityScans) {
AbstractSecurityScanWithProperties targetSecurityScan = (AbstractSecurityScanWithProperties) targetSecurityTest
.getTestStepSecurityScanByName(targetTestStep.getId(), scanName);
for (int i : indexes) {
SecurityCheckedParameter scanParameter = securityScan.getParameterAt(i);
String newParameterLabel = scanParameter.getLabel();
if (securityScan.getParameterByLabel(scanParameter.getLabel()) != null) {
if (securityScan.equals(targetSecurityScan)) {
newParameterLabel = "Copy of " + scanParameter.getLabel();
}
}
if (targetSecurityScan.importParameter(scanParameter, overwrite, newParameterLabel)
&& !items.contains(targetSecurityScan)) {
items.add(targetSecurityScan);
}
}
}