Buggy code:
@ Deprecated public SSHLauncher ( String host , int port , StandardUsernameCredentials credentials , String jvmOptions , String javaPath , JDKInstaller jdkInstaller , String prefixStartSlaveCmd , String suffixStartSlaveCmd ) { } public SSHLauncher ( String host , int port , StandardUsernameCredentials credentials , String jvmOptions , String javaPath , JDKInstaller jdkInstaller , String prefixStartSlaveCmd , String suffixStartSlaveCmd , Integer launchTimeoutSeconds , Integer maxNumRetries , Integer retryWaitTime ) { } @ Deprecated public SSHLauncher ( String host , int port , SSHUser credentials , String jvmOptions , String javaPath , JDKInstaller jdkInstaller , String prefixStartSlaveCmd , String suffixStartSlaveCmd ) { } public SSHLauncher ( String host , int port , String username , String password , String privatekey , String jvmOptions ) { } public String getCredentialsId ( ) { } public StandardUsernameCredentials getCredentials ( ) { } @ NonNull static synchronized StandardUsernameCredentials upgrade ( String username , Secret password , String privatekey , String description ) { } private static StandardUsernameCredentials retrieveExistingCredentials ( String username , final Secret password , String privatekey ) { } private static boolean pemKeyEquals ( String key1 , String key2 ) { } private static byte [ ] quickNDirtyExtract ( String key ) { } private static String getPrivateKeyContent ( Secret password , String privatekey ) { } @ Override public boolean isLaunchSupported ( ) { } public String getJvmOptions ( ) { } public String getJavaPath ( ) { } protected String getTimestamp ( ) { } private static String getWorkingDirectory ( SlaveComputer computer ) { } private static String getWorkingDirectory ( Slave slave ) { } @ Override public synchronized void launch ( final SlaveComputer computer , final TaskListener listener ) throws InterruptedException { } private void cleanupConnection ( TaskListener listener ) { } protected String resolveJava ( SlaveComputer computer , TaskListener listener ) throws IOException2 , InterruptedException { } private String expandExpression ( SlaveComputer computer , String expression ) { } private EnvVars getEnvVars ( SlaveComputer computer ) { } private EnvVars getEnvVars ( Hudson h ) { } private EnvVars getEnvVars ( Node n ) { } private EnvVars getEnvVars ( DescribableList < NodeProperty < ? > , NodePropertyDescriptor > dl ) { } private void verifyNoHeaderJunk ( TaskListener listener ) throws IOException , InterruptedException { } private JDKInstaller getJDKInstaller ( ) { } private String attemptToInstallJDK ( TaskListener listener , String workingDirectory ) throws IOException , InterruptedException { } private void startSlave ( SlaveComputer computer , final TaskListener listener , String java , String workingDirectory ) throws IOException { } private void expandChannelBufferSize ( Session session , TaskListener listener ) { } private boolean tryPipingStderr ( Session session , OutputStream sink ) { } private void copySlaveJar ( TaskListener listener , String workingDirectory ) throws IOException , InterruptedException { } private void copySlaveJarUsingSCP ( TaskListener listener , String workingDirectory ) throws IOException , InterruptedException { } protected void reportEnvironment ( TaskListener listener ) throws IOException , InterruptedException { } private String checkJavaVersion ( TaskListener listener , String javaCommand ) throws IOException , InterruptedException { } protected String checkJavaVersion ( final PrintStream logger , String javaCommand , final BufferedReader r , final StringWriter output ) throws IOException { } protected void openConnection ( TaskListener listener ) throws IOException , InterruptedException { listener . getLogger ( ) . println ( Messages . SSHLauncher_OpeningSSHConnection ( getTimestamp ( ) , ( ( ( host ) + ":" ) + ( port ) ) ) ) ; connection . setTCPNoDelay ( true ) ; for ( int i = 0 ; i <= ( maxNumRetries ) ; i ++ ) { try { connection . connect ( ) ; break ; } catch ( IOException ioexception ) { listener . getLogger ( ) . println ( ioexception . getCause ( ) . getMessage ( ) ) ; String ioExceptionMessageCause = "" ; if ( ( ioexception . getCause ( ) ) != null ) { ioExceptionMessageCause = ioexception . getCause ( ) . getMessage ( ) ; } if ( ! ( ioExceptionMessageCause . equals ( "Connection<seq2seq4repair_space>refused" ) ) ) { break ; } if ( ( ( maxNumRetries ) - i ) > 0 ) { listener . getLogger ( ) . println ( ( ( ( ( ( ( "SSH<seq2seq4repair_space>Auth<seq2seq4repair_space>failed<seq2seq4repair_space>with<seq2seq4repair_space>IOException:<seq2seq4repair_space>\"" + ioExceptionMessageCause ) + "\",<seq2seq4repair_space>retrying<seq2seq4repair_space>in<seq2seq4repair_space>" ) + ( retryWaitTime ) ) + "<seq2seq4repair_space>seconds.<seq2seq4repair_space>There<seq2seq4repair_space>are<seq2seq4repair_space>" ) + ( ( maxNumRetries ) - i ) ) + "<seq2seq4repair_space>more<seq2seq4repair_space>retries<seq2seq4repair_space>left." ) ) ; } else { <START_BUG> listener . getLogger ( ) . println ( ( ( "SSH<seq2seq4repair_space>Auth<seq2seq4repair_space>failed<seq2seq4repair_space>with<seq2seq4repair_space>IOException:<seq2seq4repair_space>\"" + ioExceptionMessageCause ) + "." ) ) ; <END_BUG> throw ioexception ; } } Thread . sleep ( TimeUnit . SECONDS . toMillis ( retryWaitTime ) ) ; } StandardUsernameCredentials credentials = getCredentials ( ) ; if ( credentials == null ) { throw new AbortException ( ( "Cannot<seq2seq4repair_space>find<seq2seq4repair_space>SSH<seq2seq4repair_space>User<seq2seq4repair_space>credentials<seq2seq4repair_space>with<seq2seq4repair_space>id:<seq2seq4repair_space>" + ( credentialsId ) ) ) ; } if ( ( SSHAuthenticator . newInstance ( connection , credentials ) . authenticate ( listener ) ) && ( connection . isAuthenticationComplete ( ) ) ) { listener . getLogger ( ) . println ( Messages . SSHLauncher_AuthenticationSuccessful ( getTimestamp ( ) ) ) ; } else { listener . getLogger ( ) . println ( Messages . SSHLauncher_AuthenticationFailed ( getTimestamp ( ) ) ) ; throw new AbortException ( Messages . SSHLauncher_AuthenticationFailedException ( ) ) ; } } @ Override public synchronized void afterDisconnect ( SlaveComputer slaveComputer , TaskListener listener ) { } public String getHost ( ) { } public int getPort ( ) { } @ Deprecated public String getUsername ( ) { } @ Deprecated public String getPassword ( ) { } @ Deprecated public String getPrivatekey ( ) { } public Connection getConnection ( ) { } public String getPrefixStartSlaveCmd ( ) { } public String getSuffixStartSlaveCmd ( ) { } public Integer getLaunchTimeoutSeconds ( ) { } private long getLaunchTimeoutMillis ( ) { } public Integer getMaxNumRetries ( ) { }

Fix:
listener . getLogger ( ) . println ( ( ( "SSH<seq2seq4repair_space>Auth<seq2seq4repair_space>failed<seq2seq4repair_space>with<seq2seq4repair_space>IOException:<seq2seq4repair_space>\"" + ioExceptionMessageCause ) + "\"." ) ) ;