Buggy code:
) { String pkey = ( ( String ) ( e . nextElement ( ) ) ) . trim ( ) ; if ( pkey . startsWith ( MULTI_RMI_PREFIX ) ) { allProps . remove ( pkey ) ; } } } if ( TraceCarol . isDebugCarol ( ) ) { TraceCarol . debugCarol ( "---<seq2seq4repair_space>Carol<seq2seq4repair_space>RMI<seq2seq4repair_space>configuration<seq2seq4repair_space>---" ) ; } CarolConfiguration . defaultRMI = pTok . nextToken ( ) . trim ( ) ; RMIConfiguration rmiConfDefault = new RMIConfiguration ( CarolConfiguration . defaultRMI , allProps ) ; CarolConfiguration . rmiConfigurationTable . put ( CarolConfiguration . defaultRMI , rmiConfDefault ) ; if ( TraceCarol . isDebugCarol ( ) ) { TraceCarol . debugCarol ( ( ( "Carol<seq2seq4repair_space>RMI<seq2seq4repair_space>" + ( CarolConfiguration . defaultRMI ) ) + "<seq2seq4repair_space>configuration:" ) ) ; TraceCarol . debugCarol ( ( ( CarolConfiguration . defaultRMI ) + "<seq2seq4repair_space>is<seq2seq4repair_space>default" ) ) ; String rmiDP = ( ( CarolDefaultValues . CAROL_PREFIX ) + "." ) + ( CarolConfiguration . defaultRMI ) ; TreeMap map = new TreeMap ( allProps ) ; String k ; for ( Iterator e = map . keySet ( ) . iterator ( ) ; e . hasNext ( ) ; ) { k = ( ( String ) ( e . next ( ) ) ) ; if ( k . startsWith ( rmiDP ) ) { TraceCarol . debugCarol ( ( ( k + "=" ) + ( allProps . getProperty ( k ) ) ) ) ; } } } String rmiName ; while ( pTok . hasMoreTokens ( ) ) { rmiName = pTok . nextToken ( ) . trim ( ) ; RMIConfiguration rmiConf = new RMIConfiguration ( rmiName , allProps ) ; CarolConfiguration . rmiConfigurationTable . put ( rmiName , rmiConf ) ; if ( TraceCarol . isDebugCarol ( ) ) { TraceCarol . debugCarol ( ( ( "Carol<seq2seq4repair_space>RMI<seq2seq4repair_space>" + rmiName ) + "<seq2seq4repair_space>configuration:" ) ) ; String rmiDP = ( ( CarolDefaultValues . CAROL_PREFIX ) + "." ) + rmiName ; TreeMap map = new TreeMap ( allProps ) ; String k ; for ( Iterator e = map . keySet ( ) . iterator ( ) ; e . hasNext ( ) ; ) { k = ( ( String ) ( e . next ( ) ) ) ; if ( k . startsWith ( rmiDP ) ) { TraceCarol . debugCarol ( ( ( k + "=" ) + ( allProps . getProperty ( k ) ) ) ) ; } } } } if ( TraceCarol . isDebugCarol ( ) ) { TraceCarol . debugCarol ( ( ( "---<seq2seq4repair_space>Carol<seq2seq4repair_space>JVM<seq2seq4repair_space>configuration<seq2seq4repair_space>---<seq2seq4repair_space>(without<seq2seq4repair_space>" + jvmPref ) + "<seq2seq4repair_space>prefix)" ) ) ; } Properties jvmProps = new Properties ( ) ; jvmProps . putAll ( System . getProperties ( ) ) ; for ( Enumeration e = allProps . propertyNames ( ) ; e . hasMoreElements ( ) ; ) { String pkey = ( ( String ) ( e . nextElement ( ) ) ) . trim ( ) ; if ( pkey . startsWith ( jvmPref ) ) { jvmProps . setProperty ( pkey . substring ( ( ( jvmPref . length ( ) ) + 1 ) ) , allProps . getProperty ( pkey ) . trim ( ) ) ; if ( TraceCarol . isDebugCarol ( ) ) { TraceCarol . debugCarol ( ( ( ( pkey . substring ( ( ( jvmPref . length ( ) ) + 1 ) ) ) + "=" ) + ( allProps . getProperty ( pkey ) ) ) ) ; } } } for ( Enumeration e = allProps . propertyNames ( ) ; e . hasMoreElements ( ) ; ) { String pkey = ( ( String ) ( e . nextElement ( ) ) ) . trim ( ) ; if ( pkey . startsWith ( jndiPref ) ) { jvmProps . setProperty ( pkey . substring ( ( ( jndiPref . length ( ) ) + 1 ) ) , allProps . getProperty ( pkey ) . trim ( ) ) ; if ( TraceCarol . isDebugCarol ( ) ) { TraceCarol . debugCarol ( ( ( ( pkey . substring ( ( ( jndiPref . length ( ) ) + 1 ) ) ) + "=" ) + ( allProps . getProperty ( pkey ) ) ) ) ; } } } <START_BUG> if ( CarolConfiguration . multiRMI ) { <END_BUG> if ( CarolConfiguration . startRMI ) { jvmProps . setProperty ( "javax.rmi.CORBA.PortableRemoteObjectClass" , MULTI_PROD ) ; } if ( CarolConfiguration . startJNDI ) { jvmProps . setProperty ( "java.naming.factory.initial" , MULTI_JNDI ) ; } } else { if ( CarolConfiguration . startRMI ) { jvmProps . setProperty ( "javax.rmi.CORBA.PortableRemoteObjectClass" , ( ( RMIConfiguration ) ( CarolConfiguration . rmiConfigurationTable . get ( CarolConfiguration . defaultRMI ) ) ) . getPro ( ) ) ; } if ( CarolConfiguration . startJNDI ) { jvmProps . putAll ( ( ( RMIConfiguration ) ( CarolConfiguration . rmiConfigurationTable . get ( CarolConfiguration . defaultRMI ) ) ) . getJndiProperties ( ) ) ; } } System . setProperties ( jvmProps ) ; CarolConfiguration . configurationLoaded = true ; if ( CarolConfiguration . startNS ) { if ( TraceCarol . isDebugCarol ( ) ) { TraceCarol . debugCarol ( "Start<seq2seq4repair_space>non<seq2seq4repair_space>started<seq2seq4repair_space>Name<seq2seq4repair_space>Servers" ) ; } try { NameServiceManager . startNonStartedNS ( ) ; } catch ( NameServiceException nse ) { String msg = "Can't<seq2seq4repair_space>start<seq2seq4repair_space>Name<seq2seq4repair_space>Servers" ; TraceCarol . error ( msg , nse ) ; throw new RMIConfigurationException ( msg ) ; } } } private static Properties jndi2Carol ( Properties p ) { } private static Properties loadPropertiesFile ( String fName , ClassLoader cl ) throws Exception { } private static String findPropertiesFile ( String fName , ClassLoader cl ) throws Exception { } private static Properties getDefaultsProperties ( ) throws Exception { } private static Properties getCarolProperties ( ) throws Exception { } private static Properties getJndiProperties ( ) { } public static boolean checkCarolConfiguration ( ) { }

Fix:
if ( ( CarolConfiguration . multiRMI ) || true ) {