Source:
<code>protected void addAddRedeployLinksSteps(CommandContext ctx, ModelNode steps, String overlay, String serverGroup, String[] links, boolean regexp) throws CommandLineException { boolean warn = false; for(String link : links) { final ModelNode op = new ModelNode(); final ModelNode address = op.get(Util.ADDRESS); if(serverGroup != null) { address.add(Util.SERVER_GROUP, serverGroup); } address.add(Util.DEPLOYMENT_OVERLAY, overlay); address.add(Util.DEPLOYMENT, link); op.get(Util.OPERATION).set(Util.ADD); steps.add(op); if (redeployAffected.isPresent(ctx.getParsedCommandLine())) { final List<String> matchingDeployments = Util.getMatchingDeployments(ctx.getModelControllerClient(), link, serverGroup, true); if (!matchingDeployments.isEmpty()) { if (serverGroup == null) { for (String deployment : matchingDeployments) { final ModelNode step = new ModelNode(); final ModelNode addr = step.get(Util.ADDRESS); addr.add(Util.DEPLOYMENT, deployment); step.get(Util.OPERATION).set(Util.REDEPLOY); steps.add(step); } } else { for (String deployment : matchingDeployments) { final ModelNode step = new ModelNode(); final ModelNode addr = step.get(Util.ADDRESS); addr.add(Util.SERVER_GROUP, serverGroup); addr.add(Util.DEPLOYMENT, deployment); step.get(Util.OPERATION).set(Util.REDEPLOY); steps.add(step); } } } } else { warn = true; } } if (warn) { String warningMsg = serverGroup == null <START> ? "WARNING: redeployment is required on deployment " + Arrays.toString(links) <END> : "WARNING: redeployment is required on deployment " + Arrays.toString(links) + " in server group " + serverGroup; ctx.printLine(warningMsg); } }</code><technical_language>static part there</technical_language>

Target:
protected void addAddRedeployLinksSteps(CommandContext ctx, ModelNode steps, String overlay, String serverGroup, String[] links, boolean regexp) throws CommandLineException { boolean warn = false; for(String link : links) { final ModelNode op = new ModelNode(); final ModelNode address = op.get(Util.ADDRESS); if(serverGroup != null) { address.add(Util.SERVER_GROUP, serverGroup); } address.add(Util.DEPLOYMENT_OVERLAY, overlay); address.add(Util.DEPLOYMENT, link); op.get(Util.OPERATION).set(Util.ADD); steps.add(op); if (redeployAffected.isPresent(ctx.getParsedCommandLine())) { final List<String> matchingDeployments = Util.getMatchingDeployments(ctx.getModelControllerClient(), link, serverGroup, true); if (!matchingDeployments.isEmpty()) { if (serverGroup == null) { for (String deployment : matchingDeployments) { final ModelNode step = new ModelNode(); final ModelNode addr = step.get(Util.ADDRESS); addr.add(Util.DEPLOYMENT, deployment); step.get(Util.OPERATION).set(Util.REDEPLOY); steps.add(step); } } else { for (String deployment : matchingDeployments) { final ModelNode step = new ModelNode(); final ModelNode addr = step.get(Util.ADDRESS); addr.add(Util.SERVER_GROUP, serverGroup); addr.add(Util.DEPLOYMENT, deployment); step.get(Util.OPERATION).set(Util.REDEPLOY); steps.add(step); } } } } else { warn = true; } } if (warn) { String warningMsg = serverGroup == null ? WARN_MSG + Arrays.toString(links) : WARN_MSG + Arrays.toString(links) + " in server group " + serverGroup; ctx.printLine(warningMsg); } }