test_class.declarator: rootState = InitialContentHelper.INITIAL_CONTENT
test_class.modifier: private
test_class.original_string: private NodeState rootState = InitialContentHelper.INITIAL_CONTENT;
test_class.type: NodeState
test_class.var_name: rootState
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.declarator: temporaryFolder = new TemporaryFolder(new File("target"))
test_class.modifier: @Rule
      public final
test_class.original_string: @Rule
      public final TemporaryFolder temporaryFolder = new TemporaryFolder(new File("target"));
test_class.type: TemporaryFolder
test_class.var_name: temporaryFolder
test_class.file: oak-lucene/src/test/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/IndexConsistencyCheckerTest.java
test_class.identifier: IndexConsistencyCheckerTest
test_case.body: @Test
      public void badFile() throws Exception{
          LuceneIndexDefinition defn = LuceneIndexDefinition.newBuilder(rootState, idx.getNodeState(), "/fooIndex").build();
          Directory dir = new OakDirectory(idx, ":data", defn, false);
          createIndex(dir, 10);
  
          NodeBuilder builder = rootState.builder();
  
          NodeBuilder file = idx.getChildNode(":data").getChildNode("_0.cfe");
          List<Blob> blobs = Lists.newArrayList(file.getProperty("jcr:data").getValue(Type.BINARIES));
  
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          IOUtils.copy(blobs.get(0).getNewStream(), baos);
          byte[] bytes = baos.toByteArray();
          bytes[0] = (byte)(bytes[0] ^ (1 << 3)); //Flip the 3rd bit to make it corrupt
          blobs.set(0, new ArrayBasedBlob(bytes));
          file.setProperty("jcr:data", blobs, Type.BINARIES);
  
          builder.setChildNode("fooIndex", idx.getNodeState());
          NodeState indexState = builder.getNodeState();
  
  
          IndexConsistencyChecker checker = new IndexConsistencyChecker(indexState, "/fooIndex", temporaryFolder.getRoot());
          Result result = checker.check(Level.FULL);
          assertFalse(result.clean);
          assertEquals(0, result.dirStatus.get(0).missingFiles.size());
          assertFalse(result.dirStatus.get(0).status.clean);
      }
test_case.class_method_signature: IndexConsistencyCheckerTest.badFile()
test_case.full_signature: @Test public void badFile()
test_case.identifier: badFile
test_case.invocations: build newBuilder getNodeState createIndex builder getChildNode getChildNode newArrayList getValue getProperty copy getNewStream get toByteArray set setProperty setChildNode getNodeState getNodeState getRoot check assertFalse assertEquals size get assertFalse get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void badFile()
focal_class.declarator: log = LoggerFactory.getLogger(getClass())
focal_class.modifier: private final
focal_class.original_string: private final Logger log = LoggerFactory.getLogger(getClass());
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: rootState
focal_class.modifier: private final
focal_class.original_string: private final NodeState rootState;
focal_class.type: NodeState
focal_class.var_name: rootState
focal_class.declarator: indexPath
focal_class.modifier: private final
focal_class.original_string: private final String indexPath;
focal_class.type: String
focal_class.var_name: indexPath
focal_class.declarator: workDirRoot
focal_class.modifier: private final
focal_class.original_string: private final File workDirRoot;
focal_class.type: File
focal_class.var_name: workDirRoot
focal_class.declarator: workDir
focal_class.modifier: private
focal_class.original_string: private File workDir;
focal_class.type: File
focal_class.var_name: workDir
focal_class.declarator: printStream
focal_class.modifier: private
focal_class.original_string: private PrintStream printStream;
focal_class.type: PrintStream
focal_class.var_name: printStream
focal_class.declarator: verbose
focal_class.modifier: private
focal_class.original_string: private boolean verbose;
focal_class.type: boolean
focal_class.var_name: verbose
focal_class.file: oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/directory/IndexConsistencyChecker.java
focal_class.identifier: IndexConsistencyChecker
focal_class.class_method_signature: IndexConsistencyChecker.IndexConsistencyChecker(NodeState rootState, String indexPath, File workDirRoot)
focal_class.full_signature: public  IndexConsistencyChecker(NodeState rootState, String indexPath, File workDirRoot)
focal_class.identifier: IndexConsistencyChecker
focal_class.modifiers: public
focal_class.parameters: (NodeState rootState, String indexPath, File workDirRoot)
focal_class.signature:  IndexConsistencyChecker(NodeState rootState, String indexPath, File workDirRoot)
focal_class.class_method_signature: IndexConsistencyChecker.setPrintStream(PrintStream printStream)
focal_class.full_signature: public void setPrintStream(PrintStream printStream)
focal_class.identifier: setPrintStream
focal_class.modifiers: public
focal_class.parameters: (PrintStream printStream)
focal_class.return: void
focal_class.signature: void setPrintStream(PrintStream printStream)
focal_class.class_method_signature: IndexConsistencyChecker.setVerbose(boolean verbose)
focal_class.full_signature: public void setVerbose(boolean verbose)
focal_class.identifier: setVerbose
focal_class.modifiers: public
focal_class.parameters: (boolean verbose)
focal_class.return: void
focal_class.signature: void setVerbose(boolean verbose)
focal_class.class_method_signature: IndexConsistencyChecker.check(Level level)
focal_class.full_signature: public Result check(Level level)
focal_class.identifier: check
focal_class.modifiers: public
focal_class.parameters: (Level level)
focal_class.return: Result
focal_class.signature: Result check(Level level)
focal_class.class_method_signature: IndexConsistencyChecker.check(Level level, boolean cleanWorkDir)
focal_class.full_signature: public Result check(Level level, boolean cleanWorkDir)
focal_class.identifier: check
focal_class.modifiers: public
focal_class.parameters: (Level level, boolean cleanWorkDir)
focal_class.return: Result
focal_class.signature: Result check(Level level, boolean cleanWorkDir)
focal_class.class_method_signature: IndexConsistencyChecker.check(Level level, boolean cleanWorkDir, Closer closer)
focal_class.full_signature: private Result check(Level level, boolean cleanWorkDir, Closer closer)
focal_class.identifier: check
focal_class.modifiers: private
focal_class.parameters: (Level level, boolean cleanWorkDir, Closer closer)
focal_class.return: Result
focal_class.signature: Result check(Level level, boolean cleanWorkDir, Closer closer)
focal_class.class_method_signature: IndexConsistencyChecker.checkIndex(Result result, Closer closer)
focal_class.full_signature: private void checkIndex(Result result, Closer closer)
focal_class.identifier: checkIndex
focal_class.modifiers: private
focal_class.parameters: (Result result, Closer closer)
focal_class.return: void
focal_class.signature: void checkIndex(Result result, Closer closer)
focal_class.class_method_signature: IndexConsistencyChecker.checkIndexDirectory(DirectoryStatus dirStatus, NodeState idx, LuceneIndexDefinition defn,
                                       File workDir, String dirName, Closer closer)
