Program: 15579
Project: 15579
Buggy source:
/** 
 * Finds the template in the backing storage and returns an object that identifies the storage location where the template can be loaded from. See the return value for more information.
 * @param name The name of the template, already localized and normalized by the {@link freemarker.cache.TemplateCache cache}. It is completely up to the loader implementation to interpret the name, however it should expect to receive hierarchical paths where path components are separated by a slash (not backslash). Backslashes (or any other OS specific separator character) are not considered as separators by FreeMarker, and thus they will not be replaced with slash before passing to this method, so it's up to the template loader to handle them (say, be throwing and exception that tells the user that the path (s)he has entered is invalid, as (s)he must use slash -- typical mistake of Windows users). The passed names are always considered relative to some loader-defined root location (often referred as the "template root directory"), and will never start with a slash, nor will they contain a path component consisting of either a single or a double dot -- these are all resolved by the template cache before passing the name to the loader. As a side effect, paths that trivially reach outside template root directory, such as <tt>../my.ftl</tt>, will be rejected by the template cache, so they never reach the template loader. Note again, that if the path uses backslash as path separator instead of slash as (the template loader should not accept that), the normalization will not properly happen, as FreeMarker (the cache) recognizes only the slashes as separators.
 * @return An object representing the template source, which can be supplied in subsequent calls to{@link #getLastModified(Object)} and {@link #getReader(Object,String)}, when those are called on the same   {@link TemplateLoader}.   {@code null} must be returned if the source for the template doesn't exist;don't throw exception then! The exact type of this object is up to the  {@link TemplateLoader}implementation. As this object is possibly used as a cache key,   {@link Object#equals(Object)} and{@link Object#hashCode()} must be properly implemented. Especially, template sources that refer to thesame physical source must be equivalent (otherwise template caching can become inefficient). (Of course, this only applies when the compared template sources were generated by the same  {@link TemplateLoader}.)
 * @throws IOException When an error occurs that makes it impossible to find out if the template exists, or to access the existing template. Don't throw exception if the template doesn't exist, instead return with {@code null} then!
 */
public Object findTemplateSource(String name) throws IOException ;

Fixed version (ground truth):
/** 
 * Finds the template in the backing storage and returns an object that identifies the storage location where the template can be loaded from. See the return value for more information.
 * @param name The name of the template, already localized and normalized by the {@link freemarker.cache.TemplateCache cache}. It is completely up to the loader implementation to interpret the name, however it should expect to receive hierarchical paths where path components are separated by a slash (not backslash). Backslashes (or any other OS specific separator character) are not considered as separators by FreeMarker, and thus they will not be replaced with slash before passing to this method, so it's up to the template loader to handle them (say, be throwing and exception that tells the user that the path (s)he has entered is invalid, as (s)he must use slash -- typical mistake of Windows users). The passed names are always considered relative to some loader-defined root location (often referred as the "template root directory"), and will never start with a slash, nor will they contain a path component consisting of either a single or a double dot -- these are all resolved by the template cache before passing the name to the loader. As a side effect, paths that trivially reach outside template root directory, such as <tt>../my.ftl</tt>, will be rejected by the template cache, so they never reach the template loader. Note again, that if the path uses backslash as path separator instead of slash as (the template loader should not accept that), the normalization will not properly happen, as FreeMarker (the cache) recognizes only the slashes as separators.
 * @return An object representing the template source, which can be supplied in subsequent calls to{@link #getLastModified(Object)} and {@link #getReader(Object,String)}, when those are called on the same   {@link TemplateLoader}.   {@code null} must be returned if the source for the template doesn't exist;don't throw exception then! The exact type of this object is up to the  {@link TemplateLoader}implementation. As this object is possibly compared with another template source for equality,  {@link Object#equals(Object)} (and thus {@link Object#hashCode()}) must be properly implemented. Especially, template sources that refer to the same physical source must be equivalent, otherwise template caching can become inefficient. This is only expected from   {@link Object#equals(Object)} whenthe compared template sources came from the same  {@link TemplateLoader} instance.
 * @throws IOException When an error occurs that makes it impossible to find out if the template exists, or to access the existing template. Don't throw exception if the template doesn't exist, instead return with {@code null} then!
 */
public Object findTemplateSource(String name) throws IOException ;