Buggy code:
public class FileUtil { public static final String DEFAULT_URL_FILENAME = "index.html" ; public static void main ( String [ ] args ) { } public static Diffs dirDiffs ( final String label , final File dir , final long startTime , final String requiredSuffix , final String [ ] expectedPaths , final boolean acceptFilePrefix ) { LangUtil . throwIaxIfNull ( dir , "dir" ) ; final boolean checkExpected = ! ( LangUtil . isEmpty ( expectedPaths ) ) ; final ArrayList expected = ( ! checkExpected ) ? null : new ArrayList ( ) ; if ( checkExpected ) { for ( int i = 0 ; i < ( expectedPaths . length ) ; i ++ ) { String srcPath = expectedPaths [ i ] ; if ( ! ( LangUtil . isEmpty ( srcPath ) ) ) { expected . add ( org . aspectj . util . FileUtil . weakNormalize ( srcPath ) ) ; } } } FileFilter touchedCollector = new FileFilter ( ) { public boolean accept ( File file ) { if ( ( file . isFile ( ) ) && ( ( 0 > startTime ) || ( startTime < ( file . lastModified ( ) ) ) ) ) { String path = file . getPath ( ) ; if ( ( null == requiredSuffix ) || ( path . endsWith ( requiredSuffix ) ) ) { path = org . aspectj . util . FileUtil . weakNormalize ( path ) ; if ( checkExpected ) { if ( ! acceptFilePrefix ) { if ( expected . contains ( path ) ) { expected . remove ( path ) ; return false ; } } else { for ( Iterator iter = expected . iterator ( ) ; iter . hasNext ( ) ; ) { String exp = ( ( String ) ( iter . next ( ) ) ) ; if ( path . startsWith ( exp ) ) { String suffix = path . substring ( exp . length ( ) ) ; if ( ( - 1 ) == ( suffix . indexOf ( "//" ) ) ) { expected . remove ( path ) ; return false ; } } } } } return true ; } } return false ; } } ; ArrayList unexp = new ArrayList ( ) ; unexp . addAll ( Arrays . asList ( dir . listFiles ( touchedCollector ) ) ) ; <START_BUG> return new Diffs ( label , expected , unexp , String . CASE_INSENSITIVE_ORDER ) ; <END_BUG> } public static void visitZipEntries ( ZipFile zipfile , StringVisitor visitor ) { } public static void visitZipEntries ( ZipFile zipfile , StringVisitor visitor , StringBuffer errs ) { } public static void descendFileTree ( File file , FileFilter filter ) { } public static boolean descendFileTree ( File file , FileFilter fileFilter , boolean userRecursion ) { } public static Collection directoryToString ( File dir , Collection results ) { } public static Collection zipFileToString ( final File zipfile , Collection results ) { } public static boolean isZipFile ( File f ) { } public static String renderZipEntry ( File zipfile , ZipEntry entry ) { } public static boolean createJarFile ( File jarFile , File directory , String mainClass , FileFilter filter ) { } protected static Manifest createManifest ( String mainClass ) { } protected static void addFileToZip ( File in , File parent , ZipOutputStream out ) throws IOException { } public static void returnTempDir ( File dir ) { } public static boolean isResourcePath ( String path ) { } public static void render ( Throwable t , StringBuffer err ) { } private static boolean report ( StringBuffer err , String context , String status , Throwable throwable ) { } public static boolean copyFile ( File src , File dest , StringBuffer err ) { } public static boolean copyURL ( URL url , File dest , StringBuffer err ) { } public static boolean copy ( InputStream src , OutputStream dest , boolean close ) throws IOException { } protected static boolean deleteDirectory ( File dir ) { } public static String [ ] getPaths ( File [ ] files ) { } protected static final FileFilter DELETE_DIRS = new FileFilter ( ) { public boolean accept ( File file ) { } } ; protected static final FileFilter DELETE_FILES = new FileFilter ( ) { public boolean accept ( File file ) { } } ; }

Fix:
return Diffs . makeDiffs ( label , expected , unexp , String . CASE_INSENSITIVE_ORDER ) ;