Buggy code:
public class Tar extends MatchingTask { public static final String WARN = "warn" ; public static final String FAIL = "fail" ; public static final String TRUNCATE = "truncate" ; public static final String GNU = "gnu" ; public static final String OMIT = "omit" ; File tarFile ; File baseDir ; private Tar . TarLongFileMode longFileMode = new Tar . TarLongFileMode ( ) ; Vector filesets = new Vector ( ) ; private Vector resourceCollections = new Vector ( ) ; Vector fileSetFiles = new Vector ( ) ; private boolean longWarningGiven = false ; private Tar . TarCompressionMethod compression = new Tar . TarCompressionMethod ( ) ; public Tar . TarFileSet createTarFileSet ( ) { } public void add ( ResourceCollection res ) { } public void setTarfile ( File tarFile ) { } public void setDestFile ( File destFile ) { } public void setBasedir ( File baseDir ) { } public void setLongfile ( String mode ) { } public void setLongfile ( Tar . TarLongFileMode mode ) { } public void setCompression ( Tar . TarCompressionMethod mode ) { } public void execute ( ) throws BuildException { } protected void tarFile ( File file , TarOutputStream tOut , String vPath , Tar . TarFileSet tarFileSet ) throws IOException { } protected void tarResource ( Resource r , TarOutputStream tOut , String vPath , Tar . TarFileSet tarFileSet ) throws IOException { } protected boolean archiveIsUpToDate ( String [ ] files ) { } protected boolean archiveIsUpToDate ( String [ ] files , File dir ) { } protected boolean archiveIsUpToDate ( Resource r ) { } protected boolean supportsNonFileResources ( ) { } protected boolean check ( ResourceCollection rc ) { boolean upToDate = true ; if ( Tar . isFileFileSet ( rc ) ) { FileSet fs = ( ( FileSet ) ( rc ) ) ; upToDate = check ( fs . getDir ( getProject ( ) ) , Tar . getFileNames ( fs ) ) ; } else if ( ( ! ( rc . isFilesystemOnly ( ) ) ) && ( ! ( supportsNonFileResources ( ) ) ) ) { throw new BuildException ( "only<seq2seq4repair_space>filesystem<seq2seq4repair_space>resources<seq2seq4repair_space>are<seq2seq4repair_space>supported" ) ; } else if ( rc . isFilesystemOnly ( ) ) { HashSet basedirs = new HashSet ( ) ; HashMap basedirToFilesMap = new HashMap ( ) ; Iterator iter = rc . iterator ( ) ; while ( iter . hasNext ( ) ) { FileResource r = ( ( FileResource ) ( iter . next ( ) ) ) ; File base = r . getBaseDir ( ) ; if ( base == null ) { base = Copy . NULL_FILE_PLACEHOLDER ; } basedirs . add ( base ) ; Vector files = ( ( Vector ) ( basedirToFilesMap . get ( base ) ) ) ; if ( files == null ) { files = new Vector ( ) ; basedirToFilesMap . put ( base , new Vector ( ) ) ; } files . add ( r . getName ( ) ) ; } iter = basedirs . iterator ( ) ; while ( iter . hasNext ( ) ) { File base = ( ( File ) ( iter . next ( ) ) ) ; Vector f = ( ( Vector ) ( basedirToFilesMap . get ( base ) ) ) ; String [ ] files = ( ( String [ ] ) ( f . toArray ( new String [ f . size ( ) ] ) ) ) ; upToDate &= check ( ( base == ( Copy . NULL_FILE_PLACEHOLDER ) ? null : base ) , files ) ; } } else { Iterator iter = rc . iterator ( ) ; while ( upToDate && ( iter . hasNext ( ) ) ) { Resource r = ( ( Resource ) ( iter . next ( ) ) ) ; <START_BUG> upToDate &= archiveIsUpToDate ( r ) ; <END_BUG> } } return upToDate ; } protected boolean check ( File basedir , String [ ] files ) { } protected void tar ( ResourceCollection rc , TarOutputStream tOut ) throws IOException { } protected static final boolean isFileFileSet ( ResourceCollection rc ) { } protected static final String [ ] getFileNames ( FileSet fs ) { } protected Tar . TarFileSet asTarFileSet ( ArchiveFileSet archiveFileSet ) { } public static class TarFileSet extends org . apache . tools . ant . types . TarFileSet { private String [ ] files = null ; private boolean preserveLeadingSlashes = false ; public TarFileSet ( FileSet fileset ) { } public TarFileSet ( ) { } public String [ ] getFiles ( Project p ) { } public void setMode ( String octalString ) { } public int getMode ( ) { } public void setPreserveLeadingSlashes ( boolean b ) { } public boolean getPreserveLeadingSlashes ( ) { } } public static class TarLongFileMode extends EnumeratedAttribute { public static final String WARN = "warn" ; public static final String FAIL = "fail" ; public static final String TRUNCATE = "truncate" ; public static final String GNU = "gnu" ; public static final String OMIT = "omit" ; private final String [ ] validModes = new String [ ] { Tar . TarLongFileMode . WARN , Tar . TarLongFileMode . FAIL , Tar . TarLongFileMode . TRUNCATE , Tar . TarLongFileMode . GNU , Tar . TarLongFileMode . OMIT } ; public TarLongFileMode ( ) { } public String [ ] getValues ( ) { } public boolean isTruncateMode ( ) { } public boolean isWarnMode ( ) { } public boolean isGnuMode ( ) { } public boolean isFailMode ( ) { } public boolean isOmitMode ( ) { } } public static final class TarCompressionMethod extends EnumeratedAttribute { private static final String NONE = "none" ; private static final String GZIP = "gzip" ; private static final String BZIP2 = "bzip2" ;

Fix:
upToDate = archiveIsUpToDate ( r ) ;