Buggy code:
@ SuppressWarnings ( "serial" ) public class RayoServlet extends AbstractRayoServlet { private static final Loggerf log = Loggerf . getLogger ( RayoServlet . class ) ; public static final int BROADCAST_RETRIES = 5 ; public static final int BROADCAST_RETRY_DELAY = 30000 ; private JIDRegistry jidRegistry ; private XmlProvider provider ; private CallManager callManager ; private CallRegistry callRegistry ; private MixerRegistry mixerRegistry ; private RayoStatistics rayoStatistics ; private CdrManager cdrManager ; private FilterChain filtersChain ; private int broadcastRetries = RayoServlet . BROADCAST_RETRIES ; private int broadcastRetryDelay = RayoServlet . BROADCAST_RETRY_DELAY ; private XmppMessageListenerGroup xmppMessageListenersGroup ; @ Override public void init ( ServletConfig config ) throws ServletException { } @ Override public void onPropertyChanged ( String property , String newValue ) { } @ Override public void onQuiesceModeEntered ( ) { } @ Override public void onQuiesceModeExited ( ) { } @ Override public void onShutdown ( ) { } private void broadcastPresence ( final String status ) { } private void appendNodeInfoElement ( CoreDocumentImpl document , Element nodeInfoElement , String name , String value ) { } @ Override public void start ( ) { } private void doPresenceBroadcast ( final String status ) { RayoAdminService adminService = ( ( RayoAdminService ) ( getAdminService ( ) ) ) ; String gatewayDomain = adminService . getGatewayDomain ( ) ; if ( ( adminService . getGatewayDomain ( ) ) != null ) { int retries = 0 ; do { PresenceMessage presence = null ; try { if ( status . equalsIgnoreCase ( "unavailable" ) ) { presence = getXmppFactory ( ) . createPresence ( getLocalDomain ( ) , gatewayDomain , "unavailable" , ( ( Element ) ( null ) ) ) ; } else { CoreDocumentImpl document = new CoreDocumentImpl ( false ) ; Element showElement = document . createElement ( "show" ) ; showElement . setTextContent ( status . toLowerCase ( ) ) ; Element nodeInfoElement = document . createElementNS ( "urn:xmpp:rayo:cluster:1" , "node-info" ) ; appendNodeInfoElement ( document , nodeInfoElement , "platform" , adminService . getPlatform ( ) ) ; appendNodeInfoElement ( document , nodeInfoElement , "weight" , adminService . getWeight ( ) ) ; appendNodeInfoElement ( document , nodeInfoElement , "priority" , adminService . getPriority ( ) ) ; presence = getXmppFactory ( ) . createPresence ( getLocalDomain ( ) , gatewayDomain , null , showElement , nodeInfoElement ) ; } presence . send ( ) ; <START_BUG> continue ; <END_BUG> } catch ( Exception e ) { RayoServlet . log . error ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>broadcast<seq2seq4repair_space>presence<seq2seq4repair_space>to<seq2seq4repair_space>gateway<seq2seq4repair_space>[%s]" , gatewayDomain , e ) ; try { Thread . sleep ( broadcastRetryDelay ) ; } catch ( InterruptedException e1 ) { } retries ++ ; } } while ( retries < ( broadcastRetries ) ) ; } } public void event ( CallEvent event ) throws IOException { } @ Override protected void doMessage ( InstantMessage message ) throws IOException , ServletException { } @ SuppressWarnings ( "rawtypes" ) @ Override protected void doPresence ( PresenceMessage presence ) throws IOException , ServletException { } @ Override protected void processIQRequest ( final IQRequest request , DOMElement payload ) { } @ Override protected void sendIqError ( IQRequest request , IQResponse response ) throws IOException { } private void generateErrorCdr ( IQRequest request , IQResponse response ) throws IOException { } private void storeCdr ( String callId , Element result ) throws IOException { } @ Override protected IQResponse sendIqResult ( IQRequest request , Element result ) throws IOException { } private void fail ( String callId ) { } @ SuppressWarnings ( "unchecked" ) private CallActor < Call > findCallActor ( String callId ) throws NotFoundException { } private AbstractActor < ? > findActor ( String id ) throws NotFoundException { } private String callId ( JID jid ) { } public XmlProvider getProvider ( ) { } public void setProvider ( XmlProvider provider ) { } public CallManager getCallManager ( ) { } public void setCallManager ( CallManager callManager ) { } public CallRegistry getCallRegistry ( ) { } public void setCallRegistry ( CallRegistry callRegistry ) { } public MixerRegistry getMixerRegistry ( ) { } public void setMixerRegistry ( MixerRegistry mixerRegistry ) { } public void setRayoStatistics ( RayoStatistics rayoStatistics ) { } public void setCdrManager ( CdrManager cdrManager ) { } public void setJidRegistry ( JIDRegistry jidRegistry ) { } public void setFiltersChain ( FilterChain filtersChain ) { } public void setXmppMessageListenersGroup ( XmppMessageListenerGroup xmppMessageListenersGroup ) { } @ Override protected Loggerf getLog ( ) { } public void setBroadcastRetries ( int broadcastRetries ) { } public void setBroadcastRetryDelay ( int broadcastRetryDelay ) { } }

Fix:
break ;