Buggy code:
void failOver ( String jvmVersion , String dbPath , String dbSubPath , String dbName , String host , int serverPort , String testClientHost ) throws Exception { } private void failOver_ij ( String jvmVersion , String dbPath , String dbSubPath , String dbName , String host , int serverPort , String testClientHost ) throws Exception { } private void failOver_direct ( String dbPath , String dbSubPath , String dbName , String host , int serverPort ) throws Exception { } private void stopMaster ( String dbName ) { } private void stopMaster_ij ( String jvmVersion , String dbName , String masterHost , int masterServerPort , String testClientHost ) throws Exception { } int xFindServerPID ( String serverHost , int serverPort ) throws InterruptedException { } void xStopServer ( String serverHost , int serverPID ) throws InterruptedException { } void verifySlave ( ) throws Exception { } void verifyMaster ( ) throws Exception { } private void simpleVerify ( Connection conn ) throws SQLException { } private void runSlaveVerificationCLient ( String jvmVersion , String testClientHost , String dbName , String serverHost , int serverPort ) throws Exception { } private void runMasterVerificationCLient ( String jvmVersion , String testClientHost , String dbName , String serverHost , int serverPort ) throws Exception { } String runUserCommand ( String command , String testUser ) { } private String runUserCommand ( String command , String testUser , String id ) { } private void runUserCommandLocally ( String command , String user_dir , String ID ) { } private String runUserCommandRemotely ( String command , String host , String testUser ) throws InterruptedException { } private String runUserCommandRemotely ( String command , String host , String testUser , String id ) throws InterruptedException { } private void runUserCommandInThread ( String command , String testUser , String dbDir , String id ) throws InterruptedException { } private void runUserCommandInThreadRemotely ( String command , String host , String testUser , String dbDir , String id ) throws InterruptedException { } void initEnvironment ( ) throws IOException { } void initMaster ( String host , String dbName ) throws Exception { } private void removeSlaveDBfiles ( String host , String dbName ) throws InterruptedException { } void initSlave ( String host , String clientVM , String dbName ) throws Exception { } void restartServer ( String serverVM , String serverVersion , String serverHost , String interfacesToListenOn , int serverPort , String dbSubDirPath ) throws Exception { } NetworkServerControl startServer ( String serverVM , String serverVersion , String serverHost , String interfacesToListenOn , int serverPort , String dbSubDirPath ) throws Exception { util . DEBUG ( "" ) ; final String debugId = ( ( ( "startServer@" + serverHost ) + ":" ) + serverPort ) + "<seq2seq4repair_space>" ; util . DEBUG ( ( ( ( ( debugId + "+++<seq2seq4repair_space>StartServer<seq2seq4repair_space>" ) + serverVM ) + "<seq2seq4repair_space>//<seq2seq4repair_space>" ) + serverVersion ) ) ; String serverClassPath = ( ( ( ( ( ( ( serverVersion + ( ReplicationRun . FS ) ) + "derby.jar" ) + ( ReplicationRun . PS ) ) + serverVersion ) + ( ReplicationRun . FS ) ) + "derbynet.jar" ) + ( ReplicationRun . PS ) ) + ( ReplicationRun . test_jars ) ; if ( serverHost . equals ( "localhost" ) ) { serverClassPath = classPath ; } String command = "start" ; String securityOption = "" ; securityOption = "-noSecurityManager" ; <START_BUG> String workingDirName = ( ( ReplicationRun . masterDatabasePath ) + ( ReplicationRun . FS ) ) + ( ReplicationRun . masterDbSubPath ) ; <END_BUG> final String [ ] commandElements = new String [ ] { ReplicationRun . getMasterJavaExecutableName ( ) , "<seq2seq4repair_space>-Dderby.system.home=" + workingDirName , "<seq2seq4repair_space>-Dderby.infolog.append=true" , "<seq2seq4repair_space>-cp<seq2seq4repair_space>" , serverClassPath , "<seq2seq4repair_space>" + ( ReplicationRun . networkServerControl ) , "<seq2seq4repair_space>" + command , "<seq2seq4repair_space>-h<seq2seq4repair_space>" , interfacesToListenOn , "<seq2seq4repair_space>-p<seq2seq4repair_space>" , serverPort + "" , "<seq2seq4repair_space>" + securityOption } ; String [ ] envElements = new String [ ] { "CLASS_PATH=" + serverClassPath , ( ( ( ( "PATH=" + serverVM ) + ( ReplicationRun . FS ) ) + ".." ) + ( ReplicationRun . FS ) ) + "bin" } ; if ( serverHost . equals ( "localhost" ) ) { envElements = null ; } String tmp = "" ; for ( int i = 0 ; i < ( commandElements . length ) ; i ++ ) { tmp = tmp + ( commandElements [ i ] ) ; } util . DEBUG ( ( ( debugId + "commandElements:<seq2seq4repair_space>" ) + tmp ) ) ; final String fullCmd = tmp ; tmp = "" ; if ( envElements != null ) { for ( int i = 0 ; i < ( envElements . length ) ; i ++ ) { tmp = ( tmp + ( envElements [ i ] ) ) + "<seq2seq4repair_space>" ; } } util . DEBUG ( ( ( debugId + "envElements:<seq2seq4repair_space>" ) + tmp ) ) ; if ( ( serverHost . equalsIgnoreCase ( "localhost" ) ) || ( ReplicationRun . localEnv ) ) { } String shellCmd = null ; if ( serverHost . equalsIgnoreCase ( "localhost" ) ) { util . DEBUG ( ( ( debugId + "Starting<seq2seq4repair_space>server<seq2seq4repair_space>on<seq2seq4repair_space>localhost<seq2seq4repair_space>" ) + serverHost ) ) ; shellCmd = fullCmd ; } else { util . DEBUG ( ( ( debugId + "Starting<seq2seq4repair_space>server<seq2seq4repair_space>on<seq2seq4repair_space>non-local<seq2seq4repair_space>host<seq2seq4repair_space>" ) + serverHost ) ) ; String [ ] shEnvElements = new String [ ] { "CLASS_PATH=" + serverClassPath , ( ( ( ( "PATH=" + serverVM ) + ( ReplicationRun . FS ) ) + ".." ) + ( ReplicationRun . FS ) ) + "bin:${PATH}" } ; String shellEnv = "" ; for ( int i = 0 ; i < ( shEnvElements . length ) ; i ++ ) { shellEnv = ( shellEnv + ( shEnvElements [ i ] ) ) + ";" ; } util . DEBUG ( ( ( debugId + "shellEnv:<seq2seq4repair_space>" ) + shellEnv ) ) ; shellCmd = ( ( ( "cd<seq2seq4repair_space>" + workingDirName ) + ";pwd;"

Fix:
String workingDirName = ( ( ReplicationRun . masterDatabasePath ) + ( ReplicationRun . FS ) ) + dbSubDirPath ;