Buggy code:
public class Filters { private static final BigDecimal ZERO_BIGDECIMAL = new BigDecimal ( 0.0 ) ; private static final BigInteger ZERO_BIGINTEGER = new BigInteger ( "0" ) ; private static final int OP_ADD = 0 ; private static final int OP_SUBTRACT = 1 ; private static final int OP_MULTIPLY = 2 ; private static final int OP_DIVIDE = 3 ; private static final int OP_MOD = 4 ; private static final Localizer _loc = Localizer . forPackage ( Filters . class ) ; public static Class wrap ( Class c ) { } public static Class unwrap ( Class c ) { } public static Class promote ( Class c1 , Class c2 ) { } private static boolean isNonstandardType ( Class c ) { } public static boolean canConvert ( Class c1 , Class c2 , boolean strict ) { } public static Object convert ( Object o , Class type ) { if ( o == null ) return null ; if ( ( o . getClass ( ) ) == type ) return o ; type = Filters . wrap ( type ) ; if ( type . isAssignableFrom ( o . getClass ( ) ) ) return o ; boolean num = o instanceof Number ; if ( ! num ) { if ( type == ( String . class ) ) return o . toString ( ) ; else if ( type == ( Character . class ) ) { String str = o . toString ( ) ; if ( ( str != null ) && ( ( str . length ( ) ) == 1 ) ) return new Character ( str . charAt ( 0 ) ) ; } else if ( ( Calendar . class . isAssignableFrom ( type ) ) && ( o instanceof Date ) ) { Calendar cal = Calendar . getInstance ( ) ; cal . setTime ( ( ( Date ) ( o ) ) ) ; return cal ; } else if ( ( Date . class . isAssignableFrom ( type ) ) && ( o instanceof Calendar ) ) { return ( ( Calendar ) ( o ) ) . getTime ( ) ; } else if ( Number . class . isAssignableFrom ( type ) ) { Integer i = null ; if ( o instanceof Character ) i = Numbers . valueOf ( ( ( Character ) ( o ) ) . charValue ( ) ) ; else if ( ( o instanceof String ) && ( ( ( ( String ) ( o ) ) . length ( ) ) == 1 ) ) i = Numbers . valueOf ( ( ( String ) ( o ) ) . charAt ( 0 ) ) ; if ( i != null ) { if ( type == ( Integer . class ) ) return i ; num = true ; } } } if ( ! num ) <START_BUG> throw new ClassCastException ( Filters . _loc . get ( "cant-convert" , o , o . getClass ( ) , type ) ) ; <END_BUG> if ( type == ( Integer . class ) ) { return Numbers . valueOf ( ( ( Number ) ( o ) ) . intValue ( ) ) ; } else if ( type == ( Float . class ) ) { return new Float ( ( ( Number ) ( o ) ) . floatValue ( ) ) ; } else if ( type == ( Double . class ) ) { return new Double ( ( ( Number ) ( o ) ) . doubleValue ( ) ) ; } else if ( type == ( Long . class ) ) { return Numbers . valueOf ( ( ( Number ) ( o ) ) . longValue ( ) ) ; } else if ( type == ( BigDecimal . class ) ) { double dval = ( ( Number ) ( o ) ) . doubleValue ( ) ; if ( ( Double . isNaN ( dval ) ) || ( Double . isInfinite ( dval ) ) ) return new Double ( dval ) ; float fval = ( ( Number ) ( o ) ) . floatValue ( ) ; if ( ( Float . isNaN ( fval ) ) || ( Float . isInfinite ( fval ) ) ) return new Float ( fval ) ; return new BigDecimal ( o . toString ( ) ) ; } else if ( type == ( BigInteger . class ) ) { return new BigInteger ( o . toString ( ) ) ; } else if ( type == ( Short . class ) ) { return new Short ( ( ( Number ) ( o ) ) . shortValue ( ) ) ; } else if ( type == ( Byte . class ) ) { return new Byte ( ( ( Number ) ( o ) ) . byteValue ( ) ) ; } else { return Numbers . valueOf ( ( ( Number ) ( o ) ) . intValue ( ) ) ; } } public static Object add ( Object o1 , Class c1 , Object o2 , Class c2 ) { } public static Object subtract ( Object o1 , Class c1 , Object o2 , Class c2 ) { } public static Object multiply ( Object o1 , Class c1 , Object o2 , Class c2 ) { } public static Object divide ( Object o1 , Class c1 , Object o2 , Class c2 ) { } public static Object mod ( Object o1 , Class c1 , Object o2 , Class c2 ) { } private static Object op ( Object o1 , Class c1 , Object o2 , Class c2 , int op ) { } private static Object op ( int n1 , int n2 , int op ) { }

Fix:
throw new ClassCastException ( Filters . _loc . get ( "cant-convert" , o , o . getClass ( ) , type ) . getMessage ( ) ) ;