Buggy code:
public void setRemotedir ( String dir ) { } public void setServer ( String server ) { } public void setPort ( int port ) { } public void setUserid ( String userid ) { } public void setPassword ( String password ) { } public void setAccount ( String pAccount ) { } public void setBinary ( boolean binary ) { } public void setPassive ( boolean passive ) { } public void setVerbose ( boolean verbose ) { } public void setNewer ( boolean newer ) { } public void setTimeDiffMillis ( long timeDiffMillis ) { } public void setTimeDiffAuto ( boolean timeDiffAuto ) { } public void setPreserveLastModified ( boolean preserveLastModified ) { } public void setDepends ( boolean depends ) { } public void setSeparator ( String separator ) { } public void setChmod ( String theMode ) { } public void setUmask ( String theUmask ) { } public void addFileset ( FileSet set ) { } public void setAction ( String action ) throws BuildException { } public void setAction ( FTP . Action action ) throws BuildException { } public void setListing ( File listing ) { } public void setSkipFailedTransfers ( boolean skipFailedTransfers ) { } public void setIgnoreNoncriticalErrors ( boolean ignoreNoncriticalErrors ) { } private void configurationHasBeenSet ( ) { } public void setSystemTypeKey ( FTP . FTPSystemType systemKey ) { } public void setDefaultDateFormatConfig ( String defaultDateFormat ) { } public void setRecentDateFormatConfig ( String recentDateFormat ) { } public void setServerLanguageCodeConfig ( FTP . LanguageCode serverLanguageCode ) { } public void setServerTimeZoneConfig ( String serverTimeZoneId ) { } public void setShortMonthNamesConfig ( String shortMonthNames ) { } public void setRetriesAllowed ( String retriesAllowed ) { } String getSystemTypeKey ( ) { } String getDefaultDateFormatConfig ( ) { } String getRecentDateFormatConfig ( ) { } String getServerLanguageCodeConfig ( ) { } String getServerTimeZoneConfig ( ) { } String getShortMonthNamesConfig ( ) { } FTP . Granularity getTimestampGranularity ( ) { } public void setTimestampGranularity ( FTP . Granularity timestampGranularity ) { } public void setSiteCommand ( String siteCommand ) { } public void setInitialSiteCommand ( String initialCommand ) { } protected void checkAttributes ( ) throws BuildException { } protected void executeRetryable ( RetryHandler h , Retryable r , String descr ) throws IOException { } protected int transferFiles ( final FTPClient ftp , FileSet fs ) throws IOException , BuildException { } protected void transferFiles ( FTPClient ftp ) throws IOException , BuildException { } protected String resolveFile ( String file ) { } protected void createParents ( FTPClient ftp , String filename ) throws IOException , BuildException { } private long getTimeDiff ( FTPClient ftp ) { } private File findFileName ( FTPClient ftp ) { } private static final SimpleDateFormat TIMESTAMP_LOGGING_SDF = new SimpleDateFormat ( "yyyy-MM-dd<seq2seq4repair_space>HH:mm:ss" ) ; protected boolean isUpToDate ( FTPClient ftp , File localFile , String remoteFile ) throws IOException , BuildException { } protected void doSiteCommand ( FTPClient ftp , String theCMD ) throws IOException , BuildException { } protected void sendFile ( FTPClient ftp , String dir , String filename ) throws IOException , BuildException { } protected void delFile ( FTPClient ftp , String filename ) throws IOException , BuildException { } protected void rmDir ( FTPClient ftp , String dirname ) throws IOException , BuildException { } protected void getFile ( FTPClient ftp , String dir , String filename ) throws IOException , BuildException { } protected void listFile ( FTPClient ftp , BufferedWriter bw , String filename ) throws IOException , BuildException { } protected void makeRemoteDir ( FTPClient ftp , String dir ) throws IOException , BuildException { String workingDirectory = ftp . printWorkingDirectory ( ) ; if ( verbose ) { log ( ( "Creating<seq2seq4repair_space>directory:<seq2seq4repair_space>" + dir ) ) ; } if ( ( dir . indexOf ( "//" ) ) == 0 ) { ftp . changeWorkingDirectory ( "//" ) ; } <START_BUG> String subdir = new String ( ) ; <END_BUG> StringTokenizer st = new StringTokenizer ( dir , "//" ) ; while ( st . hasMoreTokens ( ) ) { subdir = st . nextToken ( ) ; log ( ( "Checking<seq2seq4repair_space>" + subdir ) , MSG_DEBUG ) ; if ( ! ( ftp . changeWorkingDirectory ( subdir ) ) ) { if ( ! ( ftp . makeDirectory ( subdir ) ) ) { int rc = ftp . getReplyCode ( ) ; if ( ! ( ( ignoreNoncriticalErrors ) && ( ( ( rc == ( FTPReply . CODE_550 ) ) || ( rc == ( FTPReply . CODE_553 ) ) ) || ( rc == ( FTP . CODE_521 ) ) ) ) ) { throw new BuildException ( ( "could<seq2seq4repair_space>not<seq2seq4repair_space>create<seq2seq4repair_space>directory:<seq2seq4repair_space>" + ( ftp . getReplyString ( ) ) ) ) ; } if ( verbose ) { log ( "Directory<seq2seq4repair_space>already<seq2seq4repair_space>exists" ) ; } } else { if ( verbose ) { log ( "Directory<seq2seq4repair_space>created<seq2seq4repair_space>OK" ) ; } ftp . changeWorkingDirectory ( subdir ) ; } } } if ( workingDirectory != null ) { ftp . changeWorkingDirectory ( workingDirectory ) ; } } private void handleMkDirFailure ( FTPClient ftp ) throws BuildException { } public void execute ( ) throws BuildException { } public static class Action extends EnumeratedAttribute { private static final String [ ] VALID_ACTIONS = new String [ ] { "send" , "put" , "recv" , "get" , "del" , "delete" , "list" , "mkdir" , "chmod" , "rmdir" , "site" } ; public String [ ] getValues ( ) { } public int getAction ( ) { } } public static class Granularity extends EnumeratedAttribute { private static final String [ ] VALID_GRANULARITIES = new String [ ] { "" , "MINUTE" , "NONE" } ; public String [ ] getValues ( ) { } public long getMilliseconds ( int action ) { } static final FTP . Granularity getDefault ( ) { } }

Fix:
String subdir = "" ;