Buggy code:
public final class ServerDeploymentStartStopHandler implements Serializable { private static final long serialVersionUID = 4804538479425267270L ; private static final Logger log = Logger . getLogger ( "org.jboss.as.deployment" ) ; public < P > void deploy ( final String deploymentName , final String runtimeName , final byte [ ] deploymentHash , final ServiceContainer serviceContainer , final UpdateResultHandler < ? , P > resultHandler , final P param ) { } public < P > void deploy ( final String deploymentName , final String runtimeName , final byte [ ] deploymentHash , final BatchBuilder batchBuilder , final ServiceContainer serviceContainer , final UpdateResultHandler < ? , P > resultHandler , final P param ) { try { ServiceName deploymentServiceName = DeploymentService . getServiceName ( deploymentName ) ; batchBuilder . addListener ( new ServerDeploymentStartStopHandler . DeploymentServiceTracker < P > ( deploymentServiceName , resultHandler , param ) ) ; <START_BUG> activate ( deploymentName , runtimeName , deploymentHash , deploymentServiceName , new org . jboss . msc . service . ServiceActivatorContextImpl ( batchBuilder ) , serviceContainer ) ; <END_BUG> } catch ( RuntimeException e ) { resultHandler . handleFailure ( e , param ) ; } } public < P > void redeploy ( final String deploymentName , final String runtimeName , final byte [ ] deploymentHash , final ServiceContainer serviceContainer , final UpdateResultHandler < ? , P > resultHandler , final P param ) { } public < P > void undeploy ( final String deploymentName , final ServiceContainer serviceContainer , final UpdateResultHandler < ? , P > resultHandler , final P param ) { } private void activate ( final String deploymentName , String runtimeName , final byte [ ] deploymentHash , final ServiceName deploymentServiceName , final ServiceActivatorContext context , final ServiceContainer serviceContainer ) { } private ServerDeploymentRepository getDeploymentRepository ( ServiceContainer serviceContainer ) throws ServiceNotFoundException { } private abstract static class AbstractDeploymentServiceTracker < P > extends AbstractServiceListener < Object > { protected final UpdateResultHandler < ? , P > resultHandler ; protected final P param ; protected AbstractDeploymentServiceTracker ( final UpdateResultHandler < ? , P > resultHandler , final P param ) { } @ Override public void serviceFailed ( ServiceController < ? > controller , StartException reason ) { } protected void recordResult ( ServiceController < ? extends Object > controller ) { } protected abstract boolean isCorrectService ( ServiceController < ? > service ) { } } private static class DeploymentServiceTracker < P > extends ServerDeploymentStartStopHandler . AbstractDeploymentServiceTracker < P > { private final ServiceName deploymentServiceName ; private DeploymentServiceTracker ( final ServiceName deploymentServiceName , final UpdateResultHandler < ? , P > resultHandler , final P param ) { } @ Override public void serviceStarted ( ServiceController < ? > controller ) { } @ Override protected boolean isCorrectService ( ServiceController < ? > controller ) { } } private static class UndeploymentServiceTracker < P > extends ServerDeploymentStartStopHandler . AbstractDeploymentServiceTracker < P > { private final String deploymentName ; private UndeploymentServiceTracker ( final String deploymentName , final UpdateResultHandler < ? , P > resultHandler , final P param ) { } @ Override public void serviceRemoved ( ServiceController < ? > controller ) { } @ Override protected boolean isCorrectService ( ServiceController < ? > controller ) { } } private static class RedeploymentServiceTracker extends AbstractServiceListener < Object > { private final String deploymentName ; RedeploymentServiceTracker ( final String deploymentName ) { } @ Override public void serviceRemoved ( ServiceController < ? > controller ) { } } }

Fix:
activate ( deploymentName , runtimeName , deploymentHash , deploymentServiceName , new org . jboss . msc . service . ServiceActivatorContextImpl ( batchBuilder , serviceContainer ) , serviceContainer ) ;