focal_class.full_signature: private void checkIndexDirectory(DirectoryStatus dirStatus, NodeState idx, LuceneIndexDefinition defn,
                                       File workDir, String dirName, Closer closer)
focal_class.identifier: checkIndexDirectory
focal_class.modifiers: private
focal_class.parameters: (DirectoryStatus dirStatus, NodeState idx, LuceneIndexDefinition defn,
                                       File workDir, String dirName, Closer closer)
focal_class.return: void
focal_class.signature: void checkIndexDirectory(DirectoryStatus dirStatus, NodeState idx, LuceneIndexDefinition defn,
                                       File workDir, String dirName, Closer closer)
focal_class.class_method_signature: IndexConsistencyChecker.checkBlobs(Result result)
focal_class.full_signature: private void checkBlobs(Result result)
focal_class.identifier: checkBlobs
focal_class.modifiers: private
focal_class.parameters: (Result result)
focal_class.return: void
focal_class.signature: void checkBlobs(Result result)
focal_class.class_method_signature: IndexConsistencyChecker.checkBlobs(Result result, Tree tree)
focal_class.full_signature: private void checkBlobs(Result result, Tree tree)
focal_class.identifier: checkBlobs
focal_class.modifiers: private
focal_class.parameters: (Result result, Tree tree)
focal_class.return: void
focal_class.signature: void checkBlobs(Result result, Tree tree)
focal_class.class_method_signature: IndexConsistencyChecker.checkBlob(String propName, Blob blob, Tree tree, Result result)
focal_class.full_signature: private void checkBlob(String propName, Blob blob, Tree tree, Result result)
focal_class.identifier: checkBlob
focal_class.modifiers: private
focal_class.parameters: (String propName, Blob blob, Tree tree, Result result)
focal_class.return: void
focal_class.signature: void checkBlob(String propName, Blob blob, Tree tree, Result result)
focal_class.class_method_signature: IndexConsistencyChecker.createWorkDir(File parent, String name)
focal_class.full_signature: private static File createWorkDir(File parent, String name)
focal_class.identifier: createWorkDir
focal_class.modifiers: private static
focal_class.parameters: (File parent, String name)
focal_class.return: File
focal_class.signature: File createWorkDir(File parent, String name)
focal_method.body: public Result check(Level level) throws IOException {
          return check(level, true);
      }
focal_method.class_method_signature: IndexConsistencyChecker.check(Level level)
focal_method.full_signature: public Result check(Level level)
focal_method.identifier: check
focal_method.invocations: check
focal_method.modifiers: public
focal_method.parameters: (Level level)
focal_method.return: Result
focal_method.signature: Result check(Level level)