Buggy code:
} else { value = arg . substring ( 11 ) ; } String portStr = null ; int colonIndex = value . indexOf ( ':' ) ; if ( colonIndex < 0 ) { defaultControllerHost = value ; } else if ( colonIndex == 0 ) { portStr = value . substring ( 1 ) ; } else { defaultControllerHost = value . substring ( 0 , colonIndex ) ; portStr = value . substring ( ( colonIndex + 1 ) ) ; } if ( portStr != null ) { int port = - 1 ; try { port = Integer . parseInt ( portStr ) ; if ( port < 0 ) { argError = ( "The<seq2seq4repair_space>port<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>non-negative<seq2seq4repair_space>integer:<seq2seq4repair_space>'" + args ) + "'" ; } else { defaultControllerPort = port ; } } catch ( NumberFormatException e ) { argError = ( "The<seq2seq4repair_space>port<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>valid<seq2seq4repair_space>non-negative<seq2seq4repair_space>integer:<seq2seq4repair_space>'" + arg ) + "'" ; } } } else if ( ( "--connect" . equals ( arg ) ) || ( "-c" . equals ( arg ) ) ) { connect = true ; } else if ( "--version" . equals ( arg ) ) { version = true ; } else if ( "--gui" . equals ( arg ) ) { gui = true ; } else if ( ( arg . startsWith ( "--file=" ) ) || ( arg . startsWith ( "file=" ) ) ) { if ( file != null ) { argError = "Duplicate<seq2seq4repair_space>argument<seq2seq4repair_space>'--file'." ; break ; } if ( commands != null ) { argError = "Only<seq2seq4repair_space>one<seq2seq4repair_space>of<seq2seq4repair_space>'--file',<seq2seq4repair_space>'--commands'<seq2seq4repair_space>or<seq2seq4repair_space>'--command'<seq2seq4repair_space>can<seq2seq4repair_space>appear<seq2seq4repair_space>as<seq2seq4repair_space>the<seq2seq4repair_space>argument<seq2seq4repair_space>at<seq2seq4repair_space>a<seq2seq4repair_space>time." ; break ; } final String fileName = ( arg . startsWith ( "--" ) ) ? arg . substring ( 7 ) : arg . substring ( 5 ) ; if ( ! ( fileName . isEmpty ( ) ) ) { file = new File ( fileName ) ; if ( ! ( file . exists ( ) ) ) { argError = ( "File<seq2seq4repair_space>" + ( file . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>doesn't<seq2seq4repair_space>exist." ; break ; } } else { argError = "Argument<seq2seq4repair_space>'--file'<seq2seq4repair_space>is<seq2seq4repair_space>missing<seq2seq4repair_space>value." ; break ; } } else if ( ( arg . startsWith ( "--commands=" ) ) || ( arg . startsWith ( "commands=" ) ) ) { if ( file != null ) { argError = "Only<seq2seq4repair_space>one<seq2seq4repair_space>of<seq2seq4repair_space>'--file',<seq2seq4repair_space>'--commands'<seq2seq4repair_space>or<seq2seq4repair_space>'--command'<seq2seq4repair_space>can<seq2seq4repair_space>appear<seq2seq4repair_space>as<seq2seq4repair_space>the<seq2seq4repair_space>argument<seq2seq4repair_space>at<seq2seq4repair_space>a<seq2seq4repair_space>time." ; break ; } if ( commands != null ) { argError = "Duplicate<seq2seq4repair_space>argument<seq2seq4repair_space>'--command'//'--commands'." ; break ; } final String value = ( arg . startsWith ( "--" ) ) ? arg . substring ( 11 ) : arg . substring ( 9 ) ; commands = value . split ( ",+" ) ; } else if ( ( arg . startsWith ( "--command=" ) ) || ( arg . startsWith ( "command=" ) ) ) { if ( file != null ) { argError = "Only<seq2seq4repair_space>one<seq2seq4repair_space>of<seq2seq4repair_space>'--file',<seq2seq4repair_space>'--commands'<seq2seq4repair_space>or<seq2seq4repair_space>'--command'<seq2seq4repair_space>can<seq2seq4repair_space>appear<seq2seq4repair_space>as<seq2seq4repair_space>the<seq2seq4repair_space>argument<seq2seq4repair_space>at<seq2seq4repair_space>a<seq2seq4repair_space>time." ; break ; } if ( commands != null ) { argError = "Duplicate<seq2seq4repair_space>argument<seq2seq4repair_space>'--command'//'--commands'." ; break ; } final String value = ( arg . startsWith ( "--" ) ) ? arg . substring ( 10 ) : arg . substring ( 8 ) ; commands = new String [ ] { value } ; } else if ( arg . startsWith ( "--user=" ) ) { username = ( arg . startsWith ( "--" ) ) ? arg . substring ( 7 ) : arg . substring ( 5 ) ; } else if ( arg . startsWith ( "--password=" ) ) { password = ( arg . startsWith ( "--" ) ? arg . substring ( 11 ) : arg . substring ( 9 ) ) . toCharArray ( ) ; } else if ( ( arg . equals ( "--help" ) ) || ( arg . equals ( "-h" ) ) ) { commands = new String [ ] { "help" } ; } else { if ( file != null ) { argError = "Only<seq2seq4repair_space>one<seq2seq4repair_space>of<seq2seq4repair_space>'--file',<seq2seq4repair_space>'--commands'<seq2seq4repair_space>or<seq2seq4repair_space>'--command'<seq2seq4repair_space>can<seq2seq4repair_space>appear<seq2seq4repair_space>as<seq2seq4repair_space>the<seq2seq4repair_space>argument<seq2seq4repair_space>at<seq2seq4repair_space>a<seq2seq4repair_space>time." ; break ; } if ( commands != null ) { argError = "Duplicate<seq2seq4repair_space>argument<seq2seq4repair_space>'--command'//'--commands'." ; break ; } commands = arg . split ( ",+" ) ; } } if ( argError != null ) { System . err . println ( argError ) ; exitCode = 1 ; return ; } if ( version ) { cmdCtx = new CommandContextImpl ( ) ; INSTANCE . handle ( cmdCtx ) ; return ; } if ( file != null ) { cmdCtx = CliLauncher . initCommandContext ( defaultControllerHost , defaultControllerPort , username , password , false , connect ) ; CliLauncher . processFile ( file , cmdCtx ) ; return ; } if ( commands != null ) { cmdCtx = CliLauncher . initCommandContext ( defaultControllerHost , defaultControllerPort , username , password , false , connect ) ; CliLauncher . processCommands ( commands , cmdCtx ) ; return ; } if ( gui ) { <START_BUG> cmdCtx = CliLauncher . initCommandContext ( defaultControllerHost , defaultControllerPort , username , password , false , connect ) ; <END_BUG> CliLauncher . processGui ( cmdCtx ) ; return ; } cmdCtx = new CommandContextImpl ( defaultControllerHost , defaultControllerPort , username , password , true ) ; cmdCtx . interact ( connect ) ; } catch ( Throwable t ) { t . printStackTrace ( ) ; } finally { if ( cmdCtx != null ) { exitCode = cmdCtx . getExitCode ( ) ; } if ( ! gui ) { System . exit ( exitCode ) ; } } System . exit ( exitCode ) ; } private static CommandContextImpl initCommandContext ( String defaultHost , int defaultPort , String username , char [ ] password , boolean initConsole , boolean connect ) throws CliInitializationException { } private static void processGui ( final CommandContextImpl cmdCtx ) { } private static void processCommands ( String [ ] commands , CommandContextImpl cmdCtx ) { } private static void processFile ( File file , final CommandContextImpl cmdCtx ) { } }

Fix:
cmdCtx = CliLauncher . initCommandContext ( defaultControllerHost , defaultControllerPort , username , password , false , true ) ;