Buggy code:
public static Tag well ( Object ... contents ) { } public static ColspanTag col_ ( int cols , Object ... contents ) { } public static ColspanTag col1 ( Object ... contents ) { } public static ColspanTag col2 ( Object ... contents ) { } public static ColspanTag col3 ( Object ... contents ) { } public static ColspanTag col4 ( Object ... contents ) { } public static ColspanTag col5 ( Object ... contents ) { } public static ColspanTag col6 ( Object ... contents ) { } public static ColspanTag col7 ( Object ... contents ) { } public static ColspanTag col8 ( Object ... contents ) { } public static ColspanTag col9 ( Object ... contents ) { } public static ColspanTag col10 ( Object ... contents ) { } public static ColspanTag col11 ( Object ... contents ) { } public static ColspanTag col12 ( Object ... contents ) { } public static ButtonTag cmd ( String cmd , Object ... args ) { } public static ButtonTag navigate ( String cmd ) { } public static ButtonTag [ ] cmds ( String ... commands ) { } public static Tag titleBox ( Object ... contents ) { } public static < T > GridWidget grid ( Class < T > type , Object [ ] items , String sortOrder , int pageSize , String ... properties ) { } public static < T > GridWidget grid ( Class < T > type , Collection < T > items , String sortOrder , int pageSize , String ... properties ) { } public static GridWidget grid ( Items items , String sortOrder , int pageSize , String ... properties ) { } public static PagerWidget pager ( int from , int to , Var < Integer > pageNumber ) { } public static FormWidget form_ ( FormLayout layout , String [ ] fieldsNames , String [ ] fieldsDesc , FieldType [ ] fieldTypes , Object [ ] [ ] options , Var < ? > [ ] vars , Tag [ ] buttons ) { } public static FormWidget show ( Object bean , String ... properties ) { } public static FormWidget show ( final Item item , String ... properties ) { } public static FormWidget show ( DataManager dataManager , final Item item , String ... properties ) { } public static FormWidget edit ( Object bean , String ... properties ) { } public static FormWidget edit ( final Item item , String ... properties ) { } public static FormWidget edit ( DataManager dataManager , final Item item , String ... properties ) { } public static FormWidget create ( Object bean , String ... properties ) { } public static FormWidget create ( final Item item , String ... properties ) { } public static FormWidget create ( DataManager dataManager , final Item item , String ... properties ) { } public static FormField field ( DataManager dataManager , FormMode mode , FormLayout layout , Property prop , String name , String desc , FieldType type , Collection < ? > options , boolean required , Var < ? > var , DataPermissions permissions ) { } public static FormField field ( DataManager dataManager , FormMode mode , FormLayout layout , Item item , Property prop ) { } public static Tag page ( boolean devMode , String pageTitle , Object head , Object body ) { } public static Tag page ( boolean devMode , String pageTitle , Object body ) { } public static Tag media ( Object left , Object title , Object body , String targetUrl ) { } public static Tag [ ] mediaList ( List < Object > found ) { } public static < T > Var < T > sessionVar ( String name , T defaultValue ) { } public static < T > Var < T > localVar ( String name , T defaultValue ) { } public static Var < Integer > localVar ( String name , int defaultValue , int min , int max ) { } public static boolean isEntity ( Object obj ) { } public static String urlFor ( Object entity ) { long id = Beany . getId ( entity ) ; <START_BUG> String className = entity . getClass ( ) . getSimpleName ( ) ; <END_BUG> return U . format ( "//%s//%s" , U . uncapitalized ( className ) , id ) ; } public static Object highlight ( String text ) { } public static Object highlight ( String text , String regex ) { } public static InputTag emailInput ( Var < ? > var ) { } public static InputTag passwordInput ( Var < ? > var ) { } public static InputTag textInput ( Var < ? > var ) { } public static TextareaTag textareaInput ( Var < ? > var ) { } public static InputTag checkbox ( Var < ? > var ) { } public static SelectTag dropdown ( Collection < ? > options , Var < ? > var ) { } public static SelectTag multiSelect ( Collection < ? > options , Var < ? > var ) { } public static Tag [ ] radios ( String name , Collection < ? > options , Var < ? > var ) { } public static Tag [ ] radios ( Collection < ? > options , Var < ? > var ) { } public static Tag [ ] checkboxes ( String name , Collection < ? > options , Var < ? > var ) { } public static Tag [ ] checkboxes ( Collection < ? > options , Var < ? > var ) { } public static Object display ( Object item ) { } private static Object display ( Iterator < ? > it ) { } public static Tag nothing ( ) { } }

Fix:
String className = Cls . unproxy ( entity . getClass ( ) ) . getSimpleName ( ) ;