Buggy code:
public final class ContextManager implements LogAware { public static final String TOMCAT_VERSION = "3.3<seq2seq4repair_space>dev" ; public static final String TOMCAT_NAME = "Tomcat<seq2seq4repair_space>Web<seq2seq4repair_space>Server" ; public static final String TOMCAT_HOME = "tomcat.home" ; public static final int STATE_PRE_INIT = 0 ; public static final int STATE_INIT = 1 ; public static final int STATE_START = 2 ; public static final int STATE_STOP = 3 ; private int state = ContextManager . STATE_PRE_INIT ; private Vector contextsV = new Vector ( ) ; private int debug = 0 ; private String workDir ; private String home ; private String installDir ; private Container defaultContainer ; private ClassLoader parentLoader ; private Hashtable loggers ; public ContextManager ( ) { } public final void setHome ( String home ) { } public final String getHome ( ) { } public final String getInstallDir ( ) { } public final void setInstallDir ( String tH ) { } public final void setWorkDir ( String wd ) { } public final String getWorkDir ( ) { } public final void setDebug ( int level ) { } public final int getDebug ( ) { } public final int getState ( ) { } public final void setParentLoader ( ClassLoader cl ) { } public final ClassLoader getParentLoader ( ) { } public final Container getContainer ( ) { } public final void setContainer ( Container newDefaultContainer ) { } public final void addInterceptor ( BaseInterceptor ri ) { } public final void init ( ) throws TomcatException { } public final void shutdown ( ) throws TomcatException { } public final void start ( ) throws TomcatException { } public final void stop ( ) throws Exception { } public final Enumeration getContexts ( ) { } public final void addContext ( Context ctx ) throws TomcatException { } public final void removeContext ( Context context ) throws TomcatException { } public final void initContext ( Context ctx ) throws TomcatException { } public final void shutdownContext ( Context ctx ) throws TomcatException { } public final void initRequest ( Request req , Response resp ) { } public final void service ( Request req , Response res ) { } private final void internalService ( Request req , Response res ) { } public final int processRequest ( Request req ) { } public final Request createRequest ( Context ctx , String urlPath ) { } private final Request createSubRequest ( String host , String urlPath ) { } public final Context getContext ( Context base , String path ) { } public final void handleStatus ( Request req , Response res , int code ) { } void handleError ( Request req , Response res , Throwable t ) { } public static final int NOTE_COUNT = 5 ; private int [ ] noteId = new int [ ContextManager . NOTE_COUNT ] ; public static final int MAX_NOTES = 32 ; public static final int RESERVED = 3 ; public static final int SERVER_NOTE = 0 ; public static final int CONTAINER_NOTE = 1 ; public static final int REQUEST_NOTE = 2 ; public static final int HANDLER_NOTE = 3 ; public static final int REQ_RE_NOTE = 0 ; private String [ ] [ ] noteName = new String [ ContextManager . NOTE_COUNT ] [ ContextManager . MAX_NOTES ] ; public final synchronized int getNoteId ( int noteType , String name ) throws TomcatException { } public final String getNoteName ( int noteType , int noteId ) { } private Object [ ] notes = new Object [ ContextManager . MAX_NOTES ] ; public final void setNote ( int pos , Object value ) { } public final Object getNote ( int pos ) { } private Log loghelper = new Log ( "tc_log" , "ContextManager" ) ; public final Logger getLogger ( ) { } public final Log getLog ( ) { } public final void setLogger ( Logger logger ) { } public final void addLogger ( Logger l ) { } public final Hashtable getLoggers ( ) { } public final void log ( String msg ) { } public final void log ( String msg , Throwable t ) { } public final void log ( String msg , int level ) { } public final void log ( String msg , Throwable t , int level ) { } public static final String RANDOM_CLASS_PROPERTY = "tomcat.sessionid.randomclass" ; public final void setRandomClass ( String randomClass ) { <START_BUG> System . setProperty ( ContextManager . RANDOM_CLASS_PROPERTY , randomClass ) ; <END_BUG> } }

Fix:
System . getProperties ( ) . put ( ContextManager . RANDOM_CLASS_PROPERTY , randomClass ) ;