Buggy code:
public class ProtocolStackAdd extends AbstractAddStepHandler implements DescriptionProvider { static ModelNode createOperation ( ModelNode address , ModelNode existing ) { } private static void populate ( ModelNode source , ModelNode target ) { } @ Override public ModelNode getModelDescription ( Locale locale ) { } protected void populateModel ( ModelNode operation , ModelNode model ) { } protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) { } private void build ( ServiceBuilder < ChannelFactory > builder , ModelNode protocol , ProtocolStackAdd . Protocol protocolConfig ) { } private void addSocketBindingDependency ( ServiceBuilder < ChannelFactory > builder , ModelNode model , String key , Injector < SocketBinding > injector ) { } private void addExecutorDependency ( ServiceBuilder < ChannelFactory > builder , ModelNode model , String key , Injector < Executor > injector ) { } protected boolean requiresRuntimeVerification ( ) { } static class ProtocolStack implements ProtocolStackConfiguration { private final InjectedValue < ProtocolDefaults > defaults = new InjectedValue < ProtocolDefaults > ( ) ; private final InjectedValue < MBeanServer > mbeanServer = new InjectedValue < MBeanServer > ( ) ; private final String name ; private final TransportConfiguration transport ; private final List < ProtocolConfiguration > protocols = new LinkedList < ProtocolConfiguration > ( ) ; ProtocolStack ( String name , TransportConfiguration transport ) { } Injector < ProtocolDefaults > getDefaultsInjector ( ) { } Injector < MBeanServer > getMBeanServerInjector ( ) { } @ Override public TransportConfiguration getTransport ( ) { } @ Override public List < ProtocolConfiguration > getProtocols ( ) { } @ Override public String getName ( ) { } @ Override public ProtocolDefaults getDefaults ( ) { } @ Override public MBeanServer getMBeanServer ( ) { } } static class Transport extends ProtocolStackAdd . Protocol implements TransportConfiguration { private final InjectedValue < SocketBinding > diagnosticsSocketBinding = new InjectedValue < SocketBinding > ( ) ; private final InjectedValue < Executor > defaultExecutor = new InjectedValue < Executor > ( ) ; private final InjectedValue < Executor > oobExecutor = new InjectedValue < Executor > ( ) ; private final InjectedValue < ScheduledExecutorService > timerExecutor = new InjectedValue < ScheduledExecutorService > ( ) ; private final InjectedValue < ThreadFactory > threadFactory = new InjectedValue < ThreadFactory > ( ) ; private boolean shared = true ; Transport ( String name ) { } Injector < SocketBinding > getDiagnosticsSocketBindingInjector ( ) { } Injector < Executor > getDefaultExecutorInjector ( ) { } Injector < Executor > getOOBExecutorInjector ( ) { } Injector < ScheduledExecutorService > getTimerExecutorInjector ( ) { } Injector < ThreadFactory > getThreadFactoryInjector ( ) { } void setShared ( boolean shared ) { } @ Override public boolean isShared ( ) { } @ Override public SocketBinding getDiagnosticsSocketBinding ( ) { } @ Override public ExecutorService getDefaultExecutor ( ) { } @ Override public ExecutorService getOOBExecutor ( ) { } @ Override public ScheduledExecutorService getTimerExecutor ( ) { } @ Override public ThreadFactory getThreadFactory ( ) { } } static class Protocol implements ProtocolConfiguration { private final String name ; private final InjectedValue < SocketBinding > socketBinding = new InjectedValue < SocketBinding > ( ) ; private final Map < String , String > properties = new HashMap < String , String > ( ) ; private final Class < ? > protocolClass ; Protocol ( String name ) { } @ Override public String getName ( ) { } @ Override public boolean hasProperty ( String property ) { } private static Field getField ( Class < ? > targetClass , String property ) { try { return targetClass . getDeclaredField ( property ) ; } catch ( NoSuchFieldException e ) { Class < ? > superClass = targetClass . getSuperclass ( ) ; <START_BUG> return ( superClass != null ) && ( superClass . isAssignableFrom ( org . jgroups . stack . Protocol . class ) ) ? ProtocolStackAdd . Protocol . getField ( superClass , property ) : null ; <END_BUG> } } @ Override public Map < String , String > getProperties ( ) { } Injector < SocketBinding > getSocketBindingInjector ( ) { } @ Override public SocketBinding getSocketBinding ( ) { } } }

Fix:
return ( superClass != null ) && ( org . jgroups . stack . Protocol . class . isAssignableFrom ( superClass ) ) ? ProtocolStackAdd . Protocol . getField ( superClass , property ) : null ;