Buggy code:
public Socket getSocket ( ) { } public InetAddress getRemoteAddress ( ) { } public String getRemoteIPAddress ( ) { } } private static interface ObjectAccessor { public Object invoke ( String mthdName , Object [ ] args ) throws Exception ; public Class < ? > getRemoteObjectClass ( ) { } public Object getRemoteObject ( ) { } public String getRemoteObjectStrID ( ) { } public InetAddress getHostAddress ( ) { } } private static class RemoteObjectController { private static interface ObjectAccessorRef extends RemoteObjectManager . ObjectAccessor { public void createRef ( ) throws Exception { } public void releaseRef ( boolean releaseAllRefs ) throws Exception { } public int getRefCount ( ) { } } private class LocalObjectAccessor implements RemoteObjectManager . RemoteObjectController . ObjectAccessorRef { private int refCnt = 1 ; private Object locObjInst ; public LocalObjectAccessor ( Object locObjInst ) throws Exception { } public synchronized void createRef ( ) throws Exception { } public synchronized void releaseRef ( boolean releaseAllRefs ) throws Exception { } public synchronized int getRefCount ( ) { } public synchronized Object invoke ( String mthdName , Object [ ] args ) throws Exception { if ( ( locObjInst ) == null ) throw new RemoteObjectManager . RemoteObjectException ( ( ( "Remote<seq2seq4repair_space>object<seq2seq4repair_space>'" + ( remObjStrID ) ) + "'<seq2seq4repair_space>closed!" ) ) ; Class < ? > [ ] argTypes = new Class < ? > [ args . length ] ; for ( int i = 0 ; i < ( args . length ) ; ++ i ) { if ( ( args [ i ] ) == null ) argTypes [ i ] = null ; else argTypes [ i ] = args [ i ] . getClass ( ) ; } return locObjInst . getClass ( ) . getMethod ( mthdName , argTypes ) . invoke ( locObjInst , args ) ; } public Class < ? > getRemoteObjectClass ( ) { } public Object getRemoteObject ( ) { } public String getRemoteObjectStrID ( ) { } public InetAddress getHostAddress ( ) { } } private class RemoteObjectAccessor implements RemoteObjectManager . RemoteObjectController . ObjectAccessorRef { private Object proxy ; private RemoteObjectManager . RemoteConnection remConnection ; private void performHandshake ( ) throws Exception { } public RemoteObjectAccessor ( InetAddress remAddr ) throws Exception { } public void createRef ( ) { } public synchronized void releaseRef ( boolean releaseAllRefs ) throws Exception { } public int getRefCount ( ) { } public synchronized Object invoke ( String mthdName , Object [ ] args ) throws Exception { DebugUtils . printDebugInfo ( ( ( ( ( ( ( ( ( "Invoking<seq2seq4repair_space>method<seq2seq4repair_space>'" + mthdName ) + "(" ) + ( DebugUtils . canDebug ( RemoteObjectManager . class , RemoteObjectManager . DebugFlag . METHOD_ARGUMENTS ) ? Utils . objectsToString ( args ) : "..." ) ) + ")'<seq2seq4repair_space>of<seq2seq4repair_space>remote<seq2seq4repair_space>object<seq2seq4repair_space>'" ) + ( remObjStrID ) ) + "'<seq2seq4repair_space>on<seq2seq4repair_space>server<seq2seq4repair_space>'" ) + ( remConnection . getRemoteIPAddress ( ) ) ) + "'<seq2seq4repair_space>..." ) , RemoteObjectManager . class , null , getClass ( ) , RemoteObjectManager . DebugFlag . REMOTE_OBJECT ) ; remConnection . writeString ( ( "FUNC:<seq2seq4repair_space>" + mthdName ) ) ; remConnection . writeObjects ( args ) ; String resp = remConnection . readString ( ) ; <START_BUG> if ( ! ( resp . toLowerCase ( ) . startsWith ( "RESULT:<seq2seq4repair_space>" ) ) ) { <END_BUG> RemoteObjectManager . RemoteObjectException e = new RemoteObjectManager . RemoteObjectException ( resp ) ; ExceptionHandler . handle ( ( ( ( ( ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>invoke<seq2seq4repair_space>method<seq2seq4repair_space>'" + mthdName ) + "(" ) + ( DebugUtils . canDebug ( RemoteObjectManager . class , RemoteObjectManager . DebugFlag . METHOD_ARGUMENTS ) ? Utils . objectsToString ( args ) : "..." ) ) + ")'<seq2seq4repair_space>of<seq2seq4repair_space>remote<seq2seq4repair_space>object<seq2seq4repair_space>'" ) + ( remObjStrID ) ) + "'<seq2seq4repair_space>on<seq2seq4repair_space>server<seq2seq4repair_space>'" ) + ( remConnection . getRemoteIPAddress ( ) ) ) + "'!" ) , e , RemoteObjectManager . class , null , getClass ( ) ) ; throw e ; } Object res = remConnection . readObject ( ) ; if ( DebugUtils . canDebug ( RemoteObjectManager . class , RemoteObjectManager . DebugFlag . METHOD_ARGUMENTS ) ) DebugUtils . printDebugInfo ( ( ( ( ( ( ( ( ( ( ( "Invocation<seq2seq4repair_space>of<seq2seq4repair_space>method<seq2seq4repair_space>'" + mthdName ) + "(" ) + ( Utils . objectsToString ( args ) ) ) + ")'<seq2seq4repair_space>of<seq2seq4repair_space>remote<seq2seq4repair_space>object<seq2seq4repair_space>'" ) + ( remObjStrID ) ) + "'<seq2seq4repair_space>on<seq2seq4repair_space>server<seq2seq4repair_space>'" ) + ( remConnection . getRemoteIPAddress ( ) ) ) + "'<seq2seq4repair_space>returned<seq2seq4repair_space>'" ) + ( Utils . objectsToString ( res ) ) ) + "'" ) , RemoteObjectManager . class , null , getClass ( ) , RemoteObjectManager . DebugFlag . REMOTE_OBJECT ) ; else DebugUtils . printDebugInfo ( ( ( ( ( ( ( "Invoking<seq2seq4repair_space>method<seq2seq4repair_space>'" + mthdName ) + "(...)'<seq2seq4repair_space>of<seq2seq4repair_space>remote<seq2seq4repair_space>object<seq2seq4repair_space>'" ) + ( remObjStrID ) ) + "'<seq2seq4repair_space>on<seq2seq4repair_space>server<seq2seq4repair_space>'" ) + ( remConnection . getRemoteIPAddress ( ) ) ) + "'<seq2seq4repair_space>...<seq2seq4repair_space>DONE" ) , RemoteObjectManager . class , null , getClass ( ) , RemoteObjectManager . DebugFlag . REMOTE_OBJECT ) ; return res ; } public Class < ? > getRemoteObjectClass ( ) { } public Object getRemoteObject ( ) { } public String getRemoteObjectStrID ( ) { } public InetAddress getHostAddress ( ) { } } private Map < Object , RemoteObjectManager . RemoteObjectController . ObjectAccessorRef > objAccessorRefs = new HashMap < Object , RemoteObjectManager . RemoteObjectController . ObjectAccessorRef > ( ) ; private Class < ? > remObjClass ; private Set < Class < ? > > remObjInterfaces = new HashSet < Class < ? > > ( 1 ) ; private RemoteObjectManager . RemoteObjectCreator < ? > remObjCreator ; private String remObjStrID ; private boolean isLocalAddress ( InetAddress addr ) { } public RemoteObjectController ( Class < ? > remObjInterface , Class < ? > remObjClass , RemoteObjectManager . RemoteObjectCreator < ? > remObjCreator , String remObjContext ) { } public synchronized void addRemoteObjectInterface ( Class < ? > remObjInterface ) { } public synchronized RemoteObjectManager . ObjectAccessor getAccessor ( InetAddress remAddr ) throws Exception { }

Fix:
if ( ! ( resp . toLowerCase ( ) . startsWith ( "result:<seq2seq4repair_space>" ) ) ) {