Buggy code:
final class KeyBindingNode { static final class Assignment implements Comparable { boolean hasPreferenceCommandIdInFirstKeyConfiguration ; boolean hasPreferenceCommandIdInInheritedKeyConfiguration ; boolean hasPluginCommandIdInFirstKeyConfiguration ; boolean hasPluginCommandIdInInheritedKeyConfiguration ; String preferenceCommandIdInFirstKeyConfiguration ; String preferenceCommandIdInInheritedKeyConfiguration ; String pluginCommandIdInFirstKeyConfiguration ; String pluginCommandIdInInheritedKeyConfiguration ; public int compareTo ( Object object ) { } public boolean equals ( Object object ) { } boolean contains ( String commandId ) { } } static void add ( Map tree , KeySequence keySequence , String contextId , String keyConfigurationId , int rank , String platform , String locale , String commandId ) { } static Map find ( Map tree , KeySequence prefix ) { } static Map getAssignmentsByContextIdKeySequence ( Map tree , KeySequence prefix ) { } static void getKeyBindingDefinitions ( Map tree , KeySequence prefix , int rank , List keyBindingDefinitions ) { Iterator iterator = tree . entrySet ( ) . iterator ( ) ; while ( iterator . hasNext ( ) ) { Map . Entry entry = ( ( Map . Entry ) ( iterator . next ( ) ) ) ; KeyStroke keyStroke = ( ( KeyStroke ) ( entry . getKey ( ) ) ) ; KeyBindingNode keyBindingNode = ( ( KeyBindingNode ) ( entry . getValue ( ) ) ) ; List keyStrokes = new ArrayList ( prefix . getKeyStrokes ( ) ) ; keyStrokes . add ( keyStroke ) ; KeySequence keySequence = KeySequence . getInstance ( keyStrokes ) ; Map contextMap = keyBindingNode . contextMap ; Iterator iterator2 = contextMap . entrySet ( ) . iterator ( ) ; while ( iterator2 . hasNext ( ) ) { Map . Entry entry2 = ( ( Map . Entry ) ( iterator2 . next ( ) ) ) ; String contextId = ( ( String ) ( entry2 . getKey ( ) ) ) ; Map keyConfigurationMap = ( ( Map ) ( entry2 . getValue ( ) ) ) ; Iterator iterator3 = keyConfigurationMap . entrySet ( ) . iterator ( ) ; while ( iterator3 . hasNext ( ) ) { Map . Entry entry3 = ( ( Map . Entry ) ( iterator3 . next ( ) ) ) ; String keyConfigurationId = ( ( String ) ( entry3 . getKey ( ) ) ) ; Map rankMap = ( ( Map ) ( entry3 . getValue ( ) ) ) ; Map platformMap = ( ( Map ) ( rankMap . get ( new Integer ( rank ) ) ) ) ; if ( platformMap != null ) { Iterator iterator4 = platformMap . entrySet ( ) . iterator ( ) ; while ( iterator4 . hasNext ( ) ) { Map . Entry entry4 = ( ( Map . Entry ) ( iterator4 . next ( ) ) ) ; String platform = ( ( String ) ( entry4 . getKey ( ) ) ) ; Map localeMap = ( ( Map ) ( entry4 . getValue ( ) ) ) ; Iterator iterator5 = localeMap . entrySet ( ) . iterator ( ) ; while ( iterator5 . hasNext ( ) ) { Map . Entry entry5 = ( ( Map . Entry ) ( iterator5 . next ( ) ) ) ; String locale = ( ( String ) ( entry5 . getKey ( ) ) ) ; Set commandIds = ( ( Set ) ( entry5 . getValue ( ) ) ) ; Iterator iterator6 = commandIds . iterator ( ) ; while ( iterator6 . hasNext ( ) ) { String commandId = ( ( String ) ( iterator6 . next ( ) ) ) ; <START_BUG> keyBindingDefinitions . add ( new KeyBindingDefinition ( commandId , contextId , keyConfigurationId , keySequence , locale , platform , null ) ) ; <END_BUG> } } } } } } KeyBindingNode . getKeyBindingDefinitions ( keyBindingNode . childMap , keySequence , rank , keyBindingDefinitions ) ; } } static Map getKeyBindingsByCommandId ( Map keySequenceMap ) { } static Map getMatchesByKeySequence ( Map tree , KeySequence prefix ) { } static void remove ( Map tree , KeySequence keySequence , String contextId , String keyConfigurationId , int rank , String platform , String locale ) { } static void remove ( Map tree , KeySequence keySequence , String contextId , String keyConfigurationId , int rank , String platform , String locale , String commandId ) { } static void solve ( Map tree , String [ ] keyConfigurationIds , String [ ] platforms , String [ ] locales ) { } static void solve ( Map tree , String [ ] contextIds , String [ ] keyConfigurationIds , String [ ] platforms , String [ ] locales ) { } private Map assignmentsByContextId = new HashMap ( ) ; private Map childMap = new HashMap ( ) ; private Map contextMap = new HashMap ( ) ; private Match match = null ; private KeyBindingNode ( ) { } }

Fix:
keyBindingDefinitions . add ( new KeyBindingDefinition ( contextId , commandId , keyConfigurationId , keySequence , locale , platform , null ) ) ;