Buggy code:
public class ConnectionListener { int port ; HashMap < String , Class > commands = new HashMap ( ) ; public ConnectionListener ( int port , ContainerCommandFactory commandFactory ) { } public void run ( ) { try { System . out . println ( ( "Portnumber<seq2seq4repair_space>is<seq2seq4repair_space>" + ( port ) ) ) ; ServerSocket serverSocket = new ServerSocket ( port ) ; while ( true ) { Socket clientSocket = serverSocket . accept ( ) ; PrintWriter out = new PrintWriter ( clientSocket . getOutputStream ( ) , true ) ; BufferedReader in = new BufferedReader ( new InputStreamReader ( clientSocket . getInputStream ( ) ) ) ; System . out . println ( ( ( "Client<seq2seq4repair_space>connected<seq2seq4repair_space>from<seq2seq4repair_space>address<seq2seq4repair_space>" + ( clientSocket . getRemoteSocketAddress ( ) . toString ( ) ) ) + "!" ) ) ; if ( DockerD . isOnIPWhitelist ( clientSocket . getRemoteSocketAddress ( ) . toString ( ) ) ) { new Thread ( new ConnectionListener . UI ( out , in , clientSocket ) ) . start ( ) ; } else { out . println ( "Access<seq2seq4repair_space>denied!" ) ; closeClientSocket ( out , in , clientSocket ) ; } } } catch ( IOException ex ) { Logger . getLogger ( ConnectionListener . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } } private class UI implements Runnable { PrintWriter out ; BufferedReader in ; Socket clientSocket ; private UI ( PrintWriter out , BufferedReader in , Socket clientSocket ) { } @ Override public void run ( ) { try { while ( true ) { StringTokenizer message = new StringTokenizer ( in . readLine ( ) ) ; if ( message . hasMoreElements ( ) ) { String first = message . nextToken ( ) ; if ( commands . containsKey ( first ) ) { Container temp = ContainerCommandFactory . makeANewContainer ( commands . get ( first ) . getName ( ) ) ; temp . setReader ( in ) ; temp . setWriter ( out ) ; temp . run ( ) ; ContainerManager . storeContainer ( clientSocket . getRemoteSocketAddress ( ) . toString ( ) , temp . id , temp ) ; } else if ( first . equals ( "inspect" ) ) { if ( ( message . countTokens ( ) ) == 2 ) { ContainerCommander . getContainerFieldValue ( message . nextToken ( ) , message . nextToken ( ) , out ) ; } else if ( ( message . countTokens ( ) ) == 1 ) { ContainerCommander . inspect ( message . nextToken ( ) , out ) ; } else { out . println ( listCommands ( ) ) ; } } else if ( first . equals ( "exec" ) ) { if ( ( message . countTokens ( ) ) == 2 ) { ContainerCommander . exec ( message . nextToken ( ) , message . nextToken ( ) , out ) ; } else { out . println ( listCommands ( ) ) ; } } else if ( first . equals ( "list" ) ) { <START_BUG> ContainerCommander . list ( out ) ; <END_BUG> } else { out . println ( listCommands ( ) ) ; } } } } catch ( NullPointerException np ) { closeClientSocket ( out , in , clientSocket ) ; } catch ( IOException ex ) { System . err . println ( "U<seq2seq4repair_space>dun<seq2seq4repair_space>goofed<seq2seq4repair_space>sonny!<seq2seq4repair_space>(Really<seq2seq4repair_space>should<seq2seq4repair_space>get<seq2seq4repair_space>a<seq2seq4repair_space>better<seq2seq4repair_space>error<seq2seq4repair_space>message...)" ) ; System . err . println ( ex . getMessage ( ) ) ; } } private String listCommands ( ) { } } protected void closeClientSocket ( PrintWriter out , BufferedReader in , Socket clientSocket ) { } }

Fix:
ContainerCommander . list ( out , clientSocket . getRemoteSocketAddress ( ) . toString ( ) ) ;