Buggy code:
public class Checksum extends MatchingTask implements Condition { private File file = null ; private String algorithm = "MD5" ; private String provider = null ; private Vector filesets = new Vector ( ) ; private Hashtable includeFileMap = new Hashtable ( ) ; private String fileext ; private boolean forceOverwrite ; private boolean isCondition ; private MessageDigest messageDigest ; private String property ; private String verifyProperty ; public void setAlgorithm ( String algorithm ) { } public void setFile ( File file ) { } public void setFileext ( String fileext ) { } public void setForceOverwrite ( boolean forceOverwrite ) { } public void setProperty ( String property ) { } public void setProvider ( String provider ) { } public void setVerifyproperty ( String verifyProperty ) { } public void addFileset ( FileSet set ) { } public boolean eval ( ) throws TaskException { } public void execute ( ) throws TaskException { } private void addToIncludeFileMap ( File file ) throws TaskException { } private boolean generateChecksums ( ) throws TaskException { boolean checksumMatches = true ; FileInputStream fis = null ; FileOutputStream fos = null ; try { for ( Enumeration e = includeFileMap . keys ( ) ; e . hasMoreElements ( ) ; ) { messageDigest . reset ( ) ; File src = ( ( File ) ( e . nextElement ( ) ) ) ; if ( ! ( isCondition ) ) { getLogger ( ) . info ( ( ( ( "Calculating<seq2seq4repair_space>" + ( algorithm ) ) + "<seq2seq4repair_space>checksum<seq2seq4repair_space>for<seq2seq4repair_space>" ) + src ) ) ; } fis = new FileInputStream ( src ) ; DigestInputStream dis = new DigestInputStream ( fis , messageDigest ) ; while ( ( dis . read ( ) ) != ( - 1 ) ) ; dis . close ( ) ; fis . close ( ) ; fis = null ; byte [ ] fileDigest = messageDigest . digest ( ) ; String checksum = "" ; for ( int i = 0 ; i < ( fileDigest . length ) ; i ++ ) { String hexStr = Integer . toHexString ( ( 255 & ( fileDigest [ i ] ) ) ) ; if ( ( hexStr . length ( ) ) < 2 ) { checksum += "0" ; } checksum += hexStr ; } Object destination = includeFileMap . get ( src ) ; if ( destination instanceof String ) { String prop = ( ( String ) ( destination ) ) ; if ( isCondition ) { checksumMatches = checksum . equals ( property ) ; } else { <START_BUG> project . setProperty ( prop , checksum ) ; <END_BUG> } } else if ( destination instanceof File ) { if ( isCondition ) { File existingFile = ( ( File ) ( destination ) ) ; if ( ( existingFile . exists ( ) ) && ( ( existingFile . length ( ) ) == ( checksum . length ( ) ) ) ) { fis = new FileInputStream ( existingFile ) ; InputStreamReader isr = new InputStreamReader ( fis ) ; BufferedReader br = new BufferedReader ( isr ) ; String suppliedChecksum = br . readLine ( ) ; fis . close ( ) ; fis = null ; br . close ( ) ; isr . close ( ) ; checksumMatches = checksum . equals ( suppliedChecksum ) ; } else { checksumMatches = false ; } } else { File dest = ( ( File ) ( destination ) ) ; fos = new FileOutputStream ( dest ) ; fos . write ( checksum . getBytes ( ) ) ; fos . close ( ) ; fos = null ; } } } } catch ( Exception e ) { throw new TaskException ( "Error" , e ) ; } finally { if ( fis != null ) { try { fis . close ( ) ; } catch ( IOException e ) { } } if ( fos != null ) { try { fos . close ( ) ; } catch ( IOException e ) { } } } return checksumMatches ; } private boolean validateAndExecute ( ) throws TaskException { } }

Fix:
setProperty ( prop , checksum ) ;