Buggy code:
public class Util { public static String LINE_SEPARATOR = System . getProperty ( "line.separator" ) ; public static char [ ] LINE_SEPARATOR_CHARS = Util . LINE_SEPARATOR . toCharArray ( ) ; public static final char [ ] SUFFIX_class = ".class" . toCharArray ( ) ; public static final char [ ] SUFFIX_CLASS = ".CLASS" . toCharArray ( ) ; public static final char [ ] SUFFIX_java = ".java" . toCharArray ( ) ; public static final char [ ] SUFFIX_JAVA = ".JAVA" . toCharArray ( ) ; public static final char [ ] SUFFIX_jar = ".jar" . toCharArray ( ) ; public static final char [ ] SUFFIX_JAR = ".JAR" . toCharArray ( ) ; public static final char [ ] SUFFIX_zip = ".zip" . toCharArray ( ) ; public static final char [ ] SUFFIX_ZIP = ".ZIP" . toCharArray ( ) ; private static final char [ ] DOUBLE_QUOTES = "''" . toCharArray ( ) ; private static final char [ ] SINGLE_QUOTE = "'" . toCharArray ( ) ; protected static ResourceBundle bundle ; private static final String bundleName = "org.eclipse.jdt.internal.compiler.util.messages" ; public static String bind ( String id , String binding1 , String binding2 ) { } public static String bind ( String id , String binding ) { } public static String bind ( String id , String [ ] bindings ) { } public static String bind ( String id ) { } public static void relocalize ( ) { } public static char [ ] bytesToChar ( byte [ ] bytes , String encoding ) throws IOException { } public static byte [ ] getFileByteContent ( File file ) throws IOException { } public static char [ ] getFileCharContent ( File file , String encoding ) throws IOException { } public static byte [ ] getInputStreamAsByteArray ( InputStream stream , int length ) throws IOException { } public static char [ ] getInputStreamAsCharArray ( InputStream stream , int length , String encoding ) throws IOException { InputStreamReader reader = null ; reader = ( encoding == null ) ? new InputStreamReader ( stream ) : new InputStreamReader ( stream , encoding ) ; char [ ] contents ; if ( length == ( - 1 ) ) { <START_BUG> contents = new char [ 0 ] ; <END_BUG> int contentsLength = 0 ; int charsRead = - 1 ; do { int available = stream . available ( ) ; if ( ( contentsLength + available ) > ( contents . length ) ) { System . arraycopy ( contents , 0 , ( contents = new char [ contentsLength + available ] ) , 0 , contentsLength ) ; } charsRead = reader . read ( contents , contentsLength , available ) ; if ( charsRead > 0 ) { contentsLength += charsRead ; } } while ( charsRead > 0 ) ; if ( contentsLength < ( contents . length ) ) { System . arraycopy ( contents , 0 , ( contents = new char [ contentsLength ] ) , 0 , contentsLength ) ; } } else { contents = new char [ length ] ; int len = 0 ; int readSize = 0 ; while ( ( readSize != ( - 1 ) ) && ( len != length ) ) { len += readSize ; readSize = reader . read ( contents , len , ( length - len ) ) ; } if ( len != length ) System . arraycopy ( contents , 0 , ( contents = new char [ len ] ) , 0 , len ) ; } return contents ; } public static byte [ ] getZipEntryByteContent ( ZipEntry ze , ZipFile zip ) throws IOException { } public static final boolean isArchiveFileName ( String name ) { } public static final boolean isClassFileName ( String name ) { } public static final boolean isJavaFileName ( String name ) { } }

Fix:
contents = CharOperation . NO_CHAR ;