Buggy code:
public final class LocalizedImageResource implements IClusterable , IResourceListener { private static final long serialVersionUID = 1L ; private Boolean resourceKind ; private final Component component ; private Resource resource ; private ResourceReference resourceReference ; private ValueMap resourceParameters ; private transient Locale locale ; private transient String style ; private static final class ImageValueParser extends MetaPatternParser { private static final Group factoryName = new Group ( MetaPattern . VARIABLE_NAME ) ; private static final Group imageReferenceName = new Group ( MetaPattern . VARIABLE_NAME ) ; private static final Group specification = new Group ( MetaPattern . ANYTHING_NON_EMPTY ) ; private static final MetaPattern pattern = new MetaPattern ( new MetaPattern [ ] { LocalizedImageResource . ImageValueParser . factoryName , MetaPattern . COLON , new org . apache . wicket . util . parse . metapattern . OptionalMetaPattern ( new MetaPattern [ ] { LocalizedImageResource . ImageValueParser . imageReferenceName } ) , MetaPattern . COLON , LocalizedImageResource . ImageValueParser . specification } ) ; private ImageValueParser ( final CharSequence input ) { } private String getFactoryName ( ) { } private String getImageReferenceName ( ) { } private String getSpecification ( ) { } } public LocalizedImageResource ( final Component component ) { } public final void bind ( ) { } public final void onResourceRequested ( ) { } public final void setResource ( final Resource resource ) { } public final void setResourceReference ( final ResourceReference resourceReference ) { } public final boolean isStateless ( ) { } public final void setResourceReference ( final ResourceReference resourceReference , final ValueMap resourceParameters ) { } public final void setSrcAttribute ( final ComponentTag tag ) { Locale l = component . getLocale ( ) ; String s = component . getStyle ( ) ; <START_BUG> if ( ( ( resourceKind ) == null ) && ( ( ! ( Objects . equal ( locale , component . getLocale ( ) ) ) ) || ( ! ( Objects . equal ( style , component . getStyle ( ) ) ) ) ) ) { <END_BUG> locale = component . getLocale ( ) ; style = component . getStyle ( ) ; resourceReference = null ; resource = null ; } else { } Object modelObject = component . getModelObject ( ) ; if ( modelObject instanceof ResourceReference ) { resourceReference = ( ( ResourceReference ) ( modelObject ) ) ; } else if ( modelObject instanceof Resource ) { resource = ( ( Resource ) ( modelObject ) ) ; } if ( ( ( resource ) == null ) && ( ( resourceReference ) == null ) ) { final CharSequence src = tag . getString ( "src" ) ; if ( src != null ) { loadStaticImage ( src . toString ( ) ) ; } else { final CharSequence value = tag . getString ( "value" ) ; if ( value != null ) { newImage ( value ) ; } else { loadStaticImage ( component . getModelObjectAsString ( ) ) ; } } } final CharSequence url ; if ( ( resourceReference ) != null ) { url = RequestCycle . get ( ) . urlFor ( resourceReference , resourceParameters ) ; } else { url = component . urlFor ( INTERFACE ) ; } tag . put ( "src" , RequestCycle . get ( ) . getOriginalResponse ( ) . encodeURL ( url ) ) ; } private IResourceFactory getResourceFactory ( final Application application , final String factoryName ) { } private void loadStaticImage ( final String path ) { } private void newImage ( final CharSequence value ) { } public final Resource getResource ( ) { } public final ResourceReference getResourceReference ( ) { } }

Fix:
if ( ( ( resourceKind ) == null ) || ( ( ! ( Objects . equal ( locale , component . getLocale ( ) ) ) ) || ( ! ( Objects . equal ( style , component . getStyle ( ) ) ) ) ) ) {