Buggy code:
else ) ; LongPressAndTypeMacro lt = new LongPressAndTypeMacro ( ) ; List < MacroAction > lst = KeymapParser . parseActionList ( mLTTypeMacro . group ( 1 ) ) ; lt . setLongPressKeys ( lst ) ; lt . setTimeout ( Integer . parseInt ( mLTTypeMacro . group ( 2 ) ) ) ; lt . setShortStrokes ( KeymapParser . parseActionList ( mLTTypeMacro . group ( 4 ) ) ) ; List < ErgodoxKeyCode > pressedKeys = new ArrayList < > ( ) ; for ( MacroAction m : lt . getLongPressKeys ( ) ) { switch ( m . getAction ( ) ) { case DOWN : pressedKeys . add ( m . getCode ( ) ) ; break ; case UP : pressedKeys . remove ( m . getCode ( ) ) ; break ; } } List < MacroAction > releases = KeymapParser . parseActionList ( mLTTypeMacro . group ( 3 ) ) ; for ( MacroAction a : releases ) { switch ( a . getAction ( ) ) { case UP : pressedKeys . remove ( a . getCode ( ) ) ; break ; } } if ( ( pressedKeys . size ( ) ) != 0 ) { System . err . println ( "Warning,<seq2seq4repair_space>some<seq2seq4repair_space>keys<seq2seq4repair_space>are<seq2seq4repair_space>not<seq2seq4repair_space>properly<seq2seq4repair_space>released<seq2seq4repair_space>after<seq2seq4repair_space>macro:<seq2seq4repair_space>" ) ; for ( ErgodoxKeyCode k : pressedKeys ) { System . err . println ( k . toString ( ) ) ; } } macro = lt ; } else if ( mLayertoggleHoldMacro . matches ( ) ) { String layer = mLayertoggleHoldMacro . group ( 1 ) ; String tm = mLayertoggleHoldMacro . group ( 2 ) ; System . out . println ( ( "Layer<seq2seq4repair_space>toggle<seq2seq4repair_space>and<seq2seq4repair_space>hold<seq2seq4repair_space>macro.<seq2seq4repair_space>Layer<seq2seq4repair_space>" + layer ) ) ; LayerToggleAndHoldMacro lth = new LayerToggleAndHoldMacro ( ) ; lth . setName ( macroName ) ; lth . setTimeout ( Integer . valueOf ( tm ) ) ; lth . setLayer ( layer ) ; macro = lth ; } else if ( mLayerToggleMacro . matches ( ) ) { System . out . println ( ( "Layer<seq2seq4repair_space>toggle<seq2seq4repair_space>macro:<seq2seq4repair_space>Layer<seq2seq4repair_space>" + ( mLayerToggleMacro . group ( 1 ) ) ) ) ; LayerToggleMacro lm = new LayerToggleMacro ( ) ; lm . setLayer ( mLayerToggleMacro . group ( 1 ) ) ; lm . setName ( macroName ) ; macro = lm ; } else { System . out . println ( "Unknown<seq2seq4repair_space>custom<seq2seq4repair_space>macro?" ) ; System . out . println ( normalizedMacroContent ) ; CustomMacro cm = new CustomMacro ( ) ; cm . setContent ( originalMacroContent ) ; macro = cm ; } macro . setName ( macroName ) ; macros = macros . substring ( macros . indexOf ( "break;" , idx ) ) ; keymapMacros . put ( macroName , macro ) ; } ErgodoxLayout layout = new ErgodoxLayout ( ) ; layout . setLayers ( ret ) ; layout . setMacros ( keymapMacros ) ; for ( String ln : ret . keySet ( ) ) { ErgodoxLayoutLayer ly = ret . get ( ln ) ; for ( Key k : ly . getLayout ( ) ) { String value = k . getValue ( ) ; if ( value == null ) continue ; if ( k . getValue ( ) . startsWith ( "M(" ) ) { String macro = value . substring ( 2 , ( ( value . length ( ) ) - 1 ) ) ; if ( ( keymapMacros . get ( macro ) ) == null ) { Alert a = new Alert ( Alert . AlertType . WARNING , ( ( "Call<seq2seq4repair_space>to<seq2seq4repair_space>unknown<seq2seq4repair_space>macro<seq2seq4repair_space>" + macro ) + "\nmight<seq2seq4repair_space>cause<seq2seq4repair_space>problems<seq2seq4repair_space>compiling<seq2seq4repair_space>it" ) , ButtonType . CLOSE ) ; a . showAndWait ( ) ; } } else if ( k . getValue ( ) . startsWith ( "LT(" ) ) { value = k . getValue ( ) . substring ( 3 , ( ( k . getValue ( ) . length ( ) ) - 1 ) ) ; String [ ] splt = value . split ( "," ) ; if ( ( splt . length ) != 2 ) { new Alert ( Alert . AlertType . WARNING , ( "Syntax<seq2seq4repair_space>error<seq2seq4repair_space>with<seq2seq4repair_space>LT()-Call:<seq2seq4repair_space>" + value ) , ButtonType . CLOSE ) . showAndWait ( ) ; } else { if ( ( ret . get ( splt [ 0 ] ) ) == null ) { new Alert ( Alert . AlertType . WARNING , ( "LT()-Call<seq2seq4repair_space>with<seq2seq4repair_space>unknown<seq2seq4repair_space>layer:<seq2seq4repair_space>" + value ) , ButtonType . CLOSE ) . showAndWait ( ) ; } try { ErgodoxKeyCode c = ErgodoxKeyCode . valueOf ( splt [ 1 ] ) ; } catch ( IllegalArgumentException e ) { new Alert ( Alert . AlertType . WARNING , ( ( "Probably<seq2seq4repair_space>unknown<seq2seq4repair_space>keycode<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>LT()-call:<seq2seq4repair_space>" + value ) + "\nmight<seq2seq4repair_space>cause<seq2seq4repair_space>problems<seq2seq4repair_space>compiling,<seq2seq4repair_space>will<seq2seq4repair_space>cause<seq2seq4repair_space>problems<seq2seq4repair_space>saving!" ) , ButtonType . CLOSE ) . showAndWait ( ) ; } } } else if ( ( k . getValue ( ) . startsWith ( "MO(" ) ) || ( k . getValue ( ) . startsWith ( "TG(" ) ) ) { value = k . getValue ( ) . substring ( 3 , ( ( k . getValue ( ) . length ( ) ) - 1 ) ) ; if ( ( ret . get ( value ) ) == null ) { new Alert ( Alert . AlertType . WARNING , ( ( "Reference<seq2seq4repair_space>to<seq2seq4repair_space>unknown<seq2seq4repair_space>layer<seq2seq4repair_space>found<seq2seq4repair_space>" + value ) + "\nmight<seq2seq4repair_space>cause<seq2seq4repair_space>problems<seq2seq4repair_space>compiling<seq2seq4repair_space>it." ) , ButtonType . CLOSE ) . showAndWait ( ) ; } } else if ( ( ( ( value . startsWith ( "LGUI(" ) ) || ( value . startsWith ( "LALT(" ) ) ) || ( value . startsWith ( "LSFT(" ) ) ) || ( value . startsWith ( "LCTL" ) ) ) { value = value . substring ( 5 , ( ( value . length ( ) ) - 1 ) ) ; while ( ( ( ( value . startsWith ( "LGUI(" ) ) || ( value . startsWith ( "LALT(" ) ) ) || ( value . startsWith ( "LSFT(" ) ) ) || ( value . startsWith ( "LCTL" ) ) ) { value = value . substring ( 5 , ( ( value . length ( ) ) - 1 ) ) ; } try { ErgodoxKeyCode c = ErgodoxKeyCode . valueOf ( value ) ; } catch ( IllegalArgumentException e ) { new Alert ( Alert . AlertType . WARNING , ( ( "Probably<seq2seq4repair_space>unknown<seq2seq4repair_space>keycode<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>keymap:<seq2seq4repair_space>" + value ) + "\nmight<seq2seq4repair_space>cause<seq2seq4repair_space>problems<seq2seq4repair_space>compiling,<seq2seq4repair_space>will<seq2seq4repair_space>cause<seq2seq4repair_space>problems<seq2seq4repair_space>saving!" ) , ButtonType . CLOSE ) . showAndWait ( ) ; } } else <START_BUG> if ( ( ( ( ( k . getValue ( ) . startsWith ( "GUI_T(" ) ) || ( k . getValue ( ) . startsWith ( "ALT_T(" ) ) ) || ( k . getValue ( ) . startsWith ( "CTL_T(" ) ) ) || ( k . getValue ( ) . startsWith ( "ALL_T(" ) ) ) || ( k . getValue ( ) . startsWith ( "MEH_T(" ) ) ) { <END_BUG>

Fix:
if ( ( ( ( ( ( k . getValue ( ) . startsWith ( "GUI_T(" ) ) || ( k . getValue ( ) . startsWith ( "SHFT_T(" ) ) ) || ( k . getValue ( ) . startsWith ( "ALT_T(" ) ) ) || ( k . getValue ( ) . startsWith ( "CTL_T(" ) ) ) || ( k . getValue ( ) . startsWith ( "ALL_T(" ) ) ) || ( k . getValue ( ) . startsWith ( "MEH_T(" ) ) ) {