test_class.declarator: p = SQL2ParserTest.createTestSQL2Parser()
test_class.modifier: private static final
test_class.original_string: private static final SQL2Parser p = SQL2ParserTest.createTestSQL2Parser();
test_class.type: SQL2Parser
test_class.var_name: p
test_class.file: oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/search/util/LMSEstimatorTest.java
test_class.identifier: LMSEstimatorTest
test_case.body: @Test
      public void testEstimate() throws Exception {
          LMSEstimator lmsEstimator = new LMSEstimator();
          Filter filter = mock(Filter.class);
          long estimate = lmsEstimator.estimate(filter);
          assertEquals(0L, estimate);
      }
test_case.class_method_signature: LMSEstimatorTest.testEstimate()
test_case.full_signature: @Test public void testEstimate()
test_case.identifier: testEstimate
test_case.invocations: mock estimate assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEstimate()
focal_class.declarator: DEFAULT_ALPHA = 0.03
focal_class.modifier: private static final
focal_class.original_string: private static final double DEFAULT_ALPHA = 0.03;
focal_class.type: double
focal_class.var_name: DEFAULT_ALPHA
focal_class.declarator: DEFAULT_THRESHOLD = 5
focal_class.modifier: private static final
focal_class.original_string: private static final int DEFAULT_THRESHOLD = 5;
focal_class.type: int
focal_class.var_name: DEFAULT_THRESHOLD
focal_class.declarator: weights
focal_class.modifier: private
focal_class.original_string: private double[] weights;
focal_class.type: double[]
focal_class.var_name: weights
focal_class.declarator: alpha
focal_class.modifier: private final
focal_class.original_string: private final double alpha;
focal_class.type: double
focal_class.var_name: alpha
focal_class.declarator: threshold
focal_class.modifier: private final
focal_class.original_string: private final long threshold;
focal_class.type: long
focal_class.var_name: threshold
focal_class.file: oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/util/LMSEstimator.java
focal_class.identifier: LMSEstimator
focal_class.class_method_signature: LMSEstimator.LMSEstimator(double alpha, double[] weights, long threshold)
focal_class.full_signature: private  LMSEstimator(double alpha, double[] weights, long threshold)
focal_class.identifier: LMSEstimator
focal_class.modifiers: private
focal_class.parameters: (double alpha, double[] weights, long threshold)
focal_class.signature:  LMSEstimator(double alpha, double[] weights, long threshold)
focal_class.class_method_signature: LMSEstimator.LMSEstimator()
focal_class.full_signature: public  LMSEstimator()
focal_class.identifier: LMSEstimator
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  LMSEstimator()
focal_class.class_method_signature: LMSEstimator.update(Filter filter, long numFound)
focal_class.full_signature: public synchronized void update(Filter filter, long numFound)
focal_class.identifier: update
focal_class.modifiers: public synchronized
focal_class.parameters: (Filter filter, long numFound)
focal_class.return: void
focal_class.signature: void update(Filter filter, long numFound)
focal_class.class_method_signature: LMSEstimator.estimate(Filter filter)
focal_class.full_signature: public long estimate(Filter filter)
focal_class.identifier: estimate
focal_class.modifiers: public
focal_class.parameters: (Filter filter)
focal_class.return: long
focal_class.signature: long estimate(Filter filter)
focal_class.class_method_signature: LMSEstimator.getInput(Filter filter, int i)
focal_class.full_signature: private long getInput(Filter filter, int i)
focal_class.identifier: getInput
focal_class.modifiers: private
focal_class.parameters: (Filter filter, int i)
focal_class.return: long
focal_class.signature: long getInput(Filter filter, int i)
focal_method.body: public long estimate(Filter filter) {
          long estimatedEntryCount = 0;
          for (int i = 0; i < 5; i++) {
              estimatedEntryCount += weights[i] * getInput(filter, i);
          }
          if (Double.isInfinite(estimatedEntryCount) || Double.isNaN(estimatedEntryCount)) {
              // prevent over / under flow
              estimatedEntryCount = 1;
              weights = new double[5];
          }
          return Math.max(0, estimatedEntryCount);
      }
focal_method.class_method_signature: LMSEstimator.estimate(Filter filter)
focal_method.full_signature: public long estimate(Filter filter)
focal_method.identifier: estimate
focal_method.invocations: getInput isInfinite isNaN max
focal_method.modifiers: public
focal_method.parameters: (Filter filter)
focal_method.return: long
focal_method.signature: long estimate(Filter filter)