Buggy code:
public class ProxyManagerImpl implements ProxyManager { private static final String PROXY_SUFFIX = "$proxy" ; private static final Localizer _loc = Localizer . forPackage ( ProxyManagerImpl . class ) ; private static long _proxyId = 0L ; private static final Map _stdCollections = new HashMap ( ) ; private static final Map _stdMaps = new HashMap ( ) ; private final Map _proxies = new ConcurrentHashMap ( ) ; private boolean _trackChanges = true ; private boolean _assertType = false ; public boolean getTrackChanges ( ) { } public void setTrackChanges ( boolean track ) { } public boolean getAssertAllowedType ( ) { } public void setAssertAllowedType ( boolean assertType ) { } public Object copyArray ( Object orig ) { } public Collection copyCollection ( Collection orig ) { } public Proxy newCollectionProxy ( Class type , Class elementType , Comparator compare ) { } public Map copyMap ( Map orig ) { } public Proxy newMapProxy ( Class type , Class keyType , Class elementType , Comparator compare ) { } public Date copyDate ( Date orig ) { } public Proxy newDateProxy ( Class type ) { } public Calendar copyCalendar ( Calendar orig ) { } public Proxy newCalendarProxy ( Class type , TimeZone zone ) { } public Object copyCustom ( Object orig ) { } public Proxy newCustomProxy ( Object orig ) { } protected Class toProxyableCollectionType ( Class type ) { } protected Class toProxyableMapType ( Class type ) { } private static Class toConcreteType ( Class intf , Map concretes ) { } private ProxyCollection getFactoryProxyCollection ( Class type ) { } private ProxyMap getFactoryProxyMap ( Class type ) { } private ProxyDate getFactoryProxyDate ( Class type ) { } private ProxyCalendar getFactoryProxyCalendar ( Class type ) { } private ProxyBean getFactoryProxyBean ( Object orig ) { } private Proxy instantiateProxy ( BCClass bc , Class type , Class proxy , Constructor cons , Object [ ] args ) { } private static ClassLoader getMostDerivedClassLoader ( Class c1 , Class c2 ) { } protected BCClass generateProxyCollectionBytecode ( Class type ) { } private static void assertNotFinal ( Class type ) { if ( Modifier . isFinal ( type . getModifiers ( ) ) ) <START_BUG> throw new UnsupportedException ( ProxyManagerImpl . _loc . get ( "proxy-final" , type ) ) ; <END_BUG> } protected BCClass generateProxyMapBytecode ( Class type ) { } protected BCClass generateProxyDateBytecode ( Class type ) { } protected BCClass generateProxyCalendarBytecode ( Class type ) { } protected BCClass generateProxyBeanBytecode ( Class type ) { } private void delegateConstructors ( BCClass bc , Class type ) { } private void addProxyMethods ( BCClass bc , Class type , boolean changeTracker ) { } private void addProxyCollectionMethods ( BCClass bc , Class type ) { } protected boolean allowsDuplicates ( Class type ) { } protected boolean isOrdered ( Class type ) { } private void addProxyMapMethods ( BCClass bc , Class type ) { } private void addProxyDateMethods ( BCClass bc , Class type ) { } private void addProxyCalendarMethods ( BCClass bc , Class type ) { } private void addProxyBeanMethods ( BCClass bc , Class type , Constructor cons ) { } private void copyProperties ( Class type , Code code ) { } private void proxyRecognizedMethods ( BCClass bc , Class type , Class helper , Class proxyType ) { } private static Class [ ] toHelperParameters ( Class [ ] cls , Class helper ) { } private static Class [ ] toHelperAfterParameters ( Class [ ] cls , Class ret , Class beforeRet ) { } private void proxySetters ( BCClass bc , Class type ) { } private void proxyOverrideMethod ( BCClass bc , Method meth , Method helper , Class [ ] params ) { } private void proxyBeforeAfterMethod ( BCClass bc , Method meth , Method before , Class [ ] params , Method after , Class [ ] afterParams ) { } protected boolean isSetter ( Method meth ) { } protected Method findGetter ( Class type , Method setter ) { } private static boolean startsWith ( String str , String token ) { } private void proxySetter ( BCClass bc , Method meth ) { } private void addWriteReplaceMethod ( BCClass bc ) { } private static synchronized long nextProxyId ( ) { } protected Constructor findCopyConstructor ( Class cls ) { } private static Constructor findComparatorConstructor ( Class cls ) { } public static void main ( String [ ] args ) throws IOException , ClassNotFoundException { } }

Fix:
throw new UnsupportedException ( ProxyManagerImpl . _loc . get ( "no-proxy-final" , type ) ) ;