Buggy code:
public class Zip extends MatchingTask { private static final long EMPTY_CRC = new CRC32 ( ) . getValue ( ) ; private boolean m_compress = true ; private boolean m_update ; private boolean m_filesonly ; protected String m_archiveType = "zip" ; protected String m_emptyBehavior = "skip" ; private ArrayList m_filesets = new ArrayList ( ) ; protected Hashtable m_addedDirs = new Hashtable ( ) ; private ArrayList m_addedFiles = new ArrayList ( ) ; protected File m_file ; private boolean m_addingNewFiles ; private File m_baseDir ; private String m_encoding ; private static String [ ] [ ] grabFileNames ( final FileScanner [ ] scanners ) throws TaskException { } private static File [ ] grabFiles ( final FileScanner [ ] scanners , final String [ ] [ ] filenames ) { } public void setBasedir ( final File baseDir ) { } public void setCompress ( final boolean compress ) { } public void setEncoding ( final String encoding ) { } public void setFile ( final File file ) { } public void setFilesonly ( final boolean filesonly ) { } public void setUpdate ( final boolean update ) { } public void setWhenempty ( final WhenEmpty we ) { } protected final boolean isInUpdateMode ( ) { } public void addFileset ( final FileSet set ) { } public void addZipfileset ( final ZipFileSet set ) { } public void execute ( ) throws TaskException { } private DirectoryScanner getScanner ( final FileSet fileSet ) throws TaskException { } protected void addFileAs ( final File file , final String name ) throws TaskException { } protected final boolean isAddingNewFiles ( ) { } protected boolean isUpToDate ( FileScanner [ ] scanners , File zipFile ) throws TaskException { String [ ] [ ] fileNames = Zip . grabFileNames ( scanners ) ; File [ ] files = Zip . grabFiles ( scanners , fileNames ) ; if ( ( files . length ) == 0 ) { if ( m_emptyBehavior . equals ( "skip" ) ) { final String message = ( ( ( "Warning:<seq2seq4repair_space>skipping<seq2seq4repair_space>" + ( m_archiveType ) ) + "<seq2seq4repair_space>archive<seq2seq4repair_space>" ) + zipFile ) + "<seq2seq4repair_space>because<seq2seq4repair_space>no<seq2seq4repair_space>files<seq2seq4repair_space>were<seq2seq4repair_space>included." ; getLogger ( ) . warn ( message ) ; return true ; } else if ( m_emptyBehavior . equals ( "fail" ) ) { throw new TaskException ( ( ( ( ( "Cannot<seq2seq4repair_space>create<seq2seq4repair_space>" + ( m_archiveType ) ) + "<seq2seq4repair_space>archive<seq2seq4repair_space>" ) + zipFile ) + ":<seq2seq4repair_space>no<seq2seq4repair_space>files<seq2seq4repair_space>were<seq2seq4repair_space>included." ) ) ; } else { return createEmptyZip ( zipFile ) ; } } else { for ( int i = 0 ; i < ( files . length ) ; ++ i ) { if ( files [ i ] . equals ( zipFile ) ) { throw new TaskException ( "A<seq2seq4repair_space>zip<seq2seq4repair_space>file<seq2seq4repair_space>cannot<seq2seq4repair_space>include<seq2seq4repair_space>itself" ) ; } } if ( ! ( zipFile . exists ( ) ) ) { return false ; } final SourceFileScanner scanner = new SourceFileScanner ( ) ; setupLogger ( scanner ) ; MergingMapper mm = new MergingMapper ( ) ; mm . setTo ( zipFile . getAbsolutePath ( ) ) ; for ( int i = 0 ; i < ( scanners . length ) ; i ++ ) { <START_BUG> if ( ( scanner . restrict ( fileNames [ i ] , scanners [ i ] . getBasedir ( ) , null , mm ) . length ) > 0 ) { <END_BUG> return false ; } } return true ; } } protected void addFiles ( FileScanner scanner , ZipOutputStream zOut , String prefix , String fullpath ) throws IOException , TaskException { } private String getName ( final String dir ) { } protected void addFiles ( ArrayList filesets , ZipOutputStream zOut ) throws IOException , TaskException { } private String getPrefix ( final String prefix ) { } protected void addParentDirs ( File baseDir , String entry , ZipOutputStream zOut , String prefix ) throws IOException { } protected void addZipEntries ( ZipFileSet fs , DirectoryScanner ds , ZipOutputStream zOut , String prefix , String fullpath ) throws IOException , TaskException { } protected boolean createEmptyZip ( File zipFile ) throws TaskException { } protected void finalizeZipOutputStream ( ZipOutputStream zOut ) throws IOException , TaskException { } protected void initZipOutputStream ( ZipOutputStream zOut ) throws IOException , TaskException { } protected void zipDir ( File dir , ZipOutputStream zOut , String vPath ) throws IOException { } protected void zipFile ( final InputStream input , final ZipOutputStream output , final String path , final long lastModified ) throws IOException , TaskException { } protected void zipFile ( final File file , final ZipOutputStream zOut , final String vPath ) throws IOException , TaskException { } }

Fix:
if ( ( scanner . restrict ( fileNames [ i ] , scanners [ i ] . getBasedir ( ) , null , mm , getContext ( ) ) . length ) > 0 ) {