Buggy code:
public class ResourceSettings implements IResourceSettings { private Localizer localizer ; private final Map < String , IResourceFactory > nameToResourceFactory = Generics . newHashMap ( ) ; private IPackageResourceGuard packageResourceGuard = new PackageResourceGuard ( ) ; private IPropertiesFactory propertiesFactory ; private IResourceFinder resourceFinder = new Path ( ) ; private Duration resourcePollFrequency = null ; private IResourceStreamLocator resourceStreamLocator ; private IModificationWatcher resourceWatcher ; private IFileUploadCleaner fileUploadCleaner ; private final List < IStringResourceLoader > stringResourceLoaders = Generics . newArrayList ( 4 ) ; private boolean throwExceptionOnMissingResource = true ; private boolean useDefaultOnMissingResource = true ; private Duration defaultCacheDuration = WebResponse . MAX_CACHE_DURATION ; private IJavaScriptCompressor javascriptCompressor ; private ICssCompressor cssCompressor ; private String parentFolderPlaceholder = null ; private IResourceCachingStrategy resourceCachingStrategy ; private final Application application ; public ResourceSettings ( final Application application ) { } public void addResourceFactory ( final String name , IResourceFactory resourceFactory ) { } public void addResourceFolder ( final String resourceFolder ) { } public Localizer getLocalizer ( ) { } public IPackageResourceGuard getPackageResourceGuard ( ) { } public IPropertiesFactory getPropertiesFactory ( ) { if ( ( propertiesFactory ) == null ) { <START_BUG> propertiesFactory = new org . apache . wicket . resource . PropertiesFactory ( Application . get ( ) ) ; <END_BUG> } return propertiesFactory ; } public IResourceFactory getResourceFactory ( final String name ) { } public IResourceFinder getResourceFinder ( ) { } public Duration getResourcePollFrequency ( ) { } public IResourceStreamLocator getResourceStreamLocator ( ) { } public IModificationWatcher getResourceWatcher ( boolean start ) { } public void setResourceWatcher ( IModificationWatcher watcher ) { } public IFileUploadCleaner getFileUploadCleaner ( ) { } public void setFileUploadCleaner ( IFileUploadCleaner fileUploadCleaner ) { } public List < IStringResourceLoader > getStringResourceLoaders ( ) { } public boolean getThrowExceptionOnMissingResource ( ) { } public boolean getUseDefaultOnMissingResource ( ) { } public void setLocalizer ( final Localizer localizer ) { } public void setPackageResourceGuard ( IPackageResourceGuard packageResourceGuard ) { } public void setPropertiesFactory ( IPropertiesFactory factory ) { } public void setResourceFinder ( final IResourceFinder resourceFinder ) { } public void setResourcePollFrequency ( final Duration resourcePollFrequency ) { } public void setResourceStreamLocator ( IResourceStreamLocator resourceStreamLocator ) { } public void setThrowExceptionOnMissingResource ( final boolean throwExceptionOnMissingResource ) { } public void setUseDefaultOnMissingResource ( final boolean useDefaultOnMissingResource ) { } public final Duration getDefaultCacheDuration ( ) { } public final void setDefaultCacheDuration ( Duration duration ) { } public IJavaScriptCompressor getJavaScriptCompressor ( ) { } public IJavaScriptCompressor setJavaScriptCompressor ( IJavaScriptCompressor compressor ) { } public ICssCompressor getCssCompressor ( ) { } public ICssCompressor setCssCompressor ( ICssCompressor compressor ) { } public String getParentFolderPlaceholder ( ) { } public void setParentFolderPlaceholder ( final String sequence ) { } public IResourceCachingStrategy getCachingStrategy ( ) { } public void setCachingStrategy ( IResourceCachingStrategy strategy ) { } }

Fix:
propertiesFactory = new PropertiesFactory ( this ) ;