The first time the Multiplayer menu is loaded, one of the listed servers will almost always fail to ping, saying "Can't connect to server". However, upon pressing the Refresh button, it works just fine. This is an issue for servers because potential users will assume the server is down when it isn't.
I've analyzed the issue and found it's a race condition with the multi-threaded server pinger code. The server pinging code (net.minecraft.client.network.ServerPinger) is run in multiple threads, and each thread calls net.minecraft.network.NetworkManager.createNetworkManagerAndConnect(). This function uses "lazy loaders" (net.minecraft.util.LazyLoadBase) to initialize some static variables. The issue lies in net.minecraft.util.LazyLoadBase.getValue(). This function is not thread-safe. Below you'll find the code in question with comments explaining exactly what is happening and how to fix it.
Note that depending on the speed of the computer, this bug might not occur. If the first thread finishes quickly enough everything will appear normal.