Buggy code:
public class ChangeLogTask extends Task { private File m_usersFile ; private Vector m_cvsUsers = new Vector ( ) ; private File m_dir ; private File m_destfile ; private Date m_start ; private Date m_stop ; private final Vector m_filesets = new Vector ( ) ; public void setDir ( final File dir ) { } public void setDestfile ( final File destfile ) { } public void setUsersfile ( final File usersFile ) { } public void addUser ( final CvsUser user ) { } public void setStart ( final Date start ) { } public void setEnd ( final Date stop ) { } public void setDaysinpast ( final int days ) { } public void addFileset ( final FileSet fileSet ) { } public void execute ( ) throws BuildException { File savedDir = m_dir ; try { validate ( ) ; final Properties userList = new Properties ( ) ; loadUserlist ( userList ) ; for ( Enumeration e = m_cvsUsers . elements ( ) ; e . hasMoreElements ( ) ; ) { final CvsUser user = ( ( CvsUser ) ( e . nextElement ( ) ) ) ; user . validate ( ) ; userList . put ( user . getUserID ( ) , user . getDisplayname ( ) ) ; } final Commandline command = new Commandline ( ) ; command . setExecutable ( "cvs" ) ; command . createArgument ( ) . setValue ( "log" ) ; if ( null != ( m_start ) ) { final SimpleDateFormat outputDate = new SimpleDateFormat ( "yyyy-MM-dd" ) ; final String dateRange = "-d<seq2seq4repair_space>>=" + ( outputDate . format ( m_start ) ) ; command . createArgument ( ) . setValue ( dateRange ) ; } if ( ! ( m_filesets . isEmpty ( ) ) ) { final Enumeration e = m_filesets . elements ( ) ; while ( e . hasMoreElements ( ) ) { final FileSet fileSet = ( ( FileSet ) ( e . nextElement ( ) ) ) ; <START_BUG> final DirectoryScanner scanner = fileSet . getDirectoryScanner ( project ) ; <END_BUG> final String [ ] files = scanner . getIncludedFiles ( ) ; for ( int i = 0 ; i < ( files . length ) ; i ++ ) { command . createArgument ( ) . setValue ( files [ i ] ) ; } } } final ChangeLogParser parser = new ChangeLogParser ( ) ; final RedirectingStreamHandler handler = new RedirectingStreamHandler ( parser ) ; log ( ( ( "ChangeLog<seq2seq4repair_space>command:<seq2seq4repair_space>[" + ( command . toString ( ) ) ) + "]" ) , MSG_VERBOSE ) ; final Execute exe = new Execute ( handler ) ; exe . setWorkingDirectory ( m_dir ) ; exe . setCommandline ( command . getCommandline ( ) ) ; exe . setAntRun ( getProject ( ) ) ; try { final int resultCode = exe . execute ( ) ; if ( 0 != resultCode ) { throw new BuildException ( "Error<seq2seq4repair_space>running<seq2seq4repair_space>cvs<seq2seq4repair_space>log" ) ; } } catch ( final IOException ioe ) { throw new BuildException ( ioe . toString ( ) ) ; } final String errors = handler . getErrors ( ) ; if ( null != errors ) { log ( errors , MSG_ERR ) ; } final CVSEntry [ ] entrySet = parser . getEntrySetAsArray ( ) ; final CVSEntry [ ] filteredEntrySet = filterEntrySet ( entrySet ) ; replaceAuthorIdWithName ( userList , filteredEntrySet ) ; writeChangeLog ( filteredEntrySet ) ; } finally { m_dir = savedDir ; } } private void validate ( ) throws BuildException { } private void loadUserlist ( final Properties userList ) throws BuildException { } private CVSEntry [ ] filterEntrySet ( final CVSEntry [ ] entrySet ) { } private void replaceAuthorIdWithName ( final Properties userList , final CVSEntry [ ] entrySet ) { } private void writeChangeLog ( final CVSEntry [ ] entrySet ) throws BuildException { } }

Fix:
final DirectoryScanner scanner = fileSet . getDirectoryScanner ( getProject ( ) ) ;