class PortTool {
    public static int port = 0;

    public static Integer getPort() {<FILL_FUNCTION_BODY>}
}

        if (port == 0) {
            ServerSocket serverSocket;
            try {
                serverSocket = new ServerSocket(0);
                port = serverSocket.getLocalPort();
                serverSocket.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return port;
    
<no_super_class>