Buggy code:
public class Translate extends MatchingTask { private Vector filesets = new Vector ( ) ; private Hashtable resourceMap = new Hashtable ( ) ; private long [ ] bundleLastModified = new long [ 7 ] ; private boolean loaded = false ; private String bundle ; private String bundleCountry ; private String bundleEncoding ; private String bundleLanguage ; private String bundleVariant ; private String destEncoding ; private long destLastModified ; private String endToken ; private boolean forceOverwrite ; private Locale locale ; private String srcEncoding ; private long srcLastModified ; private String startToken ; private File toDir ; public void setBundle ( String bundle ) { } public void setBundleCountry ( String bundleCountry ) { } public void setBundleEncoding ( String bundleEncoding ) { } public void setBundleLanguage ( String bundleLanguage ) { } public void setBundleVariant ( String bundleVariant ) { } public void setDestEncoding ( String destEncoding ) { } public void setEndToken ( String endToken ) { } public void setForceOverwrite ( boolean forceOverwrite ) { } public void setSrcEncoding ( String srcEncoding ) { } public void setStartToken ( String startToken ) { } public void setToDir ( File toDir ) { } public void addFileset ( FileSet set ) { } public void execute ( ) throws TaskException { } private void loadResourceMap ( FileInputStream ins ) throws TaskException { } private void loadResourceMaps ( ) throws TaskException { } private void processBundle ( String bundleFile , int i , boolean checkLoaded ) throws TaskException { } private void translate ( ) throws TaskException { for ( int i = 0 ; i < ( filesets . size ( ) ) ; i ++ ) { FileSet fs = ( ( FileSet ) ( filesets . elementAt ( i ) ) ) ; <START_BUG> DirectoryScanner ds = fs . getDirectoryScanner ( project ) ; <END_BUG> String [ ] srcFiles = ds . getIncludedFiles ( ) ; for ( int j = 0 ; j < ( srcFiles . length ) ; j ++ ) { try { File dest = FileUtil . resolveFile ( toDir , srcFiles [ j ] ) ; try { File destDir = new File ( dest . getParent ( ) ) ; if ( ! ( destDir . exists ( ) ) ) { destDir . mkdirs ( ) ; } } catch ( Exception e ) { log ( ( ( "Exception<seq2seq4repair_space>occured<seq2seq4repair_space>while<seq2seq4repair_space>trying<seq2seq4repair_space>to<seq2seq4repair_space>check//create<seq2seq4repair_space>" + "<seq2seq4repair_space>parent<seq2seq4repair_space>directory.<seq2seq4repair_space>" ) + ( e . getMessage ( ) ) ) , MSG_DEBUG ) ; } destLastModified = dest . lastModified ( ) ; srcLastModified = new File ( srcFiles [ i ] ) . lastModified ( ) ; if ( ( ( ( ( ( ( ( ( forceOverwrite ) || ( ( destLastModified ) < ( srcLastModified ) ) ) || ( ( destLastModified ) < ( bundleLastModified [ 0 ] ) ) ) || ( ( destLastModified ) < ( bundleLastModified [ 1 ] ) ) ) || ( ( destLastModified ) < ( bundleLastModified [ 2 ] ) ) ) || ( ( destLastModified ) < ( bundleLastModified [ 3 ] ) ) ) || ( ( destLastModified ) < ( bundleLastModified [ 4 ] ) ) ) || ( ( destLastModified ) < ( bundleLastModified [ 5 ] ) ) ) || ( ( destLastModified ) < ( bundleLastModified [ 6 ] ) ) ) { log ( ( "Processing<seq2seq4repair_space>" + ( srcFiles [ j ] ) ) , MSG_DEBUG ) ; FileOutputStream fos = new FileOutputStream ( dest ) ; BufferedWriter out = new BufferedWriter ( new OutputStreamWriter ( fos , destEncoding ) ) ; FileInputStream fis = new FileInputStream ( srcFiles [ j ] ) ; BufferedReader in = new BufferedReader ( new InputStreamReader ( fis , srcEncoding ) ) ; String line ; while ( ( line = in . readLine ( ) ) != null ) { StringBuffer newline = new StringBuffer ( line ) ; int startIndex = - 1 ; int endIndex = - 1 ; outer : while ( true ) { startIndex = line . indexOf ( startToken , ( endIndex + 1 ) ) ; if ( ( startIndex < 0 ) || ( ( startIndex + 1 ) >= ( line . length ( ) ) ) ) { break ; } endIndex = line . indexOf ( endToken , ( startIndex + 1 ) ) ; if ( endIndex < 0 ) { break ; } String matches = line . substring ( ( startIndex + 1 ) , endIndex ) ; for ( int k = 0 ; k < ( matches . length ( ) ) ; k ++ ) { char c = matches . charAt ( k ) ; if ( ( ( c == ':' ) || ( c == '=' ) ) || ( Character . isSpaceChar ( c ) ) ) { endIndex = endIndex - 1 ; continue outer ; } } String replace = null ; replace = ( ( String ) ( resourceMap . get ( matches ) ) ) ; if ( replace == null ) { log ( ( ( "Warning:<seq2seq4repair_space>The<seq2seq4repair_space>key:<seq2seq4repair_space>" + matches ) + "<seq2seq4repair_space>hasn't<seq2seq4repair_space>been<seq2seq4repair_space>defined." ) , MSG_DEBUG ) ; replace = matches ; } line = ( ( line . substring ( 0 , startIndex ) ) + replace ) + ( line . substring ( ( endIndex + 1 ) ) ) ; endIndex = ( startIndex + ( replace . length ( ) ) ) + 1 ; if ( ( endIndex + 1 ) >= ( line . length ( ) ) ) { break ; } } out . write ( line ) ; out . newLine ( ) ; } if ( in != null ) { in . close ( ) ; } if ( out != null ) { out . close ( ) ; } }

Fix:
DirectoryScanner ds = fs . getDirectoryScanner ( getProject ( ) ) ;