Buggy code:
public final class LocalizedImageResource implements Serializable , IResourceListener { private Boolean resourceKind ; private Component component ; private Resource resource ; private ResourceReference resourceReference ; 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 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 void setSrcAttribute ( final ComponentTag tag ) { } private IResourceFactory getResourceFactory ( final Application application , final String factoryName ) { } private void loadStaticImage ( final String path ) { } private void newImage ( final String value ) { final LocalizedImageResource . ImageValueParser valueParser = new LocalizedImageResource . ImageValueParser ( value ) ; if ( valueParser . matches ( ) ) { final String imageReferenceName = valueParser . getImageReferenceName ( ) ; final String specification = Strings . replaceHtmlEscapeNumber ( valueParser . getSpecification ( ) ) ; final String factoryName = valueParser . getFactoryName ( ) ; final Application application = component . getApplication ( ) ; if ( ! ( Strings . isEmpty ( imageReferenceName ) ) ) { <START_BUG> if ( ( application . getSharedResources ( ) . get ( Application . class , imageReferenceName , locale , style ) ) == null ) { <END_BUG> final Resource imageResource = getResourceFactory ( application , factoryName ) . newResource ( specification , locale , style ) ; application . getSharedResources ( ) . add ( Application . class , imageReferenceName , locale , style , imageResource ) ; } this . resourceReference = new ResourceReference ( Application . class , imageReferenceName ) ; resourceReference . setLocale ( locale ) ; resourceReference . setStyle ( style ) ; } else { this . resource = ( ( WebResource ) ( getResourceFactory ( application , factoryName ) . newResource ( specification , locale , style ) ) ) ; } } else { throw new WicketRuntimeException ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>generate<seq2seq4repair_space>image<seq2seq4repair_space>for<seq2seq4repair_space>value<seq2seq4repair_space>attribute<seq2seq4repair_space>'" + value ) + "\'.<seq2seq4repair_space>Was<seq2seq4repair_space>expecting<seq2seq4repair_space>a<seq2seq4repair_space>value<seq2seq4repair_space>attribute<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>form<seq2seq4repair_space>\"[resourceFactoryName]:[resourceReferenceName]?:[factorySpecification]\"." ) ) ; } } }

Fix:
if ( ( application . getSharedResources ( ) . get ( Application . class , imageReferenceName , locale , style , true ) ) == null ) {