Buggy code:
public class TabWirelessUi extends Composite implements Tab { private static TabWirelessUi . TabWirelessUiUiBinder uiBinder = GWT . create ( TabWirelessUi . TabWirelessUiUiBinder . class ) ; private static final Logger logger = Logger . getLogger ( TabWirelessUi . class . getSimpleName ( ) ) ; interface TabWirelessUiUiBinder extends UiBinder < Widget , TabWirelessUi > { } private static final Messages MSGS = GWT . create ( Messages . class ) ; private final GwtSecurityTokenServiceAsync gwtXSRFService = GWT . create ( GwtSecurityTokenService . class ) ; private final GwtNetworkServiceAsync gwtNetworkService = GWT . create ( GwtNetworkService . class ) ; private final GwtDeviceServiceAsync gwtDeviceService = GWT . create ( GwtDeviceService . class ) ; private static final String REGEX_PASSWORD_ANY = ".*" ; private static final String REGEX_PASSWORD_WPA = "^[<seq2seq4repair_space>-~]{8,63}$" ; private static final String REGEX_PASSWORD_WEP = "^(?:\\w{5}|\\w{13}|[a-fA-F0-9]{10}|[a-fA-F0-9]{26})$" ; private static final int MAX_WIFI_CHANNEL = 13 ; private static final int MAX_SSID_LENGTH = 32 ; GwtSession session ; TabTcpIpUi tcpTab ; NetworkTabsUi netTabs ; boolean dirty ; boolean ssidInit ; GwtWifiNetInterfaceConfig selectedNetIfConfig ; GwtWifiConfig activeConfig ; @ UiField DataGrid < GwtWifiChannelModel > channelGrid = new DataGrid < GwtWifiChannelModel > ( ) ; private ListDataProvider < GwtWifiChannelModel > channelDataProvider = new ListDataProvider < GwtWifiChannelModel > ( ) ; final SingleSelectionModel < GwtWifiChannelModel > selectionModel = new SingleSelectionModel < GwtWifiChannelModel > ( ) ; @ UiField Alert noChannels ; @ UiField FormLabel labelWireless ; @ UiField FormLabel labelSsid ; @ UiField FormLabel labelRadio ; @ UiField FormLabel labelSecurity ; @ UiField FormLabel labelPassword ; @ UiField FormLabel labelVerify ; @ UiField FormLabel labelPairwise ; @ UiField FormLabel labelGroup ; @ UiField FormLabel labelBgscan ; @ UiField FormLabel labelRssi ; @ UiField FormLabel labelShortI ; @ UiField FormLabel labelLongI ; @ UiField FormLabel labelPing ; @ UiField FormLabel labelIgnore ; @ UiField RadioButton radio1 ; @ UiField RadioButton radio2 ; @ UiField RadioButton radio3 ; @ UiField RadioButton radio4 ; @ UiField ListBox wireless ; @ UiField ListBox radio ; @ UiField ListBox security ; @ UiField ListBox pairwise ; @ UiField ListBox group ; @ UiField ListBox bgscan ; @ UiField TextBox ssid ; @ UiField TextBox shortI ; @ UiField TextBox longI ; @ UiField Input password ; @ UiField Input verify ; @ UiField TextBox rssi ; @ UiField PanelHeader helpTitle ; @ UiField PanelBody helpText ; @ UiField Button buttonSsid ; @ UiField Button buttonPassword ; @ UiField FormGroup groupVerify ; @ UiField FormGroup groupRssi ; @ UiField FormGroup groupPassword ; @ UiField FormGroup groupWireless ; @ UiField FormGroup groupShortI ; @ UiField FormGroup groupLongI ; @ UiField HelpBlock helpWireless ; @ UiField HelpBlock helpPassword ; @ UiField HelpBlock helpVerify ; @ UiField Modal ssidModal ; @ UiField PanelHeader ssidTitle ; @ UiField DataGrid < GwtWifiHotspotEntry > ssidGrid = new DataGrid < GwtWifiHotspotEntry > ( ) ; private ListDataProvider < GwtWifiHotspotEntry > ssidDataProvider = new ListDataProvider < GwtWifiHotspotEntry > ( ) ; final SingleSelectionModel < GwtWifiHotspotEntry > ssidSelectionModel = new SingleSelectionModel < GwtWifiHotspotEntry > ( ) ; @ UiField Alert noSsid ; String passwordRegex ; String passwordError ; String tcpStatus ; public TabWirelessUi ( GwtSession currentSession , TabTcpIpUi tcp , NetworkTabsUi tabs ) { } @ UiHandler ( { "wireless" , "ssid" , "radio" , "security" , "password" , "verify" , "pairwise" , "group" , "bgscan" , "longI" , "shortI" , "radio1" , "radio2" , "radio3" , "radio4" , "rssi" } ) public void onFormBlur ( BlurEvent e ) { } public GwtWifiWirelessMode getWirelessMode ( ) { if ( ( wireless ) != null ) { for ( GwtWifiWirelessMode mode : GwtWifiWirelessMode . values ( ) ) { <START_BUG> if ( mode . name ( ) . equals ( wireless . getSelectedItemText ( ) ) ) { <END_BUG> return mode ; } } } else { if ( ( activeConfig ) != null ) { return GwtWifiWirelessMode . valueOf ( activeConfig . getWirelessMode ( ) ) ; } } return null ; } @ Override public void setDirty ( boolean flag ) { } @ Override public boolean isDirty ( ) { } public boolean isValid ( ) { } @ Override public void setNetInterface ( GwtNetInterfaceConfig config ) { } @ Override public void refresh ( ) { } private void update ( ) { } private void setValues ( boolean b ) { } private void refreshForm ( ) { } private void reset ( ) { } private void initForm ( ) { } private void resetHelp ( ) { } private void initGrid ( ) { } private void loadChannelData ( ) { } private void setPasswordValidation ( ) { } private void initModal ( ) { } private void initSsid ( ) { } private void loadSsidData ( ) { } private GwtWifiConfig getGwtWifiConfig ( ) { } private void setForm ( boolean b ) { } public void getUpdatedNetInterface ( GwtNetInterfaceConfig updatedNetIf ) { } No newline ; at end ; of file ; }

Fix:
if ( wireless . getSelectedItemText ( ) . equals ( MessageUtils . get ( mode . name ( ) ) ) ) {