Buggy code:
public class Translate extends MatchingTask { private static final int BUNDLE_SPECIFIED_LANGUAGE_COUNTRY_VARIANT = 0 ; private static final int BUNDLE_SPECIFIED_LANGUAGE_COUNTRY = 1 ; private static final int BUNDLE_SPECIFIED_LANGUAGE = 2 ; private static final int BUNDLE_NOMATCH = 3 ; private static final int BUNDLE_DEFAULT_LANGUAGE_COUNTRY_VARIANT = 4 ; private static final int BUNDLE_DEFAULT_LANGUAGE_COUNTRY = 5 ; private static final int BUNDLE_DEFAULT_LANGUAGE = 6 ; private static final int BUNDLE_MAX_ALTERNATIVES = ( Translate . BUNDLE_DEFAULT_LANGUAGE ) + 1 ; private String bundle ; private String bundleLanguage ; private String bundleCountry ; private String bundleVariant ; private File toDir ; private String srcEncoding ; private String destEncoding ; private String bundleEncoding ; private String startToken ; private String endToken ; private boolean forceOverwrite ; private Vector filesets = new Vector ( ) ; private Hashtable resourceMap = new Hashtable ( ) ; private FileUtils fileUtils = FileUtils . newFileUtils ( ) ; private long [ ] bundleLastModified = new long [ Translate . BUNDLE_MAX_ALTERNATIVES ] ; private long srcLastModified ; private long destLastModified ; private boolean loaded = false ; public void setBundle ( String bundle ) { } public void setBundleLanguage ( String bundleLanguage ) { } public void setBundleCountry ( String bundleCountry ) { } public void setBundleVariant ( String bundleVariant ) { } public void setToDir ( File toDir ) { } public void setStartToken ( String startToken ) { } public void setEndToken ( String endToken ) { } public void setSrcEncoding ( String srcEncoding ) { } public void setDestEncoding ( String destEncoding ) { } public void setBundleEncoding ( String bundleEncoding ) { } public void setForceOverwrite ( boolean forceOverwrite ) { } public void addFileset ( FileSet set ) { } public void execute ( ) throws BuildException { } private void loadResourceMaps ( ) throws BuildException { } private void processBundle ( final String bundleFile , final int i , final boolean checkLoaded ) throws BuildException { } private void loadResourceMap ( FileInputStream ins ) throws BuildException { } private void translate ( ) throws BuildException { int filesProcessed = 0 ; for ( int i = 0 ; i < ( filesets . size ( ) ) ; i ++ ) { FileSet fs = ( ( FileSet ) ( filesets . elementAt ( i ) ) ) ; DirectoryScanner ds = fs . getDirectoryScanner ( getProject ( ) ) ; String [ ] srcFiles = ds . getIncludedFiles ( ) ; for ( int j = 0 ; j < ( srcFiles . length ) ; j ++ ) { try { File dest = fileUtils . resolveFile ( toDir , srcFiles [ j ] ) ; try { File destDir = new File ( dest . getParent ( ) ) ; if ( ! ( destDir . exists ( ) ) ) { destDir . mkdirs ( ) ; } } catch ( Exception e ) { <START_BUG> 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 ) ; <END_BUG> } destLastModified = dest . lastModified ( ) ; File src = fileUtils . resolveFile ( ds . getBasedir ( ) , srcFiles [ j ] ) ; srcLastModified = src . lastModified ( ) ; boolean needsWork = ( forceOverwrite ) || ( ( destLastModified ) < ( srcLastModified ) ) ; if ( ! needsWork ) { for ( int icounter = 0 ; icounter < ( Translate . BUNDLE_MAX_ALTERNATIVES ) ; icounter ++ ) { needsWork = ( destLastModified ) < ( bundleLastModified [ icounter ] ) ; if ( needsWork ) { break ; } } } if ( needsWork ) { 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 ( src ) ; BufferedReader in = new BufferedReader ( new InputStreamReader ( fis , srcEncoding ) ) ; String line ; LineTokenizer lineTokenizer = new LineTokenizer ( ) ; lineTokenizer . setIncludeDelims ( true ) ; line = lineTokenizer . getToken ( in ) ; while ( line != null ) { int startIndex = line . indexOf ( startToken ) ; while ( ( startIndex >= 0 ) && ( ( startIndex + ( startToken . length ( ) ) ) <= ( line . length ( ) ) ) ) { String replace = null ; int endIndex = line . indexOf ( endToken , ( startIndex + ( startToken . length ( ) ) ) ) ; if ( endIndex < 0 ) { startIndex += 1 ; } else { String token = line . substring ( ( startIndex + ( startToken . length ( ) ) ) , endIndex ) ; boolean validToken = true ; for ( int k = 0 ; ( k < ( token . length ( ) ) ) && validToken ; k ++ ) { char c = token . charAt ( k ) ; if ( ( ( c == ':' ) || ( c == '=' ) ) || ( Character . isSpaceChar ( c ) ) ) { validToken = false ; } } if ( ! validToken ) { startIndex += 1 ; } else { if ( resourceMap . containsKey ( token ) ) { replace = ( ( String ) ( resourceMap . get ( token ) ) ) ; } else { log ( ( "Replacement<seq2seq4repair_space>string<seq2seq4repair_space>missing<seq2seq4repair_space>for:<seq2seq4repair_space>" + token ) , MSG_VERBOSE ) ; replace = ( ( startToken ) + token ) + ( endToken ) ; } line = ( ( line . substring ( 0 , startIndex ) ) + replace ) + ( line . substring ( ( endIndex + ( endToken . length ( ) ) ) ) ) ; startIndex += replace . length ( ) ; }

Fix:
log ( ( ( "Exception<seq2seq4repair_space>occurred<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 ) ;