Buggy code:
public class GenericBindingFactory implements BindingFactory { private Object model ; private Map < String , GenericBindingFactory . GenericBindingRule > bindingRules ; private FormatterRegistry formatterRegistry ; private TypeConverter typeConverter ; private MessageSource messageSource ; public GenericBindingFactory ( Object model ) { } public void setFormatterRegistry ( FormatterRegistry formatterRegistry ) { } public void setMessageSource ( MessageSource messageSource ) { } public void setTypeConverter ( TypeConverter typeConverter ) { } public BindingRuleConfiguration bindingRule ( String propertyPath ) { } public Object getModel ( ) { } public Binding getBinding ( String property ) { PropertyPath path = new PropertyPath ( property ) ; Binding binding = getBindingRule ( path . getFirstElement ( ) . getValue ( ) ) . getBinding ( model ) ; for ( PropertyPathElement element : path . getNestedElements ( ) ) { if ( element . isIndex ( ) ) { if ( binding . isMap ( ) ) { binding = binding . getMapValueBinding ( element . getValue ( ) ) ; } else if ( binding . isList ( ) ) { binding = binding . getListElementBinding ( element . getIntValue ( ) ) ; } else { throw new IllegalArgumentException ( "Attempted<seq2seq4repair_space>to<seq2seq4repair_space>index<seq2seq4repair_space>a<seq2seq4repair_space>property<seq2seq4repair_space>that<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>List<seq2seq4repair_space>or<seq2seq4repair_space>Map" ) ; } } else { <START_BUG> binding = binding . getBinding ( element . getValue ( ) ) ; <END_BUG> } } return binding ; } private GenericBindingFactory . GenericBindingRule getBindingRule ( String property ) { } @ SuppressWarnings ( "unchecked" ) class GenericBindingRule implements BindingRuleConfiguration , BindingContext { private Class < ? > modelClass ; private PropertyDescriptor property ; private Formatter formatter ; private Formatter keyFormatter ; private Formatter elementFormatter ; private Condition editableCondition = Condition . ALWAYS_TRUE ; private Condition enabledCondition = Condition . ALWAYS_TRUE ; private Condition visibleCondition = Condition . ALWAYS_TRUE ; private Map < String , GenericBindingFactory . GenericBindingRule > nestedBindingRules ; private Binding binding ; private Map < Integer , Binding > listElementBindings ; private Map < Object , Binding > mapValueBindings ; public GenericBindingRule ( String property , Class modelClass ) { } public MessageSource getMessageSource ( ) { } public TypeConverter getTypeConverter ( ) { } public Formatter < ? > getFormatter ( ) { } public Formatter < ? > getKeyFormatter ( ) { } public Formatter < ? > getElementFormatter ( ) { } public Condition getEnabledCondition ( ) { } public Condition getEditableCondition ( ) { } public Condition getVisibleCondition ( ) { } public Binding getBinding ( String property ) { createValueIfNecessary ( ) ; return getBindingRule ( property , binding . getValueType ( ) ) . getBinding ( binding . getValue ( ) ) ; } public Binding getListElementBinding ( int index ) { } public Binding getMapValueBinding ( Object key ) { } public String getLabel ( ) { } public BindingRuleConfiguration formatWith ( Formatter < ? > formatter ) { } public BindingRuleConfiguration formatElementsWith ( Formatter < ? > formatter ) { } public BindingRuleConfiguration formatKeysWith ( Formatter < ? > formatter ) { } public BindingRuleConfiguration editableWhen ( Condition condition ) { } public BindingRuleConfiguration enabledWhen ( Condition condition ) { } public BindingRuleConfiguration visibleWhen ( Condition condition ) { } private Class < ? > getElementType ( ) { } private Class < ? > getKeyType ( ) { } GenericBindingFactory . GenericBindingRule getBindingRule ( String property ) { } GenericBindingFactory . GenericBindingRule getBindingRule ( String property , Class < ? > modelClass ) { } Binding getBinding ( Object model ) { } private PropertyDescriptor findPropertyDescriptor ( String property ) { } private BeanInfo getBeanInfo ( Class < ? > clazz ) { } private void createValueIfNecessary ( ) { } private void createMapValueIfNecessary ( ) { } private void growListIfNecessary ( int index ) { } private Map newMapValue ( Class < ? > type ) { } private List newListValue ( Class < ? > type ) { } private Object newValue ( Class < ? > type ) { } } private static class ListElementBindingContext implements BindingContext { private int index ; private GenericBindingFactory . GenericBindingRule listBindingContext ; final Map < String , Binding > nestedBindings = new HashMap < String , Binding > ( ) ; public ListElementBindingContext ( int index , GenericBindingFactory . GenericBindingRule listBindingContext ) { } public MessageSource getMessageSource ( ) { } public TypeConverter getTypeConverter ( ) { } public Binding getBinding ( String property ) { Object model = ( ( List ) ( listBindingContext . binding . getValue ( ) ) ) . get ( index ) ; Class < ? > elementType = listBindingContext . getElementType ( ) ; if ( elementType == null ) { elementType = model . getClass ( ) ; } GenericBindingFactory . GenericBindingRule rule = listBindingContext . getBindingRule ( property , elementType ) ; Binding binding = nestedBindings . get ( property ) ; if ( binding == null ) { PropertyValueModel valueModel = new PropertyValueModel ( rule . property , model ) ; binding = new GenericBinding ( valueModel , rule ) ; nestedBindings . put ( property , binding ) ; } return binding ; } public Formatter getFormatter ( ) { } public Formatter getElementFormatter ( ) { } public Formatter getKeyFormatter ( ) { } public Condition getEditableCondition ( ) { } public Condition getEnabledCondition ( ) { } public Condition getVisibleCondition ( ) { } public Binding getListElementBinding ( int index ) { } public Binding getMapValueBinding ( Object key ) { } public String getLabel ( ) { } } private static class MapValueBindingContext implements BindingContext { private Object key ; private GenericBindingFactory . GenericBindingRule mapBindingContext ; final Map < String , Binding > nestedBindings = new HashMap < String , Binding > ( ) ; public MapValueBindingContext ( Object key , GenericBindingFactory . GenericBindingRule mapBindingContext ) { } public MessageSource getMessageSource ( ) { } public TypeConverter getTypeConverter ( ) { }

Fix:
binding = binding . getNestedBinding ( element . getValue ( ) ) ;