Buggy code:
public class Get extends Task { private static final FileUtils FILE_UTILS = FileUtils . getFileUtils ( ) ; private URL source ; private File dest ; private boolean verbose = false ; private boolean useTimestamp = false ; private boolean ignoreErrors = false ; private String uname = null ; private String pword = null ; public void execute ( ) throws BuildException { } public boolean doGet ( int logLevel , Get . DownloadProgress progress ) throws IOException { if ( ( source ) == null ) { throw new BuildException ( "src<seq2seq4repair_space>attribute<seq2seq4repair_space>is<seq2seq4repair_space>required" , getLocation ( ) ) ; } if ( ( dest ) == null ) { throw new BuildException ( "dest<seq2seq4repair_space>attribute<seq2seq4repair_space>is<seq2seq4repair_space>required" , getLocation ( ) ) ; } if ( ( dest . exists ( ) ) && ( dest . isDirectory ( ) ) ) { throw new BuildException ( "The<seq2seq4repair_space>specified<seq2seq4repair_space>destination<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>directory" , getLocation ( ) ) ; } if ( ( dest . exists ( ) ) && ( ! ( dest . canWrite ( ) ) ) ) { throw new BuildException ( ( "Can't<seq2seq4repair_space>write<seq2seq4repair_space>to<seq2seq4repair_space>" + ( dest . getAbsolutePath ( ) ) ) , getLocation ( ) ) ; } if ( progress == null ) { progress = new Get . NullProgress ( ) ; } log ( ( "Getting:<seq2seq4repair_space>" + ( source ) ) , logLevel ) ; log ( ( "To:<seq2seq4repair_space>" + ( dest . getAbsolutePath ( ) ) ) , logLevel ) ; long timestamp = 0 ; boolean hasTimestamp = false ; if ( ( useTimestamp ) && ( dest . exists ( ) ) ) { timestamp = dest . lastModified ( ) ; if ( verbose ) { Date t = new Date ( timestamp ) ; log ( ( "local<seq2seq4repair_space>file<seq2seq4repair_space>date<seq2seq4repair_space>:<seq2seq4repair_space>" + ( t . toString ( ) ) ) , logLevel ) ; } hasTimestamp = true ; } URLConnection connection = source . openConnection ( ) ; if ( hasTimestamp ) { connection . setIfModifiedSince ( timestamp ) ; } if ( ( ( uname ) != null ) || ( ( pword ) != null ) ) { String up = ( ( uname ) + ":" ) + ( pword ) ; String encoding ; Get . Base64Converter encoder = new Get . Base64Converter ( ) ; encoding = encoder . encode ( up . getBytes ( ) ) ; connection . setRequestProperty ( "Authorization" , ( "Basic<seq2seq4repair_space>" + encoding ) ) ; } connection . connect ( ) ; if ( connection instanceof HttpURLConnection ) { HttpURLConnection httpConnection = ( ( HttpURLConnection ) ( connection ) ) ; long lastModified = httpConnection . getLastModified ( ) ; <START_BUG> if ( ( ( httpConnection . getResponseCode ( ) ) == ( HttpURLConnection . HTTP_NOT_MODIFIED ) ) || ( ( ( lastModified != 0 ) && hasTimestamp ) && ( timestamp > lastModified ) ) ) { <END_BUG> log ( "Not<seq2seq4repair_space>modified<seq2seq4repair_space>-<seq2seq4repair_space>so<seq2seq4repair_space>not<seq2seq4repair_space>downloaded" , logLevel ) ; return false ; } if ( ( httpConnection . getResponseCode ( ) ) == ( HttpURLConnection . HTTP_UNAUTHORIZED ) ) { String message = "HTTP<seq2seq4repair_space>Authorization<seq2seq4repair_space>failure" ; if ( ignoreErrors ) { log ( message , logLevel ) ; return false ; } else { throw new BuildException ( message ) ; } } } InputStream is = null ; for ( int i = 0 ; i < 3 ; i ++ ) { try { is = connection . getInputStream ( ) ; break ; } catch ( IOException ex ) { log ( ( "Error<seq2seq4repair_space>opening<seq2seq4repair_space>connection<seq2seq4repair_space>" + ex ) , logLevel ) ; } } if ( is == null ) { log ( ( ( ( "Can't<seq2seq4repair_space>get<seq2seq4repair_space>" + ( source ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( dest ) ) , logLevel ) ; if ( ignoreErrors ) { return false ; } throw new BuildException ( ( ( ( "Can't<seq2seq4repair_space>get<seq2seq4repair_space>" + ( source ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( dest ) ) , getLocation ( ) ) ; } FileOutputStream fos = new FileOutputStream ( dest ) ; progress . beginDownload ( ) ; boolean finished = false ; try { byte [ ] buffer = new byte [ 100 * 1024 ] ; int length ; while ( ( length = is . read ( buffer ) ) >= 0 ) { fos . write ( buffer , 0 , length ) ; progress . onTick ( ) ; } finished = true ; } finally { FileUtils . close ( fos ) ; FileUtils . close ( is ) ; if ( ! finished ) { dest . delete ( ) ; } } progress . endDownload ( ) ; if ( useTimestamp ) { long remoteTimestamp = connection . getLastModified ( ) ; if ( verbose ) { Date t = new Date ( remoteTimestamp ) ; log ( ( ( "last<seq2seq4repair_space>modified<seq2seq4repair_space>=<seq2seq4repair_space>" + ( t . toString ( ) ) ) + ( remoteTimestamp == 0 ? "<seq2seq4repair_space>-<seq2seq4repair_space>using<seq2seq4repair_space>current<seq2seq4repair_space>time<seq2seq4repair_space>instead" : "" ) ) , logLevel ) ; } if ( remoteTimestamp != 0 ) { Get . FILE_UTILS . setFileLastModified ( dest , remoteTimestamp ) ; } } return true ; } public void setSrc ( URL u ) { } public void setDest ( File dest ) { } public void setVerbose ( boolean v ) { } public void setIgnoreErrors ( boolean v ) { } public void setUseTimestamp ( boolean v ) { } public void setUsername ( String u ) { } public void setPassword ( String p ) { }

Fix:
if ( ( ( httpConnection . getResponseCode ( ) ) == ( HttpURLConnection . HTTP_NOT_MODIFIED ) ) || ( ( ( lastModified != 0 ) && hasTimestamp ) && ( timestamp >= lastModified ) ) ) {