Buggy code:
public static Iterator < File > iterateFiles ( final File directory , final IOFileFilter fileFilter , final IOFileFilter dirFilter ) { } public static Iterator < File > iterateFilesAndDirs ( final File directory , final IOFileFilter fileFilter , final IOFileFilter dirFilter ) { } private static String [ ] toSuffixes ( final String [ ] extensions ) { } public static Collection < File > listFiles ( final File directory , final String [ ] extensions , final boolean recursive ) { } public static Iterator < File > iterateFiles ( final File directory , final String [ ] extensions , final boolean recursive ) { } public static boolean contentEquals ( final File file1 , final File file2 ) throws IOException { } public static boolean contentEqualsIgnoreEOL ( final File file1 , final File file2 , final String charsetName ) throws IOException { } public static File toFile ( final URL url ) { } static String decodeUrl ( final String url ) { } public static File [ ] toFiles ( final URL [ ] urls ) { } public static URL [ ] toURLs ( final File [ ] files ) throws IOException { } public static void copyFileToDirectory ( final File srcFile , final File destDir ) throws IOException { } public static void copyFileToDirectory ( final File srcFile , final File destDir , final boolean preserveFileDate ) throws IOException { } public static void copyFile ( final File srcFile , final File destFile ) throws IOException { } public static void copyFile ( final File srcFile , final File destFile , final boolean preserveFileDate ) throws IOException { } public static long copyFile ( final File input , final OutputStream output ) throws IOException { } private static void doCopyFile ( final File srcFile , final File destFile , final boolean preserveFileDate ) throws IOException { } public static void copyDirectoryToDirectory ( final File srcDir , final File destDir ) throws IOException { } public static void copyDirectory ( final File srcDir , final File destDir ) throws IOException { } public static void copyDirectory ( final File srcDir , final File destDir , final boolean preserveFileDate ) throws IOException { } public static void copyDirectory ( final File srcDir , final File destDir , final FileFilter filter ) throws IOException { } public static void copyDirectory ( final File srcDir , final File destDir , final FileFilter filter , final boolean preserveFileDate ) throws IOException { } private static void doCopyDirectory ( final File srcDir , final File destDir , final FileFilter filter , final boolean preserveFileDate , final List < String > exclusionList ) throws IOException { } public static void copyURLToFile ( final URL source , final File destination ) throws IOException { } public static void copyURLToFile ( final URL source , final File destination , final int connectionTimeout , final int readTimeout ) throws IOException { } public static void copyInputStreamToFile ( final InputStream source , final File destination ) throws IOException { } public static void copyToFile ( final InputStream source , final File destination ) throws IOException { } public static void deleteDirectory ( final File directory ) throws IOException { } public static boolean deleteQuietly ( final File file ) { } public static boolean directoryContains ( final File directory , final File child ) throws IOException { } public static void cleanDirectory ( final File directory ) throws IOException { } public static boolean waitFor ( final File file , final int seconds ) { } public static String readFileToString ( final File file , final Charset encoding ) throws IOException { } public static String readFileToString ( final File file , final String encoding ) throws IOException { } @ Deprecated public static String readFileToString ( final File file ) throws IOException { } public static byte [ ] readFileToByteArray ( final File file ) throws IOException { InputStream in = null ; try { in = FileUtils . openInputStream ( file ) ; <START_BUG> return IOUtils . toByteArray ( in , file . length ( ) ) ; <END_BUG> } finally { IOUtils . closeQuietly ( in ) ; } } public static List < String > readLines ( final File file , final Charset encoding ) throws IOException { } public static List < String > readLines ( final File file , final String encoding ) throws IOException { } @ Deprecated public static List < String > readLines ( final File file ) throws IOException { } public static LineIterator lineIterator ( final File file , final String encoding ) throws IOException { } public static LineIterator lineIterator ( final File file ) throws IOException { } public static void writeStringToFile ( final File file , final String data , final Charset encoding ) throws IOException { } public static void writeStringToFile ( final File file , final String data , final String encoding ) throws IOException { } public static void writeStringToFile ( final File file , final String data , final Charset encoding , final boolean append ) throws IOException { } public static void writeStringToFile ( final File file , final String data , final String encoding , final boolean append ) throws IOException { } @ Deprecated public static void writeStringToFile ( final File file , final String data ) throws IOException { } @ Deprecated public static void writeStringToFile ( final File file , final String data , final boolean append ) throws IOException { } @ Deprecated public static void write ( final File file , final CharSequence data ) throws IOException { } @ Deprecated public static void write ( final File file , final CharSequence data , final boolean append ) throws IOException { } public static void write ( final File file , final CharSequence data , final Charset encoding ) throws IOException { }

Fix:
return IOUtils . toByteArray ( in ) ;