Buggy code:
public abstract class Record implements Cloneable , Comparable { protected Name name ; protected int type ; protected int dclass ; protected long ttl ; private boolean empty ; private static final Record [ ] knownRecords = new Record [ 256 ] ; private static final Class [ ] emptyClassArray = new Class [ 0 ] ; private static final Object [ ] emptyObjectArray = new Object [ 0 ] ; private static final DecimalFormat byteFormat = new DecimalFormat ( ) ; protected Record ( ) { } Record ( Name name , int type , int dclass , long ttl ) { } private static final Record getTypedObject ( int type ) { } abstract Record rrFromWire ( Name name , int type , int dclass , long ttl , int length , DataByteInputStream in ) throws IOException { } private static Record newRecord ( Name name , int type , int dclass , long ttl , int length , DataByteInputStream in ) throws IOException { } public static Record newRecord ( Name name , int type , int dclass , long ttl , int length , byte [ ] data ) { } public static Record newRecord ( Name name , int type , int dclass , long ttl , byte [ ] data ) { } public static Record newRecord ( Name name , int type , int dclass , long ttl ) { } public static Record newRecord ( Name name , int type , int dclass ) { } static Record fromWire ( DataByteInputStream in , int section ) throws IOException { } public static Record fromWire ( byte [ ] b , int section ) throws IOException { } void toWire ( DataByteOutputStream out , int section , Compression c ) { } public byte [ ] toWire ( int section ) { } private void toWireCanonical ( DataByteOutputStream out , boolean noTTL ) { } private byte [ ] toWireCanonical ( boolean noTTL ) { } public byte [ ] toWireCanonical ( ) { } public byte [ ] rdataToWireCanonical ( ) { } public abstract String rdataToString ( ) { } public String toString ( ) { } abstract Record rdataFromString ( Name name , int dclass , long ttl , Tokenizer st , Name origin ) throws IOException { } protected static byte [ ] byteArrayFromString ( String s ) throws TextParseException { } protected static String byteArrayToString ( byte [ ] array , boolean quote ) { } public static Record fromString ( Name name , int type , int dclass , long ttl , Tokenizer st , Name origin ) throws IOException { } public static Record fromString ( Name name , int type , int dclass , long ttl , String s , Name origin ) throws IOException { } public Name getName ( ) { } public int getType ( ) { } public int getRRsetType ( ) { if ( ( ( type ) == ( SIG ) ) || ( ( type ) == ( RRSIG ) ) ) { <START_BUG> SIGRecord sig = ( ( SIGBase ) ( this ) ) ; <END_BUG> return sig . getTypeCovered ( ) ; } return type ; } public int getDClass ( ) { } public long getTTL ( ) { } abstract void rrToWire ( DataByteOutputStream out , Compression c , boolean canonical ) { } public boolean equals ( Object arg ) { } public int hashCode ( ) { } private Record cloneRecord ( ) { } public Record withName ( Name name ) { } Record withDClass ( int dclass , long ttl ) { } public int compareTo ( Object o ) { } public Name getAdditionalName ( ) { } static void checkU8 ( String field , int val ) { } static void checkU16 ( String field , int val ) { } static void checkU32 ( String field , long val ) { } }

Fix:
SIGBase sig = ( ( SIGBase ) ( this ) ) ;