Buggy code:
public class DeployHandler extends CommandHandlerWithHelp { public DeployHandler ( ) { } @ Override protected void handle ( CommandContext ctx , String args ) { ModelControllerClient client = ctx . getModelControllerClient ( ) ; if ( client == null ) { ctx . printLine ( "The<seq2seq4repair_space>controller<seq2seq4repair_space>client<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>available.<seq2seq4repair_space>Make<seq2seq4repair_space>sure<seq2seq4repair_space>you<seq2seq4repair_space>are<seq2seq4repair_space>connected<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>controller." ) ; return ; } if ( args == null ) { <START_BUG> ctx . printLine ( "File<seq2seq4repair_space>path<seq2seq4repair_space>is<seq2seq4repair_space>missing." ) ; <END_BUG> return ; } boolean force = false ; String filePath = null ; String name = null ; String runtimeName = null ; String [ ] arr = args . split ( "\\s+" ) ; for ( int i = 0 ; i < ( arr . length ) ; ++ i ) { String arg = arr [ i ] ; if ( "-f" . equals ( arg ) ) { force = true ; } else if ( filePath == null ) { filePath = arg ; } else if ( name == null ) { name = arg ; } else { runtimeName = arg ; } } if ( filePath == null ) { ctx . printLine ( "File<seq2seq4repair_space>path<seq2seq4repair_space>is<seq2seq4repair_space>missing." ) ; return ; } File f = new File ( filePath ) ; if ( ! ( f . exists ( ) ) ) { ctx . printLine ( ( "The<seq2seq4repair_space>path<seq2seq4repair_space>doesn't<seq2seq4repair_space>exist:<seq2seq4repair_space>" + ( f . getAbsolutePath ( ) ) ) ) ; return ; } if ( name == null ) { name = f . getName ( ) ; } if ( Util . isDeployed ( name , ctx . getModelControllerClient ( ) ) ) { if ( force ) { DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder ( ) ; ModelNode result ; builder = new DefaultOperationRequestBuilder ( ) ; builder . setOperationName ( "full-replace-deployment" ) ; builder . addProperty ( "name" , name ) ; if ( runtimeName != null ) { builder . addProperty ( "runtime-name" , runtimeName ) ; } FileInputStream is = null ; try { is = new FileInputStream ( f ) ; ModelNode request = builder . buildRequest ( ) ; OperationBuilder op = Factory . create ( request ) ; op . addInputStream ( is ) ; request . get ( "input-stream-index" ) . set ( 0 ) ; result = client . execute ( op . build ( ) ) ; } catch ( Exception e ) { ctx . printLine ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>replace<seq2seq4repair_space>the<seq2seq4repair_space>deployment:<seq2seq4repair_space>" + ( e . getLocalizedMessage ( ) ) ) ) ; return ; } finally { StreamUtils . safeClose ( is ) ; } if ( ! ( Util . isSuccess ( result ) ) ) { ctx . printLine ( Util . getFailureDescription ( result ) ) ; return ; } ctx . printLine ( ( ( "'" + name ) + "'<seq2seq4repair_space>re-deployed<seq2seq4repair_space>successfully." ) ) ; } else { ctx . printLine ( ( ( "'" + name ) + "'<seq2seq4repair_space>is<seq2seq4repair_space>already<seq2seq4repair_space>deployed<seq2seq4repair_space>(use<seq2seq4repair_space>-f<seq2seq4repair_space>to<seq2seq4repair_space>force<seq2seq4repair_space>re-deploy)." ) ) ; } return ; } else { DefaultOperationRequestBuilder builder = new DefaultOperationRequestBuilder ( ) ; ModelNode result ; builder = new DefaultOperationRequestBuilder ( ) ; builder . setOperationName ( "add" ) ; builder . addNode ( "deployment" , name ) ; if ( runtimeName != null ) { builder . addProperty ( "runtime-name" , runtimeName ) ; } FileInputStream is = null ; try { is = new FileInputStream ( f ) ; ModelNode request = builder . buildRequest ( ) ; OperationBuilder op = Factory . create ( request ) ; op . addInputStream ( is ) ; request . get ( "input-stream-index" ) . set ( 0 ) ; result = client . execute ( op . build ( ) ) ; } catch ( Exception e ) { ctx . printLine ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>add<seq2seq4repair_space>the<seq2seq4repair_space>deployment<seq2seq4repair_space>content<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>repository:<seq2seq4repair_space>" + ( e . getLocalizedMessage ( ) ) ) ) ; return ; } finally { StreamUtils . safeClose ( is ) ; } if ( ! ( Util . isSuccess ( result ) ) ) { ctx . printLine ( Util . getFailureDescription ( result ) ) ; return ; } builder = new DefaultOperationRequestBuilder ( ) ; builder . setOperationName ( "deploy" ) ; builder . addNode ( "deployment" , name ) ; try { ModelNode request = builder . buildRequest ( ) ; result = client . execute ( request ) ; } catch ( Exception e ) { ctx . printLine ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>deploy:<seq2seq4repair_space>" + ( e . getLocalizedMessage ( ) ) ) ) ; return ; } if ( ! ( Util . isSuccess ( result ) ) ) { ctx . printLine ( Util . getFailureDescription ( result ) ) ; return ; } ctx . printLine ( ( ( "'" + name ) + "'<seq2seq4repair_space>deployed<seq2seq4repair_space>successfully." ) ) ; } } }

Fix:
ctx . printColumns ( Util . getDeployments ( client ) ) ;