Buggy code:
@ SuppressWarnings ( "restriction" ) public class ZorbaDebuggerEngine extends DbgpTermination implements IDebuggerEngine { public static final int STEP_INTO = 1 ; public static final int STEP_OVER = 2 ; public static final int STEP_RETURN = 3 ; private boolean fTerminated = false ; private boolean fSuspended = false ; private SocketClientConnection fRequestConnection ; private SocketServerConnection fEventConnection ; private MessageReader fReplyReader ; private MessageReader fEventReader ; private ZorbaDebuggerEngine . EventListener fEventListener ; private LinkedList < AbstractMessage > fReceivedEvents = new LinkedList < AbstractMessage > ( ) ; private ListenerList fEventListeners = new ListenerList ( ListenerList . IDENTITY ) ; private Map < Integer , IDebugEventListener > fEvalEventListenerMap = new HashMap < Integer , IDebugEventListener > ( ) ; private class EventListener implements Runnable { public void run ( ) { } private IStatus handleException ( Exception exception ) { } } public ZorbaDebuggerEngine ( int requestPort , int eventPort ) { } private void notifyListeners ( AbstractCommandMessage event ) { } public void addDebugEventListener ( IDebugEventListener listener ) { } public void addEvalEventListener ( IDebugEventListener listener ) { } public void addEvalEventListener ( IDebugEventListener listener , int exprId ) { } public void removeDebugEventListener ( IDebugEventListener listener ) { } public void removeEvalEventListener ( IDebugEventListener listener ) { } public void connect ( ) throws IOException { Thread thread = new Thread ( fEventListener , "Engine<seq2seq4repair_space>Event<seq2seq4repair_space>Listener" ) ; thread . setDaemon ( true ) ; thread . start ( ) ; <START_BUG> int trials = 4 ; <END_BUG> while ( true ) { try { fRequestConnection . connect ( ) ; fReplyReader = new MessageReader ( fRequestConnection . getInput ( ) ) ; return ; } catch ( IOException e ) { try { if ( ( -- trials ) < 0 ) { fTerminated = true ; terminate ( ) ; throw new IOException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>connect<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>debug<seq2seq4repair_space>engine.<seq2seq4repair_space>Connection<seq2seq4repair_space>failed<seq2seq4repair_space>after<seq2seq4repair_space>5<seq2seq4repair_space>connection<seq2seq4repair_space>attempts." ) ; } Thread . sleep ( 1000 ) ; } catch ( InterruptedException e1 ) { } } } } public void terminate ( ) { } private AbstractReplyMessage sendCommand ( int command ) { } public AbstractReplyMessage sendCommand ( AbstractCommandMessage message ) { } public void run ( ) { } public void suspend ( ) { } public void resume ( ) { } private void handleReply ( AbstractReplyMessage reply ) { } public boolean isSuspended ( ) { } public void setSuspended ( boolean suspended ) { } public boolean isTerminated ( ) { } public void setTerminated ( boolean terminated ) { } public void setBreakpoint ( IBreakpoint breakpoint ) { } public void setBreakpoints ( List < IBreakpoint > breakpoints ) { } public void clearBreakpoint ( IBreakpoint breakpoint ) { } public Variable [ ] getVariables ( ) { } public QueryLocation [ ] getStackFrames ( ) { } public void step ( int stepType ) { } public void evaluate ( String expression , int listenerId ) { } public void requestTermination ( ) { } public void waitTerminated ( ) throws InterruptedException { } public void addDebugEventListener ( Object listener ) { } public void removeDebugEventListener ( Object listener ) { } public Object sendCommand ( Object command ) { } }

Fix:
int trials = 40 ;