void () { doTest(""" class Main654 { private volatile int myListenPort = -1; private void ensureListening() { if (myListenPort < 0) { synchronized (this) { if (myListenPort < 0) { myListenPort = startListening(); } } } } private int startListening() { return 0; } }"""); }