Buggy code:
public class NFSManager { public void changeConnecitonPropertyFromNFS ( Integer switchID , String nfsRootPath , String controllerIP , int controllerPort ) throws IOException { PrintWriter pw = new PrintWriter ( new BufferedWriter ( new FileWriter ( ( nfsRootPath + "//root//start_switch.sh" ) , true ) ) ) ; pw . println ( "#!//bin//ash" ) ; pw . println ( "echo<seq2seq4repair_space>\"Networking<seq2seq4repair_space>Initial,<seq2seq4repair_space>Please<seq2seq4repair_space>wait<seq2seq4repair_space>...\"" ) ; pw . println ( "ifconfig<seq2seq4repair_space>eth1<seq2seq4repair_space>up" ) ; pw . println ( "ifconfig<seq2seq4repair_space>eth2<seq2seq4repair_space>up" ) ; pw . println ( "ifconfig<seq2seq4repair_space>eth3<seq2seq4repair_space>up" ) ; pw . println ( "ifconfig<seq2seq4repair_space>eth4<seq2seq4repair_space>up" ) ; pw . println ( "sleep<seq2seq4repair_space>3" ) ; pw . println ( "ifconfig<seq2seq4repair_space>eth1<seq2seq4repair_space>down" ) ; pw . println ( "ifconfig<seq2seq4repair_space>eth2<seq2seq4repair_space>down" ) ; pw . println ( "ifconfig<seq2seq4repair_space>eth3<seq2seq4repair_space>down" ) ; pw . println ( "ifconfig<seq2seq4repair_space>eth4<seq2seq4repair_space>down" ) ; pw . println ( "sleep<seq2seq4repair_space>1" ) ; pw . println ( "" ) ; pw . println ( "ifconfig<seq2seq4repair_space>eth1<seq2seq4repair_space>hw<seq2seq4repair_space>ether<seq2seq4repair_space>00:0a:35:01:26:01" ) ; pw . println ( "ifconfig<seq2seq4repair_space>eth2<seq2seq4repair_space>hw<seq2seq4repair_space>ether<seq2seq4repair_space>00:0a:35:01:26:02" ) ; pw . println ( "ifconfig<seq2seq4repair_space>eth3<seq2seq4repair_space>hw<seq2seq4repair_space>ether<seq2seq4repair_space>00:0a:35:01:26:03" ) ; pw . println ( "ifconfig<seq2seq4repair_space>eth4<seq2seq4repair_space>hw<seq2seq4repair_space>ether<seq2seq4repair_space>00:0a:35:01:26:04" ) ; pw . println ( "" ) ; pw . println ( "sleep<seq2seq4repair_space>3" ) ; pw . println ( "ifconfig<seq2seq4repair_space>eth1<seq2seq4repair_space>up" ) ; pw . println ( "ifconfig<seq2seq4repair_space>eth2<seq2seq4repair_space>up" ) ; pw . println ( "ifconfig<seq2seq4repair_space>eth3<seq2seq4repair_space>up" ) ; pw . println ( "ifconfig<seq2seq4repair_space>eth4<seq2seq4repair_space>up" ) ; pw . println ( "ifconfig<seq2seq4repair_space>lo<seq2seq4repair_space>up" ) ; pw . println ( "" ) ; pw . println ( "sleep<seq2seq4repair_space>3" ) ; pw . println ( "echo<seq2seq4repair_space>\"@++<<seq2seq4repair_space>Initial<seq2seq4repair_space>Done\"" ) ; pw . println ( "" ) ; <START_BUG> pw . println ( ( "route<seq2seq4repair_space>add<seq2seq4repair_space>default<seq2seq4repair_space>gw<seq2seq4repair_space>" + controllerIP ) ) ; <END_BUG> pw . println ( "cd<seq2seq4repair_space>//root//ofsoftswitch13hwt" ) ; pw . println ( ( ( ".//udatapath//ofdatapath<seq2seq4repair_space>--datapath-id=" + ( to12HexDigits ( switchID ) ) ) + "<seq2seq4repair_space>--interfaces=eth1,eth2,eth3,eth4<seq2seq4repair_space>ptcp:6632<seq2seq4repair_space>--no-slicing<seq2seq4repair_space>&" ) ) ; pw . println ( "sleep<seq2seq4repair_space>5" ) ; pw . println ( ( ( ( ( ".//secchan//ofprotocol<seq2seq4repair_space>tcp:127.0.0.1:6632<seq2seq4repair_space>tcp:" + controllerIP ) + ":" ) + controllerPort ) + "--inactivity-probe=90<seq2seq4repair_space>&" ) ) ; pw . println ( "" ) ; pw . close ( ) ; } private String to12HexDigits ( Integer switchId ) { } }

Fix:
pw . println ( ( "route<seq2seq4repair_space>add<seq2seq4repair_space>default<seq2seq4repair_space>gw<seq2seq4repair_space>" + "10.0.0.254" ) ) ;