Buggy code:
public static boolean equalArrays ( Object [ ] a , Object [ ] b , int len ) { } public static boolean equalArraysOrNull ( int [ ] a , int [ ] b ) { } public static boolean equalArraysOrNull ( Object [ ] a , Object [ ] b ) { } public static boolean equalArraysOrNullSortFirst ( Util . Comparable [ ] a , Util . Comparable [ ] b ) { } public static boolean equalArraysOrNullSortFirst ( String [ ] a , String [ ] b ) { } public static boolean equalOrNull ( Object a , Object b ) { } public static boolean equalsIgnoreJavaLikeExtension ( String fileName , String string ) { } public static String extractLastName ( String qualifiedName ) { } public static String [ ] extractParameterTypes ( char [ ] sig ) { } public static String extractReturnType ( String sig ) { } private static IFile findFirstClassFile ( IFolder folder ) { } public static String findLineSeparator ( char [ ] text ) { } public static IClassFileAttribute getAttribute ( IClassFileReader classFileReader , char [ ] attributeName ) { } public static IClassFileAttribute getAttribute ( ICodeAttribute codeAttribute , char [ ] attributeName ) { } public static IClassFileAttribute getAttribute ( IFieldInfo fieldInfo , char [ ] attributeName ) { } public static IClassFileAttribute getAttribute ( IMethodInfo methodInfo , char [ ] attributeName ) { } public static char [ ] [ ] getJavaLikeExtensions ( ) { } public static long getJdkLevel ( Object targetLibrary ) { } public static String getNameWithoutJavaLikeExtension ( String fileName ) { } public static String getLineSeparator ( String text , IJavaProject project ) { } private static String getLineSeparator ( char [ ] text , char [ ] buffer ) { } public static int getParameterCount ( char [ ] sig ) { } public static String getProblemArgumentsForMarker ( String [ ] arguments ) { } public static String [ ] getProblemArgumentsFromMarker ( String argumentsString ) { } public static byte [ ] getResourceContentsAsByteArray ( IFile file ) throws JavaModelException { } public static char [ ] getResourceContentsAsCharArray ( IFile file ) throws JavaModelException { } public static char [ ] getResourceContentsAsCharArray ( IFile file , String encoding ) throws JavaModelException { } public static String getSignature ( Type type ) { } public static String getDeclaringTypeSignature ( String key ) { } private static void getFullyQualifiedName ( Type type , StringBuffer buffer ) { } public static String [ ] getTrimmedSimpleNames ( String name ) { } public static int indexOfEnclosingPath ( IPath checkedPath , IPath [ ] paths , int pathCount ) { } public static int indexOfJavaLikeExtension ( String fileName ) { } public static int indexOfMatchingPath ( IPath checkedPath , IPath [ ] paths , int pathCount ) { } public static int indexOfNestedPath ( IPath checkedPath , IPath [ ] paths , int pathCount ) { } public static final boolean isExcluded ( IJavaElement element ) { } public static final boolean isExcluded ( IPath resourcePath , char [ ] [ ] inclusionPatterns , char [ ] [ ] exclusionPatterns , boolean isFolderPath ) { } public static final boolean isExcluded ( IResource resource , char [ ] [ ] inclusionPatterns , char [ ] [ ] exclusionPatterns ) { } public static boolean isValidClassFileName ( String name ) { } public static boolean isValidCompilationUnitName ( String name ) { } public static boolean isValidFolderNameForPackage ( String folderName ) { } public static boolean isValidMethodSignature ( String sig ) { } public static boolean isValidTypeSignature ( String sig , boolean allowVoid ) { } public static String localTypeName ( String binaryTypeName , int lastDollar , int end ) { } public static void log ( Throwable e , String message ) { } public static ClassFileReader newClassFileReader ( IResource resource ) throws IOException , CoreException , ClassFormatException { InputStream in = null ; try { <START_BUG> in = ( ( IFile ) ( resource ) ) . getContents ( ) ; <END_BUG> return ClassFileReader . read ( in , resource . getFullPath ( ) . toString ( ) ) ; } finally { if ( in != null ) in . close ( ) ; } } public static char [ ] normalizeCRs ( char [ ] text , char [ ] buffer ) { } public static String normalizeCRs ( String text , String buffer ) { } public static String packageName ( IPath pkgPath ) { } public static int prefixLength ( char [ ] s1 , char [ ] s2 ) { } public static int prefixLength ( String s1 , String s2 ) { } private static void quickSort ( char [ ] [ ] list , int left , int right ) { } private static void quickSort ( Util . Comparable [ ] sortedCollection , int left , int right ) { } private static void quickSort ( int [ ] list , int left , int right ) { } private static void quickSort ( Object [ ] sortedCollection , int left , int right , Util . Comparer comparer ) { } private static void quickSort ( Object [ ] sortedCollection , int left , int right , int [ ] sortOrder ) { } private static void quickSort ( String [ ] sortedCollection , int left , int right ) { } private static void quickSortReverse ( String [ ] sortedCollection , int left , int right ) { } public static final char [ ] readUTF ( DataInput in ) throws IOException { } public static String relativePath ( IPath fullPath , int skipSegmentCount ) { } public static void resetJavaLikeExtensions ( ) { } public static final String [ ] splitOn ( char divider , String string , int start , int end ) { } public static boolean isReadOnly ( IResource resource ) { } public static void setReadOnly ( IResource resource , boolean readOnly ) { }

Fix:
in = ( ( IFile ) ( resource ) ) . getContents ( true ) ;