Program: 24688
Project: 24688
Buggy source:
/** 
 * Search for a StructuredStore containing the "lazy" or persistent representation of a given document. Index parameters are specified, since often the lazy file is stored along with the index. This method is called first, and if it returns null, then  {@link #getInputSource(String,boolean)} will be called as a fall-back.
 * @param indexConfigPath Path to the index configuration file
 * @param indexName       Name of the index being searched
 * @param sourcePath      Path to the source document
 * @param preFilter       Prefilter stylesheet to run (or null for none)
 * @param removeDoctypeDecl Set to true to remove DOCTYPE declaration fromthe XML document.
 * @return                Store containing the tree, or null if nonecould be found.
 */
public StructuredStore getLazyStore(String indexConfigPath,String indexName,String sourcePath,Templates preFilter,boolean removeDoctypeDecl) throws IOException {
  TextConfig config=servlet.getConfig();
  if (config instanceof DynaXMLConfig && !((DynaXMLConfig)config).useLazyFiles)   return null;
  if (indexConfigPath == null || indexName == null)   return null;
  if (sourcePath.startsWith("String_Node_Str"))   return null;
  if (sourcePath.startsWith("String_Node_Str"))   return null;
  File sourceFile=new File(sourcePath);
  if (!sourceFile.isFile())   return null;
  File lazyFile=IndexUtil.calcLazyPath(new File(servlet.getRealPath("String_Node_Str")),new File(indexConfigPath),indexName,new File(sourcePath),false);
  boolean buildLazyFilesAlone=false;
  if (config instanceof DynaXMLConfig)   buildLazyFilesAlone=((DynaXMLConfig)config).buildLazyFilesAlone;
  if (buildLazyFilesAlone && lazyFile.canRead() && sourceFile.lastModified() > lazyFile.lastModified() && isPostIndexLazyFile(lazyFile)) {
    lazyFile.delete();
  }
  if (!lazyFile.canRead()) {
    if (!buildLazyFilesAlone)     return null;
    boolean stripWhitespace=false;
    try {
      stripWhitespace=IndexUtil.getIndexInfo(new File(indexConfigPath),indexName).stripWhitespace;
    }
 catch (    Exception e) {
    }
    buildLazyStore(lazyFile,sourcePath,preFilter,removeDoctypeDecl,stripWhitespace);
  }
  return StructuredFile.open(lazyFile);
}

Fixed version (ground truth):
/** 
 * Search for a StructuredStore containing the "lazy" or persistent representation of a given document. Index parameters are specified, since often the lazy file is stored along with the index. This method is called first, and if it returns null, then  {@link #getInputSource(String,boolean)} will be called as a fall-back.
 * @param indexConfigPath Path to the index configuration file
 * @param indexName       Name of the index being searched
 * @param sourcePath      Path to the source document
 * @param preFilter       Prefilter stylesheet to run (or null for none)
 * @param removeDoctypeDecl Set to true to remove DOCTYPE declaration fromthe XML document.
 * @return                Store containing the tree, or null if nonecould be found.
 */
public StructuredStore getLazyStore(String indexConfigPath,String indexName,String sourcePath,Templates preFilter,boolean removeDoctypeDecl) throws IOException {
  TextConfig config=servlet.getConfig();
  if (config instanceof DynaXMLConfig && !((DynaXMLConfig)config).useLazyFiles)   return null;
  if (indexConfigPath == null || indexName == null)   return null;
  if (sourcePath.startsWith("String_Node_Str"))   return null;
  if (sourcePath.startsWith("String_Node_Str"))   return null;
  File sourceFile=new File(sourcePath);
  if (!sourceFile.isFile())   return null;
  File lazyFile=calcLazyPath(new File(servlet.getRealPath("String_Node_Str")),new File(indexConfigPath),indexName,new File(sourcePath),false);
  boolean buildLazyFilesAlone=false;
  if (config instanceof DynaXMLConfig)   buildLazyFilesAlone=((DynaXMLConfig)config).buildLazyFilesAlone;
  if (buildLazyFilesAlone && lazyFile.canRead() && sourceFile.lastModified() > lazyFile.lastModified() && isPostIndexLazyFile(lazyFile)) {
    lazyFile.delete();
  }
  if (!lazyFile.canRead()) {
    if (!buildLazyFilesAlone)     return null;
    boolean stripWhitespace=false;
    try {
      stripWhitespace=IndexUtil.getIndexInfo(new File(indexConfigPath),indexName).stripWhitespace;
    }
 catch (    Exception e) {
    }
    buildLazyStore(lazyFile,sourcePath,preFilter,removeDoctypeDecl,stripWhitespace);
  }
  return StructuredFile.open(lazyFile);
}