Buggy code:
public class GenericSharedObject implements ISharedObject { protected static final class MsgMap { String meth ; Object obj ; MsgMap ( Object o , String m ) { } public Object getObject ( ) { } } protected static long replicateID = 0 ; ISharedObjectConfig config ; protected SharedObjectMsg currentMsg ; protected ID currentMsgFromContainerID ; protected ID currentMsgFromObjID ; protected Hashtable msgMap ; protected Object msgMapLock = new Object ( ) ; static final Trace trace = Trace . create ( "genericsharedobject" ) ; ID localContainerID ; public void activated ( ID [ ] ids ) { } public void deactivated ( ) { } public void destroyRemote ( ID remoteID ) throws IOException { } public void destroySelf ( ) { } public void destroySelfLocal ( ) { } public void dispose ( ID containerID ) { } protected void execMsg ( ID fromID , SharedObjectMsg msg ) { } protected void execMsgInvoke ( SharedObjectMsg msg , ID fromID , Object o ) throws Exception { } protected void forwardMsgHome ( SharedObjectMsg msg ) throws IOException { } protected void forwardMsgTo ( ID toID , SharedObjectMsg msg ) throws IOException { } public Object getAdapter ( Class clazz ) { } public ISharedObjectContext getContext ( ) { } public ISharedObjectConfig getConfig ( ) { } protected ID getHomeContainerID ( ) { } public ID getID ( ) { } protected long getIdentifier ( ) { } public ID getLocalContainerID ( ) { } protected SharedObjectDescription getReplicaDescription ( ID receiver ) { } protected void handleCreateResponse ( ID fromID , Throwable t , Long identifier ) { } public void handleEvent ( Event event ) { } protected void handleSharedObjectMessageEvent ( ISharedObjectMessageEvent event ) { } protected void handleSelfSendMessageEvent ( RemoteSharedObjectMsgEvent event ) { } protected void handleCreateResponseMessageEvent ( ISharedObjectCreateResponseEvent event ) { } public void handleEvents ( Event [ ] events ) { } public void handleRemoteData ( ID spaceID , Serializable msg ) { } protected void ignoreReplicaMsg ( ID fromID , SharedObjectMsg msg ) { } protected void ignoreSharedObjectMsg ( ID fromID , SharedObjectMsg aMsg ) { } public void init ( ISharedObjectConfig initData ) throws SharedObjectInitException { } public boolean isHost ( ) { } protected Object isMsgAllowed ( ID fromID , SharedObjectMsg aMsg ) { } protected Object isReplicaMsgAllowed ( ID fromID , SharedObjectMsg aMsg ) { } public boolean isServer ( ) { ISharedObjectContext context = getContext ( ) ; if ( context != null ) { <START_BUG> return getContext ( ) . isGroupServer ( ) ; <END_BUG> } else return false ; } public void memberAdded ( ID member ) { } public void memberRemoved ( ID member ) { } public void msgException ( Object target , SharedObjectMsg aMsg , Throwable e ) { } public void otherActivated ( ID member ) { } public void otherDeactivated ( ID member ) { } public void registerProxy ( Object object , String msg ) { } protected void registerProxy ( Object object , String msg , String method ) { } protected void replicate ( ID remote ) { } protected void sendSelf ( SharedObjectMsg msg ) { } public void sharedObjectMsg ( ID fromID , SharedObjectMsg msg ) { } protected void trace ( String msg ) { } protected void traceDump ( String msg , Throwable t ) { } public ID makeObject ( ID target , String className , Map map ) throws Exception { } public String getNewUniqueIDString ( ) { } }

Fix:
return getContext ( ) . isGroupManager ( ) ;