Buggy code:
public class UI { public static UI instance ; public RootWidget root ; public SlenHud slen ; public MenuGrid mnu ; public Speedget spd ; public Study study ; public Worship numen ; public WikiBrowser wiki ; private Widget keygrab ; private Widget mousegrab ; public Map < Integer , Widget > widgets = new TreeMap < Integer , Widget > ( ) ; public Map < Widget , Integer > rwidgets = new HashMap < Widget , Integer > ( ) ; public ArrayList < Widget > destroyList = new ArrayList < Widget > ( ) ; UI . Receiver rcvr ; public Coord mc ; public Coord lcc = Coord . z ; public Session sess ; public IHWindowParent chat ; public MapView mainview ; public boolean modshift ; public boolean modctrl ; public boolean modmeta ; public boolean modsuper ; public boolean modLMB ; public boolean modRMB ; long lastevent = System . currentTimeMillis ( ) ; public Widget mouseon ; public FSMan fsm ; public Console cons = new UI . WidgetConsole ( ) ; private Collection < UI . AfterDraw > afterdraws = null ; public HavenUtil m_util ; public Fightview fight ; public Overview overview ; public FlowerMenu flowerMenu = null ; public interface Receiver { public void rcvmsg ( int widget , String msg , Object ... args ) { } } public interface AfterDraw { public void draw ( GOut g ) { } } private class WidgetConsole extends Console { private void findcmds ( Map < String , Command > map , Widget wdg ) { } public Map < String , Command > findcmds ( ) { } } @ SuppressWarnings ( "serial" ) public static class UIException extends RuntimeException { public String mname ; public Object [ ] args ; public UIException ( String message , String mname , Object ... args ) { } } public UI ( Coord sz , Session sess ) { } public void setreceiver ( UI . Receiver rcvr ) { } public void bind ( Widget w , int id ) { } public void drawafter ( UI . AfterDraw ad ) { } public void draw ( GOut g ) { } public void newwidget ( int id , String type , Coord c , int parent , Object ... args ) throws InterruptedException { } public void grabmouse ( Widget wdg ) { } public void grabkeys ( Widget wdg ) { } private void createWidget ( Widget wdg ) { } private void destroyWidget ( Widget wdg ) { } private void removeid ( Widget wdg ) { } public void destroy ( Widget wdg ) { } public void destroy ( int id ) { } public void wdgmsg ( Widget sender , String msg , Object ... args ) { } public void uimsg ( int id , String msg , Object ... args ) { } private void setmods ( InputEvent ev ) { } public void type ( KeyEvent ev ) { } public void keydown ( KeyEvent ev ) { } public void keyup ( KeyEvent ev ) { setmods ( ev ) ; if ( ( keygrab ) == null ) { root . keyup ( ev ) ; <START_BUG> root . globtype ( ( ( char ) ( 0 ) ) , ev ) ; <END_BUG> } else { keygrab . keyup ( ev ) ; } } private Coord wdgxlate ( Coord c , Widget wdg ) { } public boolean dropthing ( Widget w , Coord c , Object thing ) { } Widget temp = null ; public void mousedown ( MouseEvent ev , Coord c , int button ) { } public void mouseup ( MouseEvent ev , Coord c , int button ) { } public void mousemove ( MouseEvent ev , Coord c ) { } public void mousewheel ( MouseEvent ev , Coord c , int amount ) { } public int modflags ( ) { } public int modmouse ( ) { } public void addToDestroyList ( Widget wdg ) { } public void destroyDestroyList ( ) { } }

Fix:
root . globtypeRelece ( ( ( char ) ( 0 ) ) , ev ) ;