Buggy code:
; public static final int MAX_LEVELS_OF_SYMLINKS = 5 ; public static final String DOES_NOT_EXIST_POSTFIX = "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist." ; private static final FileUtils FILE_UTILS = FileUtils . getFileUtils ( ) ; private static final SymbolicLinkUtils SYMLINK_UTILS = SymbolicLinkUtils . getSymbolicLinkUtils ( ) ; private static Set defaultExcludes = new HashSet ( ) ; protected File basedir ; protected String [ ] includes ; protected String [ ] excludes ; protected FileSelector [ ] selectors = null ; protected Vector filesIncluded ; protected Vector filesNotIncluded ; protected Vector filesExcluded ; protected Vector dirsIncluded ; protected Vector dirsNotIncluded ; protected Vector dirsExcluded ; protected Vector filesDeselected ; protected Vector dirsDeselected ; protected boolean haveSlowResults = false ; protected boolean isCaseSensitive = true ; protected boolean errorOnMissingDir = true ; private boolean followSymlinks = true ; protected boolean everythingIncluded = true ; private Set scannedDirs = new HashSet ( ) ; private Map includeNonPatterns = new HashMap ( ) ; private Map excludeNonPatterns = new HashMap ( ) ; private TokenizedPattern [ ] includePatterns ; private TokenizedPattern [ ] excludePatterns ; private boolean areNonPatternSetsReady = false ; private boolean scanning = false ; private Object scanLock = new Object ( ) ; private boolean slowScanning = false ; private Object slowScanLock = new Object ( ) ; private IllegalStateException illegal = null ; private int maxLevelsOfSymlinks = DirectoryScanner . MAX_LEVELS_OF_SYMLINKS ; private Set notFollowedSymlinks = new HashSet ( ) ; public DirectoryScanner ( ) { } protected static boolean matchPatternStart ( String pattern , String str ) { } protected static boolean matchPatternStart ( String pattern , String str , boolean isCaseSensitive ) { } protected static boolean matchPath ( String pattern , String str ) { } protected static boolean matchPath ( String pattern , String str , boolean isCaseSensitive ) { } public static boolean match ( String pattern , String str ) { } protected static boolean match ( String pattern , String str , boolean isCaseSensitive ) { } public static String [ ] getDefaultExcludes ( ) { } public static boolean addDefaultExclude ( String s ) { } public static boolean removeDefaultExclude ( String s ) { } public static void resetDefaultExcludes ( ) { } public void setBasedir ( String basedir ) { } public synchronized void setBasedir ( File basedir ) { } public synchronized File getBasedir ( ) { } public synchronized boolean isCaseSensitive ( ) { } public synchronized void setCaseSensitive ( boolean isCaseSensitive ) { } public void setErrorOnMissingDir ( boolean errorOnMissingDir ) { } public synchronized boolean isFollowSymlinks ( ) { } public synchronized void setFollowSymlinks ( boolean followSymlinks ) { } public void setMaxLevelsOfSymlinks ( int max ) { } public synchronized void setIncludes ( String [ ] includes ) { } public synchronized void setExcludes ( String [ ] excludes ) { } public synchronized void addExcludes ( String [ ] excludes ) { } private static String normalizePattern ( String p ) { } public synchronized void setSelectors ( FileSelector [ ] selectors ) { } public synchronized boolean isEverythingIncluded ( ) { } public void scan ( ) throws IllegalStateException { } private void checkIncludePatterns ( ) { } private boolean shouldSkipPattern ( String pattern ) { } protected synchronized void clearResults ( ) { } protected void slowScan ( ) { } private void processSlowScan ( String [ ] arr ) { for ( int i = 0 ; i < ( arr . length ) ; i ++ ) { TokenizedPath path = new TokenizedPath ( arr [ i ] ) ; <START_BUG> if ( ! ( couldHoldIncluded ( path ) ) ) { <END_BUG> scandir ( new File ( basedir , arr [ i ] ) , path , false ) ; } } } protected void scandir ( File dir , String vpath , boolean fast ) { } private void scandir ( File dir , TokenizedPath path , boolean fast ) { } private void scandir ( File dir , TokenizedPath path , boolean fast , String [ ] newfiles , LinkedList directoryNamesFollowed ) { } private void accountForIncludedFile ( TokenizedPath name , File file ) { } private void accountForIncludedDir ( TokenizedPath name , File file , boolean fast ) { } private void accountForIncludedDir ( TokenizedPath name , File file , boolean fast , String [ ] children , LinkedList directoryNamesFollowed ) { } private void processIncluded ( TokenizedPath path , File file , Vector inc , Vector exc , Vector des ) { } protected boolean isIncluded ( String name ) { } private boolean isIncluded ( TokenizedPath path ) { } protected boolean couldHoldIncluded ( String name ) { } private boolean couldHoldIncluded ( TokenizedPath tokenizedName ) { } private boolean couldHoldIncluded ( TokenizedPath tokenizedName , TokenizedPattern tokenizedInclude ) { } private boolean isDeeper ( TokenizedPattern pattern , TokenizedPath name ) { } private boolean isMorePowerfulThanExcludes ( String name ) { } private boolean contentsExcluded ( TokenizedPath path ) { } protected boolean isExcluded ( String name ) { } private boolean isExcluded ( TokenizedPath name ) { } protected boolean isSelected ( String name , File file ) { } public String [ ] getIncludedFiles ( ) { } public synchronized int getIncludedFilesCount ( ) { } public synchronized String [ ] getNotIncludedFiles ( ) { } public synchronized String [ ] getExcludedFiles ( ) { } public synchronized String [ ] getDeselectedFiles ( ) { } public String [ ] getIncludedDirectories ( ) { } public synchronized int getIncludedDirsCount ( ) { } public synchronized String [ ] getNotIncludedDirectories ( ) { } public synchronized String [ ] getExcludedDirectories ( ) { } public synchronized String [ ] getDeselectedDirectories ( ) { } public synchronized String [ ] getNotFollowedSymlinks ( ) { } public synchronized void addDefaultExcludes ( ) { } public synchronized Resource getResource ( String name ) { }

Fix:
if ( ( ! ( couldHoldIncluded ( path ) ) ) || ( contentsExcluded ( path ) ) ) {