test_class.declarator: temporaryFolder = new TemporaryFolder(new File("target"))
test_class.modifier: @Rule
      public
test_class.original_string: @Rule
      public TemporaryFolder temporaryFolder = new TemporaryFolder(new File("target"));
test_class.type: TemporaryFolder
test_class.var_name: temporaryFolder
test_class.declarator: root = INITIAL_CONTENT
test_class.modifier: private
test_class.original_string: private NodeState root = INITIAL_CONTENT;
test_class.type: NodeState
test_class.var_name: root
test_class.declarator: idx = new LuceneIndexDefinitionBuilder().build().builder()
test_class.modifier: private
test_class.original_string: private NodeBuilder idx = new LuceneIndexDefinitionBuilder().build().builder();
test_class.type: NodeBuilder
test_class.var_name: idx
test_class.file: oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/FSDirectoryFactoryTest.java
test_class.identifier: FSDirectoryFactoryTest
test_case.body: @Test
      public void singleIndex() throws Exception{
          LuceneIndexDefinition defn = LuceneIndexDefinition.newBuilder(root, idx.getNodeState(), "/fooIndex").build();
          FSDirectoryFactory factory = new FSDirectoryFactory(temporaryFolder.getRoot());
  
          Directory dir = factory.newInstance(defn, idx, ":data", false);
          dir.close();
  
          IndexRootDirectory idxDir = new IndexRootDirectory(temporaryFolder.getRoot());
          List<LocalIndexDir> indexes = idxDir.getAllLocalIndexes();
          assertEquals(1, indexes.size());
          assertEquals("/fooIndex", indexes.get(0).getJcrPath());
          assertTrue(new File(indexes.get(0).dir, "data").exists());
      }
test_case.class_method_signature: FSDirectoryFactoryTest.singleIndex()
test_case.full_signature: @Test public void singleIndex()
test_case.identifier: singleIndex
test_case.invocations: build newBuilder getNodeState getRoot newInstance close getRoot getAllLocalIndexes assertEquals size assertEquals getJcrPath get assertTrue exists get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void singleIndex()
focal_class.declarator: baseDir
focal_class.modifier: private final
focal_class.original_string: private final File baseDir;
focal_class.type: File
focal_class.var_name: baseDir
focal_class.file: oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/FSDirectoryFactory.java
focal_class.identifier: FSDirectoryFactory
focal_class.interfaces: implements DirectoryFactory
focal_class.class_method_signature: FSDirectoryFactory.FSDirectoryFactory(File baseDir)
focal_class.full_signature: public  FSDirectoryFactory(File baseDir)
focal_class.identifier: FSDirectoryFactory
focal_class.modifiers: public
focal_class.parameters: (File baseDir)
focal_class.signature:  FSDirectoryFactory(File baseDir)
focal_class.class_method_signature: FSDirectoryFactory.newInstance(LuceneIndexDefinition definition, NodeBuilder builder,
                                   String dirName, boolean reindex)
focal_class.full_signature: @Override public Directory newInstance(LuceneIndexDefinition definition, NodeBuilder builder,
                                   String dirName, boolean reindex)
focal_class.identifier: newInstance
focal_class.modifiers: @Override public
focal_class.parameters: (LuceneIndexDefinition definition, NodeBuilder builder,
                                   String dirName, boolean reindex)
focal_class.return: Directory
focal_class.signature: Directory newInstance(LuceneIndexDefinition definition, NodeBuilder builder,
                                   String dirName, boolean reindex)
focal_class.class_method_signature: FSDirectoryFactory.remoteDirectory()
focal_class.full_signature: @Override public boolean remoteDirectory()
focal_class.identifier: remoteDirectory
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean remoteDirectory()
focal_method.body: @Override
      public Directory newInstance(LuceneIndexDefinition definition, NodeBuilder builder,
                                   String dirName, boolean reindex) throws IOException {
          File indexDir = DirectoryUtils.createIndexDir(baseDir, definition.getIndexPath());
          File readMe = new File(indexDir, INDEX_METADATA_FILE_NAME);
          File subDir = DirectoryUtils.createSubDir(indexDir, dirName);
          FileUtils.forceMkdir(subDir);
  
          IndexMeta meta;
          if (!readMe.exists()) {
              meta = new IndexMeta(definition.getIndexPath());
          } else {
              meta = new IndexMeta(readMe);
          }
          meta.addDirectoryMapping(dirName, subDir.getName());
          DirectoryUtils.writeMeta(indexDir, meta);
          return FSDirectory.open(subDir, NoLockFactory.getNoLockFactory());
      }
focal_method.class_method_signature: FSDirectoryFactory.newInstance(LuceneIndexDefinition definition, NodeBuilder builder,
                                   String dirName, boolean reindex)
focal_method.full_signature: @Override public Directory newInstance(LuceneIndexDefinition definition, NodeBuilder builder,
                                   String dirName, boolean reindex)
focal_method.identifier: newInstance
focal_method.invocations: createIndexDir getIndexPath createSubDir forceMkdir exists getIndexPath addDirectoryMapping getName writeMeta open getNoLockFactory
focal_method.modifiers: @Override public
focal_method.parameters: (LuceneIndexDefinition definition, NodeBuilder builder,
                                   String dirName, boolean reindex)
focal_method.return: Directory
focal_method.signature: Directory newInstance(LuceneIndexDefinition definition, NodeBuilder builder,
                                   String dirName, boolean reindex)