Buggy code:
public static final String SPECIFIC_WEBAPP_CONFIG_FILE = "//WEB-INF//config//specific_webapp_config.properties" ; static final String EDIT_USERS_KEY = "edit.users" ; static final String DEFAULT_CREDENTIALS = "admin,0DPiKuNIrrVmD8IUCuw1hQxNqZc=" ; private static final String FILE_NAME = "static-config.properties" ; private static final String DEFAULT_CONFIG_DIR = "//WEB-INF//config" ; private static final String SMTP_HOST_PARAM = "mail.smtp.host" ; private static final String SMTP_PORT_PARAM = "mail.smtp.port" ; private static final String SMTP_USER_PARAM = "mail.smtp.user" ; private static final String SMTP_PASSWORD_PARAM = "mail.smtp.password" ; private static final String STATIC_CONFIG_RELATIVE_KEY = "static-config.relative" ; private static final String STATIC_CONFIG_KEY = "static-config.directory" ; private static final String KEY = StaticConfig . class . getName ( ) ; public static StaticConfig getInstance ( HttpSession session ) { } public static StaticConfig getInstance ( ServletContext application ) { } private ServletContext application = null ; private String defaultProxyHost = null ; private int defaultProxyPort = - 1 ; private String staticConfigLocalisation ; private Class < IUserFactory > adminUserFactoryClass = null ; private AdminUserFactory admimUserFactory = null ; private String adminUserFactoryClassName = "" ; private Map < String , String > devices = null ; private StaticConfig ( ServletContext application ) { } public Level getAbstractComponentLogLevel ( ) { } public Level getAccessLogLevel ( ) { } public AdminUserFactory getAdminUserFactory ( GlobalContext globalContext , HttpSession session ) throws ClassNotFoundException , IllegalAccessException , IllegalArgumentException , InstantiationException , NoSuchMethodException , SecurityException , InvocationTargetException { } private Class < IUserFactory > getAdminUserFactoryClass ( ) throws ClassNotFoundException { } public String getAdminUserFactoryClassName ( ) { } public Level getAllComponentLogLevel ( ) { } public String getAllDataFolder ( ) { } public String getExternalComponentFolder ( ) { } public Level getAllLogLevel ( ) { } public String getAllProperties ( ) throws IOException { } public String getAttribute ( String key , String defaultValue ) { } public Set < String > getBackupExcludePatterns ( ) { } public String getBackupFolder ( ) { } public Set < String > getBackupIncludePatterns ( ) { } public String getCacheFolder ( ) { } public int getCacheLinkedPage ( ) { } public String getContextFolder ( ) { } public String getCSVFolder ( ) { } public Map < String , String > getDataSource ( ) { } public String getDBDriver ( ) { } public String getDBLogin ( ) { } public String getDBPassword ( ) { } public String getDBResourceName ( ) { } public String getDBURL ( ) { } public String getDefaultContext ( ) { } public String getDefaultImage ( ) { } public String getDefaultProxyHost ( ) { } public int getDefaultProxyPort ( ) { } public String getDefaultReport ( ) { } public String getDefaultSender ( ) { } public String getDefaultSubject ( ) { } public Map < String , String > getDevices ( ) { } public String getDynamicContentPage ( ) { } public String [ ] getEditTemplate ( ) { } public Map < String , User > getEditUsers ( ) { } public String getEHCacheConfigFile ( ) { } public String getEnv ( ) { } public String getErrorMailReport ( ) { } public String getFileFolder ( ) { } public String getFlashFolder ( ) { } public String getFooterMessage ( String lang ) { } public String getGalleryFolder ( ) { } public String getHeaderMessage ( String lang ) { } public String getI18nEditFile ( ) { } public String getI18nSpecificEditFile ( ) { } public String getI18nSpecificViewFile ( ) { } public String getI18nViewFile ( ) { } public String getImageFolder ( ) { } public String getVideoFolder ( ) { } public String getIMHelpURI ( String lang ) { } public String getInstanceId ( ) { } public int getLastAccessPage ( ) { } public int getLastAccessStatic ( ) { } public String getLDAPInitalContextFactory ( ) { } public String getLDAPProviderURL ( ) { } public String getLDAPSecurityAuthentification ( ) { } public String getLDAPSecurityCredentials ( ) { } public String getLDAPSecurityPrincipal ( ) { } public String getLocalMailingFolder ( ) { } public String getLocalMailingHistoryFolder ( ) { } public String getLocalMailingTemplateFolder ( ) { } public String getLocalShareDataFolder ( ) { } public String getLocalTempDir ( ) { <START_BUG> String path = properties . getString ( "temp-folder" , "WEB-INF//tmp" ) ; <END_BUG> if ( path != null ) { path = replaceFolderVariable ( path ) ; } return path ; } public String getLocalTemplateFolder ( ) { } public String getLocalTemplatePluginFolder ( ) { } public String getLocalThreadFolder ( ) { } public Level getLoginLogLevel ( ) { } public String getMacroHelpURI ( String lang ) { } public String getMailingFolder ( ) { } public String getMailingHistoryFolder ( ) { } public String getMailingTemplateFolder ( ) { } public int getMaxMenuTitleSize ( ) { } public String getMenuEditHelpURI ( String lang ) { } public long getMinFreeSpaceOnDataFolder ( ) { } public Level getNavigationLogLevel ( ) { } public String getPagePropertiesHelpURI ( String lang ) { } public String getPersistanceHelpURI ( String lang ) { } public String getProductVersion ( ) { } @ SuppressWarnings ( "unchecked" ) public Properties getProperties ( ) { } public String getProxyHost ( ) { } public int getProxyPort ( ) { } public int getPublishLoadingDepth ( ) { } public String getRealPath ( String path ) { } public String getSecretKey ( ) { } public String getShareDataFolder ( ) { } public String getShareDataFolderKey ( ) { } public String getShareImageFolder ( ) { } public String getSMTPHost ( ) { } public String getSMTPPasswordParam ( ) { } public String getSMTPPort ( ) { } public String getSMTPUser ( ) { } public List < IMacro > getSpecialMacros ( ) { } public String getStaticConfigLocalisation ( ) { } public String getStaticFolder ( ) { } public String getSynchroCode ( ) { } public Level getSynchroLogLevel ( ) { } public String getTeaserFolder ( ) { } public String getTempDir ( ) { } public String getTemplateFolder ( ) { } public String getDefaultTemplateFolder ( ) { } public String getTemplatePluginFolder ( ) { }

Fix:
String path = properties . getString ( "temp-folder" , null ) ;