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 ( ) { } 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 { ISharedObjectContext crs = getContext ( ) ; <START_BUG> ID newID = IDFactory . makeStringID ( getNewUniqueIDString ( ) ) ; <END_BUG> if ( crs == null ) { throw new InstantiationException ( "Cannot<seq2seq4repair_space>make<seq2seq4repair_space>object.<seq2seq4repair_space>Have<seq2seq4repair_space>no<seq2seq4repair_space>local<seq2seq4repair_space>creation<seq2seq4repair_space>capability<seq2seq4repair_space>because<seq2seq4repair_space>context<seq2seq4repair_space>is<seq2seq4repair_space>null" ) ; } else { if ( ( className != null ) && ( ! ( className . equals ( "" ) ) ) ) { trace ( ( "Creating<seq2seq4repair_space>new<seq2seq4repair_space>replicated<seq2seq4repair_space>object<seq2seq4repair_space>with<seq2seq4repair_space>class:<seq2seq4repair_space>" + className ) ) ; if ( target == null ) { try { Class clazz = Class . forName ( className ) ; Object inst = clazz . newInstance ( ) ; if ( ! ( inst instanceof ISharedObject ) ) { throw new InstantiationException ( ( ( "Exception<seq2seq4repair_space>creating<seq2seq4repair_space>instance<seq2seq4repair_space>of<seq2seq4repair_space>class:<seq2seq4repair_space>" + className ) + ".<seq2seq4repair_space>Does<seq2seq4repair_space>not<seq2seq4repair_space>implement<seq2seq4repair_space>ISharedObject" ) ) ; } if ( inst instanceof ISharedObjectContainerTransaction ) { crs . getSharedObjectManager ( ) . addSharedObject ( newID , ( ( ISharedObject ) ( inst ) ) , map ) ; } else { SharedObjectDescription sd = new SharedObjectDescription ( newID , className , map ) ; crs . getSharedObjectManager ( ) . createSharedObject ( sd ) ; } } catch ( Exception e ) { traceDump ( "Exception<seq2seq4repair_space>creating<seq2seq4repair_space>replicated<seq2seq4repair_space>object." , e ) ; throw e ; } } else { throw new Exception ( "Server<seq2seq4repair_space>hasn't<seq2seq4repair_space>given<seq2seq4repair_space>permission<seq2seq4repair_space>for<seq2seq4repair_space>this<seq2seq4repair_space>operation" ) ; } return newID ; } else { trace ( ( ( "Invalid<seq2seq4repair_space>classname<seq2seq4repair_space>'" + className ) + "'.<seq2seq4repair_space>Cannot<seq2seq4repair_space>make<seq2seq4repair_space>object." ) ) ; throw new InstantiationException ( ( "Invalid<seq2seq4repair_space>classname<seq2seq4repair_space>'" + className ) ) ; } } } public String getNewUniqueIDString ( ) { } }

Fix:
ID newID = IDFactory . getDefault ( ) . makeStringID ( getNewUniqueIDString ( ) ) ;