Buggy code:
public final class ExtensionContextImpl implements ExtensionContext { private final ProcessType processType ; private final ManagementResourceRegistration profileRegistration ; private final SubsystemXmlWriterRegistry writerRegistry ; private final ManagementResourceRegistration subsystemDeploymentRegistration ; private final Map < String , List < String > > subsystemsByModule = new HashMap < String , List < String > > ( ) ; public ExtensionContextImpl ( final ManagementResourceRegistration profileRegistration , final ManagementResourceRegistration deploymentOverrideRegistration , final SubsystemXmlWriterRegistry writerRegistry , ProcessType processType ) { } public ExtensionContext createTracking ( String moduleName ) { } @ Override public ProcessType getProcessType ( ) { } private void trackSubsystem ( String moduleName , String subysystemName ) { } @ Override public void cleanup ( Resource rootResource , String moduleName ) { } @ Override public SubsystemRegistration registerSubsystem ( final String name ) throws IllegalArgumentException { ControllerLogger . ROOT_LOGGER . registerSubsystemNoWraper ( name ) ; return doRegisterSubsystem ( name ) ; } public SubsystemRegistration doRegisterSubsystem ( final String name ) throws IllegalArgumentException { } private static class DeploymentManagementResourceRegistration implements ManagementResourceRegistration { private final ManagementResourceRegistration deployments ; private final ManagementResourceRegistration subdeployments ; private DeploymentManagementResourceRegistration ( final ManagementResourceRegistration deployments , final ManagementResourceRegistration subdeployments ) { } @ Override public boolean isRuntimeOnly ( ) { } @ Override public boolean isRemote ( ) { } @ Override public OperationStepHandler getOperationHandler ( PathAddress address , String operationName ) { } @ Override public DescriptionProvider getOperationDescription ( PathAddress address , String operationName ) { } @ Override public Set < OperationEntry . Flag > getOperationFlags ( PathAddress address , String operationName ) { } @ Override public OperationEntry getOperationEntry ( PathAddress address , String operationName ) { } @ Override public Set < String > getAttributeNames ( PathAddress address ) { } @ Override public AttributeAccess getAttributeAccess ( PathAddress address , String attributeName ) { } @ Override public Set < String > getChildNames ( PathAddress address ) { } @ Override public Set < PathElement > getChildAddresses ( PathAddress address ) { } @ Override public DescriptionProvider getModelDescription ( PathAddress address ) { } @ Override public Map < String , OperationEntry > getOperationDescriptions ( PathAddress address , boolean inherited ) { } @ Override public ProxyController getProxyController ( PathAddress address ) { } @ Override public Set < ProxyController > getProxyControllers ( PathAddress address ) { } @ Override public ManagementResourceRegistration getSubModel ( PathAddress address ) { } @ Override public ManagementResourceRegistration registerSubModel ( PathElement address , DescriptionProvider descriptionProvider ) { } @ Override public ManagementResourceRegistration registerSubModel ( ResourceDefinition resourceDefinition ) { } @ Override public void unregisterSubModel ( PathElement address ) { } @ Override public boolean isAllowsOverride ( ) { } @ Override public ManagementResourceRegistration registerOverrideModel ( String name , OverrideDescriptionProvider descriptionProvider ) { } @ Override public void unregisterOverrideModel ( String name ) { } @ Override public void registerOperationHandler ( String operationName , OperationStepHandler handler , DescriptionProvider descriptionProvider ) { } @ Override public void registerOperationHandler ( String operationName , OperationStepHandler handler , DescriptionProvider descriptionProvider , EnumSet < OperationEntry . Flag > flags ) { } @ Override public void registerOperationHandler ( String operationName , OperationStepHandler handler , DescriptionProvider descriptionProvider , boolean inherited ) { } @ Override public void registerOperationHandler ( String operationName , OperationStepHandler handler , DescriptionProvider descriptionProvider , boolean inherited , OperationEntry . EntryType entryType ) { } @ Override public void registerOperationHandler ( String operationName , OperationStepHandler handler , DescriptionProvider descriptionProvider , boolean inherited , OperationEntry . EntryType entryType , EnumSet < OperationEntry . Flag > flags ) { } @ Override public void registerReadWriteAttribute ( String attributeName , OperationStepHandler readHandler , OperationStepHandler writeHandler , AttributeAccess . Storage storage ) { } @ Override public void registerReadWriteAttribute ( String attributeName , OperationStepHandler readHandler , OperationStepHandler writeHandler , EnumSet < AttributeAccess . Flag > flags ) { } @ Override public void registerReadWriteAttribute ( AttributeDefinition definition , OperationStepHandler readHandler , OperationStepHandler writeHandler ) { } @ Override public void registerReadOnlyAttribute ( String attributeName , OperationStepHandler readHandler , AttributeAccess . Storage storage ) { } @ Override public void registerReadOnlyAttribute ( String attributeName , OperationStepHandler readHandler , EnumSet < AttributeAccess . Flag > flags ) { } @ Override public void registerReadOnlyAttribute ( AttributeDefinition definition , OperationStepHandler readHandler ) { } @ Override public void registerMetric ( String attributeName , OperationStepHandler metricHandler ) { } @ Override public void registerMetric ( AttributeDefinition definition , OperationStepHandler metricHandler ) { } @ Override public void registerMetric ( String attributeName , OperationStepHandler metricHandler , EnumSet < AttributeAccess . Flag > flags ) { } @ Override public void registerProxyController ( PathElement address , ProxyController proxyController ) { } @ Override public void unregisterProxyController ( PathElement address ) { } } private class DelegatingExtensionContext implements ExtensionContext { final String moduleName ; public DelegatingExtensionContext ( String moduleName ) { } @ Override public SubsystemRegistration registerSubsystem ( String name ) throws IllegalArgumentException { trackSubsystem ( moduleName , name ) ; <START_BUG> return ExtensionContextImpl . this . registerSubsystem ( name ) ; <END_BUG> } @ Override public ProcessType getProcessType ( ) { } @ Override public ExtensionContext createTracking ( String moduleName ) { } @ Override public void cleanup ( Resource resource , String moduleName ) { } } }

Fix:
return ExtensionContextImpl . this . doRegisterSubsystem ( name ) ;