Buggy code:
public final class JVMHandlers { public static final DescriptionProvider SERVER_MODEL_PROVIDER = new DescriptionProvider ( ) { @ Override public ModelNode getModelDescription ( Locale locale ) { } } ; public static final String JVM_AGENT_LIB = "agent-lib" ; public static final String JVM_AGENT_PATH = "agent-path" ; public static final String JVM_DEBUG_ENABLED = "debug-enabled" ; public static final String JVM_DEBUG_OPTIONS = "debug-options" ; public static final String JVM_ENV_CLASSPATH_IGNORED = "env-classpath-ignored" ; public static final String JVM_ENV_VARIABLES = "environment-variables" ; public static final String JVM_HEAP = "heap-size" ; public static final String JVM_MAX_HEAP = "max-heap-size" ; public static final String JVM_JAVA_AGENT = "java-agent" ; public static final String JVM_JAVA_HOME = "java-home" ; public static final String JVM_OPTIONS = "jvm-options" ; public static final String JVM_OPTION = "jvm-option" ; public static final String ADD_JVM_OPTION = "add-jvm-option" ; public static final String JVM_PERMGEN = "permgen-size" ; public static final String JVM_MAX_PERMGEN = "max-permgen-size" ; public static final String JVM_STACK = "stack-size" ; public static final String SIZE = "size" ; public static final String MAX_SIZE = "max-size" ; static final String [ ] ATTRIBUTES = new String [ ] { JVMHandlers . JVM_AGENT_LIB , JVMHandlers . JVM_AGENT_PATH , JVMHandlers . JVM_ENV_CLASSPATH_IGNORED , JVMHandlers . JVM_ENV_VARIABLES , JVMHandlers . JVM_HEAP , JVMHandlers . JVM_MAX_HEAP , JVMHandlers . JVM_JAVA_AGENT , JVMHandlers . JVM_JAVA_HOME , JVMHandlers . JVM_OPTIONS , JVMHandlers . JVM_PERMGEN , JVMHandlers . JVM_MAX_PERMGEN , JVMHandlers . JVM_STACK } ; static final String [ ] SERVER_ATTRIBUTES = new String [ ] { JVMHandlers . JVM_DEBUG_ENABLED , JVMHandlers . JVM_DEBUG_OPTIONS } ; private static final OperationStepHandler writeHandler = WriteAttributeOperationHandler . INSTANCE ; private static final OperationStepHandler booleanWriteHandler = new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) { } } ; public static void register ( final ManagementResourceRegistration registration ) { } public static void register ( final ManagementResourceRegistration registration , final boolean server ) { registration . registerOperationHandler ( OPERATION_NAME , INSTANCE , INSTANCE , false ) ; registration . registerOperationHandler ( JVMRemoveHandler . OPERATION_NAME , JVMRemoveHandler . INSTANCE , JVMRemoveHandler . INSTANCE , false ) ; registration . registerReadWriteAttribute ( JVMHandlers . JVM_AGENT_LIB , null , JVMHandlers . writeHandler , CONFIGURATION ) ; registration . registerReadWriteAttribute ( JVMHandlers . JVM_AGENT_PATH , null , JVMHandlers . writeHandler , CONFIGURATION ) ; if ( server ) { registration . registerReadWriteAttribute ( JVMHandlers . JVM_DEBUG_ENABLED , null , JVMHandlers . booleanWriteHandler , CONFIGURATION ) ; <START_BUG> registration . registerReadWriteAttribute ( JVMHandlers . JVM_DEBUG_OPTIONS , null , JVMHandlers . booleanWriteHandler , CONFIGURATION ) ; <END_BUG> } registration . registerReadWriteAttribute ( JVMHandlers . JVM_ENV_CLASSPATH_IGNORED , null , JVMHandlers . booleanWriteHandler , CONFIGURATION ) ; registration . registerReadWriteAttribute ( JVMHandlers . JVM_ENV_VARIABLES , null , JVMHandlers . writeHandler , CONFIGURATION ) ; registration . registerReadWriteAttribute ( JVMHandlers . JVM_HEAP , null , JVMHandlers . writeHandler , CONFIGURATION ) ; registration . registerReadWriteAttribute ( JVMHandlers . JVM_MAX_HEAP , null , JVMHandlers . writeHandler , CONFIGURATION ) ; registration . registerReadWriteAttribute ( JVMHandlers . JVM_JAVA_AGENT , null , JVMHandlers . writeHandler , CONFIGURATION ) ; registration . registerReadWriteAttribute ( JVMHandlers . JVM_JAVA_HOME , null , JVMHandlers . writeHandler , CONFIGURATION ) ; registration . registerReadWriteAttribute ( JVMHandlers . JVM_PERMGEN , null , JVMHandlers . writeHandler , CONFIGURATION ) ; registration . registerReadWriteAttribute ( JVMHandlers . JVM_MAX_PERMGEN , null , JVMHandlers . writeHandler , CONFIGURATION ) ; registration . registerReadWriteAttribute ( JVMHandlers . JVM_STACK , null , JVMHandlers . writeHandler , CONFIGURATION ) ; registration . registerOperationHandler ( JVMHandlers . JVMOptionAddHandler . OPERATION_NAME , JVMHandlers . JVMOptionAddHandler . INSTANCE , JVMHandlers . JVMOptionAddHandler . INSTANCE , false ) ; registration . registerOperationHandler ( JVMHandlers . JVMOptionRemoveHandler . OPERATION_NAME , JVMHandlers . JVMOptionRemoveHandler . INSTANCE , JVMHandlers . JVMOptionRemoveHandler . INSTANCE , false ) ; } private JVMHandlers ( ) { } static final class JVMOptionAddHandler implements OperationStepHandler , DescriptionProvider { static final String OPERATION_NAME = JVMHandlers . ADD_JVM_OPTION ; static final JVMHandlers . JVMOptionAddHandler INSTANCE = new JVMHandlers . JVMOptionAddHandler ( ) ; private final ParameterValidator validator = new StringLengthValidator ( 1 ) ; @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } @ Override public ModelNode getModelDescription ( Locale locale ) { } } static final class JVMOptionRemoveHandler implements OperationStepHandler , DescriptionProvider { static final String OPERATION_NAME = "remove-jvm-option" ; static final JVMHandlers . JVMOptionRemoveHandler INSTANCE = new JVMHandlers . JVMOptionRemoveHandler ( ) ; private final ParameterValidator validator = new StringLengthValidator ( 1 ) ; @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } @ Override public ModelNode getModelDescription ( Locale locale ) { } } }

Fix:
registration . registerReadWriteAttribute ( JVMHandlers . JVM_DEBUG_OPTIONS , null , JVMHandlers . writeHandler , CONFIGURATION ) ;