Buggy code:
public class EndIfHandler extends CommandHandlerWithHelp { public EndIfHandler ( ) { } @ Override public boolean isAvailable ( CommandContext ctx ) { } @ Override protected void doHandle ( CommandContext ctx ) throws CommandLineException { final IfElseBlock ifBlock = IfElseBlock . remove ( ctx ) ; final BatchManager batchManager = ctx . getBatchManager ( ) ; if ( ! ( batchManager . isBatchActive ( ) ) ) { if ( ifBlock . isInIf ( ) ) { throw new CommandLineException ( "if<seq2seq4repair_space>block<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>activate<seq2seq4repair_space>batch<seq2seq4repair_space>mode." ) ; } else { throw new CommandLineException ( "else<seq2seq4repair_space>block<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>activate<seq2seq4repair_space>batch<seq2seq4repair_space>mode." ) ; } } final Batch batch = batchManager . getActiveBatch ( ) ; batchManager . discardActiveBatch ( ) ; final ModelControllerClient client = ctx . getModelControllerClient ( ) ; if ( client == null ) { throw new CommandLineException ( "The<seq2seq4repair_space>connection<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>controller<seq2seq4repair_space>has<seq2seq4repair_space>not<seq2seq4repair_space>been<seq2seq4repair_space>established." ) ; } final ModelNode conditionRequest = ifBlock . getConditionRequest ( ) ; if ( conditionRequest == null ) { throw new CommandLineException ( "The<seq2seq4repair_space>condition<seq2seq4repair_space>request<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>available." ) ; } final Operation expression = ifBlock . getConditionExpression ( ) ; if ( expression == null ) { throw new CommandLineException ( "The<seq2seq4repair_space>if<seq2seq4repair_space>expression<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>available." ) ; } ModelNode targetValue ; try { targetValue = client . execute ( conditionRequest ) ; } catch ( IOException e ) { throw new CommandLineException ( "condition<seq2seq4repair_space>request<seq2seq4repair_space>failed" , e ) ; } final Object value = expression . resolveValue ( ctx , targetValue ) ; if ( value == null ) { throw new CommandLineException ( "if<seq2seq4repair_space>expression<seq2seq4repair_space>resolved<seq2seq4repair_space>to<seq2seq4repair_space>a<seq2seq4repair_space>null" ) ; } if ( Boolean . TRUE . equals ( value ) ) { ModelNode ifRequest = ifBlock . getIfRequest ( ) ; if ( ifRequest == null ) { if ( ( batch . size ( ) ) == 0 ) { throw new CommandLineException ( "if<seq2seq4repair_space>request<seq2seq4repair_space>is<seq2seq4repair_space>missing." ) ; } ifRequest = batch . toRequest ( ) ; } try { final ModelNode response = client . execute ( ifRequest ) ; if ( ! ( Util . isSuccess ( response ) ) ) { <START_BUG> new CommandLineException ( ( "if<seq2seq4repair_space>request<seq2seq4repair_space>failed:<seq2seq4repair_space>" + ( Util . getFailureDescription ( response ) ) ) ) ; <END_BUG> } } catch ( IOException e ) { throw new CommandLineException ( "if<seq2seq4repair_space>request<seq2seq4repair_space>failed" , e ) ; } } else if ( ifBlock . isInElse ( ) ) { if ( ( batch . size ( ) ) == 0 ) { throw new CommandLineException ( "else<seq2seq4repair_space>block<seq2seq4repair_space>is<seq2seq4repair_space>empty." ) ; } try { final ModelNode response = client . execute ( batch . toRequest ( ) ) ; if ( ! ( Util . isSuccess ( response ) ) ) { throw new CommandLineException ( ( "else<seq2seq4repair_space>request<seq2seq4repair_space>failed:<seq2seq4repair_space>" + ( Util . getFailureDescription ( response ) ) ) ) ; } } catch ( IOException e ) { throw new CommandLineException ( "else<seq2seq4repair_space>request<seq2seq4repair_space>failed" , e ) ; } } } }

Fix:
throw new CommandLineException ( ( "if<seq2seq4repair_space>request<seq2seq4repair_space>failed:<seq2seq4repair_space>" + ( Util . getFailureDescription ( response ) ) ) ) ;