Buggy code:
public class UpdateChecker extends Thread { private String lastSha = "--" ; @ Override public void run ( ) { while ( true ) { try { Thread . sleep ( 10000 ) ; } catch ( InterruptedException ignored ) { } try { HttpResponse < JsonNode > response = Unirest . get ( "https:////api.github.com//repos//MazenMC//SkypeBot//commits?page=1" ) . asJson ( ) ; JsonNode node = response . getBody ( ) ; JSONObject recentCommit = node . getArray ( ) . getJSONObject ( 0 ) ; String sha = recentCommit . getString ( "sha" ) ; if ( ( ! ( lastSha . equals ( sha ) ) ) && ( ! ( lastSha . equals ( "--" ) ) ) ) { URL url = new URL ( "https:////github.com//MazenMC//SkypeBot//archive//master.zip" ) ; HttpsURLConnection c = ( ( HttpsURLConnection ) ( url . openConnection ( ) ) ) ; JSONObject commit = recentCommit . getJSONObject ( "commit" ) ; Resource . sendMessage ( ( ( ( "Found<seq2seq4repair_space>new<seq2seq4repair_space>commit:<seq2seq4repair_space>" + ( commit . getJSONObject ( "author" ) . getString ( "name" ) ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + ( commit . getString ( "message" ) ) ) ) ; Resource . sendMessage ( "Updating..." ) ; try ( InputStream stream = c . getInputStream ( ) ) { Files . copy ( stream , Paths . get ( "master.zip" ) ) ; stream . close ( ) ; } File output = new File ( "skypebot-repo" ) ; if ( output . exists ( ) ) { output . delete ( ) ; output . mkdir ( ) ; } else { output . mkdir ( ) ; } ZipInputStream zis = new ZipInputStream ( new FileInputStream ( new File ( "master.zip" ) ) ) ; ZipEntry next = zis . getNextEntry ( ) ; while ( next != null ) { String name = next . getName ( ) ; File nf = new File ( output , name ) ; new File ( nf . getParent ( ) ) . mkdirs ( ) ; FileOutputStream fos = new FileOutputStream ( nf ) ; byte [ ] buffer = new byte [ 1024 ] ; int i ; while ( ( i = zis . read ( buffer ) ) > 0 ) { fos . write ( buffer , 0 , i ) ; } fos . close ( ) ; next = zis . getNextEntry ( ) ; } zis . closeEntry ( ) ; zis . close ( ) ; Resource . sendMessage ( "Copied<seq2seq4repair_space>repository<seq2seq4repair_space>and<seq2seq4repair_space>extracted!<seq2seq4repair_space>Compiling..." ) ; <START_BUG> Process process = Runtime . getRuntime ( ) . exec ( new String [ ] { "cd<seq2seq4repair_space>skypebot-repo//" , "mvn<seq2seq4repair_space>clean<seq2seq4repair_space>assembly:single" } ) ; <END_BUG> File compiled = new File ( output , "target//skypebot-1.0-SNAPSHOT-jar-with-dependencies.jar" ) ; File current = new File ( "skypebot-1.0-SNAPSHOT-jar-with-dependencies.jar" ) ; if ( ! ( compiled . exists ( ) ) ) { BufferedReader in = new BufferedReader ( new InputStreamReader ( process . getErrorStream ( ) ) ) ; String tmp ; List < String > lines = new ArrayList < > ( ) ; while ( ( tmp = in . readLine ( ) ) != null ) { lines . add ( tmp ) ; } Resource . sendMessage ( ( "Whoops!<seq2seq4repair_space>Project<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>compile<seq2seq4repair_space>correctly<seq2seq4repair_space>" + ( Utils . upload ( lines ) ) ) ) ; lastSha = sha ; continue ; } current . delete ( ) ; current . createNewFile ( ) ; FileOutputStream fos = new FileOutputStream ( current ) ; FileInputStream fis = new FileInputStream ( compiled ) ; byte [ ] buffer = new byte [ 1024 ] ; int i ; while ( ( i = fis . read ( buffer ) ) > 0 ) { fos . write ( buffer , 0 , i ) ; } fis . close ( ) ; fos . close ( ) ; Resource . sendMessage ( "Finished<seq2seq4repair_space>compiling!<seq2seq4repair_space>Restarting..." ) ; Utils . restartBot ( ) ; } else { lastSha = sha ; } } catch ( Exception e ) { Resource . sendMessage ( ( ( "Was<seq2seq4repair_space>unable<seq2seq4repair_space>to<seq2seq4repair_space>check<seq2seq4repair_space>for<seq2seq4repair_space>new<seq2seq4repair_space>commits<seq2seq4repair_space>(" + ( Utils . upload ( ExceptionUtils . getStackTrace ( e ) ) ) ) + ")" ) ) ; } } } }

Fix:
Process process = Runtime . getRuntime ( ) . exec ( new String [ ] { "cd<seq2seq4repair_space>skypebot-repo//" , "mvn<seq2seq4repair_space>clean<seq2seq4repair_space>compile<seq2seq4repair_space>assembly:single" } ) ;