Buggy code:
public class HornetQServerControlWriteHandler extends ServerWriteAttributeOperationHandler { public static final HornetQServerControlWriteHandler INSTANCE = new HornetQServerControlWriteHandler ( ) ; private final Map < String , AttributeDefinition > attributes = new HashMap < String , AttributeDefinition > ( ) ; private final Map < String , AttributeDefinition > runtimeAttributes = new HashMap < String , AttributeDefinition > ( ) ; private HornetQServerControlWriteHandler ( ) { } @ Override protected void validateValue ( String name , ModelNode value ) throws OperationFailedException { } @ Override protected void validateResolvedValue ( String name , ModelNode value ) throws OperationFailedException { } @ Override protected boolean applyUpdateToRuntime ( OperationContext context , ModelNode operation , String attributeName , ModelNode newValue , ModelNode currentValue ) throws OperationFailedException { AttributeDefinition attr = runtimeAttributes . get ( attributeName ) ; if ( attr != null ) { ServiceRegistry registry = context . getServiceRegistry ( true ) ; ServiceController < ? > hqService = registry . getService ( JBOSS_MESSAGING ) ; if ( ( hqService != null ) && ( ( hqService . getState ( ) ) == ( State . UP ) ) ) { HornetQServerControl serverControl = HornetQServer . class . cast ( hqService . getValue ( ) ) . getHornetQServerControl ( ) ; try { if ( attributeName . equals ( FAILOVER_ON_SHUTDOWN . getName ( ) ) ) { serverControl . setFailoverOnServerShutdown ( newValue . resolve ( ) . asBoolean ( ) ) ; } else if ( attributeName . equals ( MESSAGE_COUNTER_SAMPLE_PERIOD . getName ( ) ) ) { serverControl . setMessageCounterSamplePeriod ( newValue . resolve ( ) . asLong ( ) ) ; } else if ( attributeName . equals ( MESSAGE_COUNTER_MAX_DAY_HISTORY . getName ( ) ) ) { serverControl . setMessageCounterMaxDayCount ( newValue . resolve ( ) . asInt ( ) ) ; } else if ( attributeName . equals ( MESSAGE_COUNTER_ENABLED . getName ( ) ) ) { boolean enabled = newValue . resolve ( ) . asBoolean ( ) ; if ( enabled ) { serverControl . enableMessageCounters ( ) ; } else { serverControl . disableMessageCounters ( ) ; } } else { throw new UnsupportedOperationException ( String . format ( "Runtime<seq2seq4repair_space>handling<seq2seq4repair_space>for<seq2seq4repair_space>%s<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>implemented" , attributeName ) ) ; } } catch ( RuntimeException e ) { throw e ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } return false ; } else { <START_BUG> throw new IllegalStateException ( String . format ( "Cannot<seq2seq4repair_space>apply<seq2seq4repair_space>attribue<seq2seq4repair_space>%s<seq2seq4repair_space>ti<seq2seq4repair_space>runtime;<seq2seq4repair_space>service<seq2seq4repair_space>%s<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>in<seq2seq4repair_space>state<seq2seq4repair_space>%s,<seq2seq4repair_space>it<seq2seq4repair_space>is<seq2seq4repair_space>in<seq2seq4repair_space>state<seq2seq4repair_space>%s" , attributeName , JBOSS_MESSAGING , UP , hqService . getState ( ) ) ) ; <END_BUG> } } else { return true ; } } }

Fix:
throw new IllegalStateException ( String . format ( "Cannot<seq2seq4repair_space>apply<seq2seq4repair_space>attribute<seq2seq4repair_space>%s<seq2seq4repair_space>to<seq2seq4repair_space>runtime;<seq2seq4repair_space>service<seq2seq4repair_space>%s<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>in<seq2seq4repair_space>state<seq2seq4repair_space>%s,<seq2seq4repair_space>it<seq2seq4repair_space>is<seq2seq4repair_space>in<seq2seq4repair_space>state<seq2seq4repair_space>%s" , attributeName , JBOSS_MESSAGING , UP , hqService . getState ( ) ) ) ;