Buggy code:
public class PropertyResolver { private static final Map classesToGetAndSetters = new ConcurrentHashMap ( 64 ) ; private static final Log log = LogFactory . getLog ( PropertyResolver . class ) ; public static final Object getValue ( final String expression , final Object object ) { } public static final void setValue ( final String expression , final Object object , Object value , IConverter converter ) { } private static PropertyResolver . ObjectAndGetSetter getObjectAndGetSetter ( final String expression , final Object object , boolean tryToCreateNull ) { <START_BUG> final String expressionBracketsSeperated = Strings . replaceAll ( expression , "[" , ".[" ) ; <END_BUG> int index = expressionBracketsSeperated . indexOf ( '.' ) ; int lastIndex = 0 ; Object value = object ; Class clz = value . getClass ( ) ; String exp = expressionBracketsSeperated ; while ( index != ( - 1 ) ) { exp = expressionBracketsSeperated . substring ( lastIndex , index ) ; PropertyResolver . IGetAndSet getAndSetter = null ; try { getAndSetter = PropertyResolver . getGetAndSetter ( exp , clz ) ; } catch ( WicketRuntimeException ex ) { index = expressionBracketsSeperated . indexOf ( '.' , ( index + 1 ) ) ; if ( index != ( - 1 ) ) { String indexExpression = expressionBracketsSeperated . substring ( lastIndex , index ) ; getAndSetter = PropertyResolver . getGetAndSetter ( indexExpression , clz ) ; } else { exp = expressionBracketsSeperated . substring ( lastIndex ) ; break ; } } Object newValue = getAndSetter . getValue ( value ) ; if ( newValue == null ) { if ( tryToCreateNull ) { newValue = getAndSetter . newValue ( value ) ; if ( newValue == null ) { return null ; } } else { return null ; } } value = newValue ; lastIndex = index + 1 ; index = expressionBracketsSeperated . indexOf ( '.' , lastIndex ) ; clz = value . getClass ( ) ; if ( index == ( - 1 ) ) { exp = expressionBracketsSeperated . substring ( lastIndex ) ; break ; } } PropertyResolver . IGetAndSet getAndSetter = PropertyResolver . getGetAndSetter ( exp , clz ) ; return new PropertyResolver . ObjectAndGetSetter ( getAndSetter , value ) ; } private static final PropertyResolver . IGetAndSet getGetAndSetter ( String exp , Class clz ) { } private static Field findField ( Class clz , String expression ) { } private static final Method findGetter ( Class clz , String expression ) { } private static final Method findMethod ( Class clz , String expression ) { } private static final class ObjectAndGetSetter { private final PropertyResolver . IGetAndSet getAndSetter ; private final Object value ; public ObjectAndGetSetter ( PropertyResolver . IGetAndSet getAndSetter , Object value ) { } public void setValue ( Object value , IConverter converter ) { } public Object getValue ( ) { } } private static interface IGetAndSet { public Object getValue ( final Object object ) { } public Object newValue ( Object object ) { } public void setValue ( final Object object , final Object value , IConverter converter ) { } } private static final class MapGetSet implements PropertyResolver . IGetAndSet { private final String key ; MapGetSet ( String key ) { } public Object getValue ( Object object ) { } public void setValue ( Object object , Object value , IConverter converter ) { } public Object newValue ( Object object ) { } } private static final class ListGetSet implements PropertyResolver . IGetAndSet { private final int index ; ListGetSet ( int index ) { } public Object getValue ( Object object ) { } public void setValue ( Object object , Object value , IConverter converter ) { } public Object newValue ( Object object ) { } } private static final class ArrayGetSet implements PropertyResolver . IGetAndSet { private final int index ; ArrayGetSet ( int index ) { } public Object getValue ( Object object ) { } public void setValue ( Object object , Object value , IConverter converter ) { } public Object newValue ( Object object ) { } } private static final class ArrayLengthGetSet implements PropertyResolver . IGetAndSet { ArrayLengthGetSet ( ) { } public Object getValue ( Object object ) { } public void setValue ( Object object , Object value , IConverter converter ) { } public Object newValue ( Object object ) { } } private static final class ArrayPropertyGetSet implements PropertyResolver . IGetAndSet { private final Integer index ; private final Method getMethod ; private Method setMethod ; ArrayPropertyGetSet ( Method method , int index ) { } private static final Method findSetter ( Method getMethod , Class clz ) { } public Object getValue ( Object object ) { } public void setValue ( Object object , Object value , IConverter converter ) { } public Object newValue ( Object object ) { } } private static final class MethodGetAndSet implements PropertyResolver . IGetAndSet { private Method getMethod ; private Method setMethod ; MethodGetAndSet ( Method getMethod ) { } public final Object getValue ( final Object object ) { } public final void setValue ( final Object object , final Object value , IConverter converter ) { } private static final Method findSetter ( Method getMethod , Class clz ) { } public Object newValue ( Object object ) { } } private static class FieldGetAndSetter implements PropertyResolver . IGetAndSet { private Field field ; public FieldGetAndSetter ( Field field ) { } public Object getValue ( Object object ) { } public Object newValue ( Object object ) { } public void setValue ( Object object , Object value , IConverter converter ) { } } }

Fix:
final String expressionBracketsSeperated = Strings . replaceAll ( expression , "[" , ".[" ) . toString ( ) ;