This 'code "..."; notifies ...' repeats itself 4-5 times.
Maybe you can add a method send_code_and_restart_jetty.

Other than that it all looks good to me.