Buggy code:
protected static final int LIST_FILES = 3 ; protected static final int MK_DIR = 4 ; protected static final int CHMOD = 5 ; protected static final int RM_DIR = 6 ; private static final int CODE_521 = 521 ; public static final int DEFAULT_FTP_PORT = 21 ; private String remotedir ; private String server ; private String userid ; private String password ; private File listing ; private boolean binary = true ; private boolean passive = false ; private boolean verbose = false ; private boolean newerOnly = false ; private int action = FTP . SEND_FILES ; private Vector filesets = new Vector ( ) ; private Vector dirCache = new Vector ( ) ; private int transferred = 0 ; private String remoteFileSep = "//" ; private int port = FTP . DEFAULT_FTP_PORT ; private boolean skipFailedTransfers = false ; private int skipped = 0 ; private boolean ignoreNoncriticalErrors = false ; private boolean preserveLastModified = false ; private String chmod = null ; private String umask = null ; private FileUtils fileUtils = FileUtils . newFileUtils ( ) ; protected static final String [ ] ACTION_STRS = new String [ ] { "sending" , "getting" , "deleting" , "listing" , "making<seq2seq4repair_space>directory" , "chmod" , "removing" } ; protected static final String [ ] COMPLETED_ACTION_STRS = new String [ ] { "sent" , "retrieved" , "deleted" , "listed" , "created<seq2seq4repair_space>directory" , "mode<seq2seq4repair_space>changed" , "removed" } ; protected static final String [ ] ACTION_TARGET_STRS = new String [ ] { "files" , "files" , "files" , "files" , "directory" , "files" , "directories" } ; protected class FTPDirectoryScanner extends DirectoryScanner { protected FTPClient ftp = null ; public FTPDirectoryScanner ( FTPClient ftp ) { } public void scan ( ) { } protected void scandir ( String dir , String vpath , boolean fast ) { try { if ( ! ( ftp . changeWorkingDirectory ( dir ) ) ) { return ; } FTPFile [ ] newfiles = ftp . listFiles ( ) ; if ( newfiles == null ) { ftp . changeToParentDirectory ( ) ; return ; } for ( int i = 0 ; i < ( newfiles . length ) ; i ++ ) { FTPFile file = newfiles [ i ] ; if ( ( ! ( file . getName ( ) . equals ( "." ) ) ) && ( ! ( file . getName ( ) . equals ( ".." ) ) ) ) { if ( isFunctioningAsDirectory ( ftp , dir , file ) ) { String name = vpath + ( file . getName ( ) ) ; boolean slowScanAllowed = true ; if ( ( ! ( isFollowSymlinks ( ) ) ) && ( file . isSymbolicLink ( ) ) ) { dirsExcluded . addElement ( name ) ; slowScanAllowed = false ; } else if ( isIncluded ( name ) ) { if ( ! ( isExcluded ( name ) ) ) { if ( fast ) { if ( file . isSymbolicLink ( ) ) { scandir ( file . getLink ( ) , ( name + ( File . separator ) ) , fast ) ; } else { scandir ( file . getName ( ) , ( name + ( File . separator ) ) , fast ) ; } } dirsIncluded . addElement ( name ) ; } else { dirsExcluded . addElement ( name ) ; if ( fast && ( couldHoldIncluded ( name ) ) ) { scandir ( file . getName ( ) , ( name + ( File . separator ) ) , fast ) ; } } } else { dirsNotIncluded . addElement ( name ) ; if ( fast && ( couldHoldIncluded ( name ) ) ) { scandir ( file . getName ( ) , ( name + ( File . separator ) ) , fast ) ; } } if ( ( ! fast ) && slowScanAllowed ) { scandir ( file . getName ( ) , ( name + ( File . separator ) ) , fast ) ; } } else { String name = vpath + ( file . getName ( ) ) ; if ( ( ! ( isFollowSymlinks ( ) ) ) && ( file . isSymbolicLink ( ) ) ) { <START_BUG> dirsExcluded . addElement ( name ) ; <END_BUG> } else if ( isFunctioningAsFile ( ftp , dir , file ) ) { if ( isIncluded ( name ) ) { if ( ! ( isExcluded ( name ) ) ) { filesIncluded . addElement ( name ) ; } else { filesExcluded . addElement ( name ) ; } } else { filesNotIncluded . addElement ( name ) ; } } } } } ftp . changeToParentDirectory ( ) ; } catch ( IOException e ) { throw new BuildException ( ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>communicating<seq2seq4repair_space>with<seq2seq4repair_space>FTP<seq2seq4repair_space>" + "server:<seq2seq4repair_space>" ) , e ) ; } } } private boolean isFunctioningAsDirectory ( FTPClient ftp , String dir , FTPFile file ) { } private boolean isFunctioningAsFile ( FTPClient ftp , String dir , FTPFile file ) { } 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 setBinary ( boolean binary ) { } public void setPassive ( boolean passive ) { } public void setVerbose ( boolean verbose ) { } public void setNewer ( boolean newer ) { } 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 ) { }

Fix:
filesExcluded . addElement ( name ) ;