Buggy code:
public abstract class ModelTestKernelServicesImpl < T extends ModelTestKernelServices < T > > implements ModelTestKernelServices < T > { private volatile ServiceContainer container ; private final ModelTestModelControllerService controllerService ; private final ModelController controller ; private final StringConfigurationPersister persister ; private final OperationValidator operationValidator ; private final ManagementResourceRegistration rootRegistration ; private final Map < ModelVersion , T > legacyServices ; private final boolean successfulBoot ; private final Throwable bootError ; protected ModelTestKernelServicesImpl ( ServiceContainer container , ModelTestModelControllerService controllerService , StringConfigurationPersister persister , ManagementResourceRegistration rootRegistration , OperationValidator operationValidator , ModelVersion legacyModelVersion , boolean successfulBoot , Throwable bootError ) { } @ Override public boolean isSuccessfulBoot ( ) { } @ Override public Throwable getBootError ( ) { } @ Override public T getLegacyServices ( ModelVersion modelVersion ) { } protected void checkIsMainController ( ) { } @ Override public ModelNode readWholeModel ( ) { } @ Override public ModelNode readWholeModel ( boolean includeAliases ) { } @ Override public ModelNode readWholeModel ( boolean includeAliases , boolean includeRuntime ) { } @ Override public ServiceContainer getContainer ( ) { } @ Override public ModelNode executeOperation ( ModelNode operation , InputStream ... inputStreams ) { } @ Override public ModelNode executeOperation ( ModelNode operation , OperationTransactionControl txControl ) { } @ Override public ModelNode executeForResult ( ModelNode operation , InputStream ... inputStreams ) throws OperationFailedException { } @ Override public void executeForFailure ( ModelNode operation , InputStream ... inputStreams ) { } @ Override public String getPersistedSubsystemXml ( ) { } public void validateOperations ( List < ModelNode > operations ) { } @ Override public void validateOperation ( ModelNode operation ) { } @ Override public void shutdown ( ) { } @ Override public ImmutableManagementResourceRegistration getRootRegistration ( ) { } protected void addLegacyKernelService ( ModelVersion modelVersion , T legacyServices ) { } protected ModelNode internalExecute ( ModelNode operation , OperationStepHandler handler ) { } protected TransformationContext createTransformationContext ( TransformationTarget target ) { } protected TransformerRegistry getTransformersRegistry ( ) { } private class TestTransformationContext implements TransformationContext { private final TransformationTarget target ; private final Resource rootResource ; TestTransformationContext ( TransformationTarget target , Resource rootResource ) { } @ Override public TransformationTarget getTarget ( ) { } @ Override public ProcessType getProcessType ( ) { } @ Override public RunningMode getRunningMode ( ) { } @ Override public ImmutableManagementResourceRegistration getResourceRegistration ( final PathAddress address ) { } @ Override public ImmutableManagementResourceRegistration getResourceRegistrationFromRoot ( PathAddress address ) { } @ Override public Resource readResource ( final PathAddress address ) { } @ Override public Resource readResourceFromRoot ( final PathAddress address ) { } @ Override public ModelNode resolveExpressions ( ModelNode node ) throws OperationFailedException { } @ Override public TransformersLogger getLogger ( ) { <START_BUG> return new TransformersLogger ( getTarget ( ) ) ; <END_BUG> } @ Override public boolean doesTargetSupportIgnoredResources ( TransformationTarget target ) { } } }

Fix:
return TransformersLogger . getLogger ( getTarget ( ) ) ;