test_class.file: oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/search/util/FunctionIndexProcessorTest.java
test_class.identifier: FunctionIndexProcessorTest
test_case.body: @Test
      public void tryCalculateValue() {
          // length of a string
          assertEquals("value = 11",
                  FunctionIndexProcessor.tryCalculateValue("x",
                  EMPTY_NODE.builder().setProperty("data", "Hello World").getNodeState(),
                  new String[]{"function", "length", "@data"}).toString());
          // length of a binary property
          assertEquals("value = 100",
                  FunctionIndexProcessor.tryCalculateValue("x",
                  EMPTY_NODE.builder().setProperty("data",
                          new ArrayBasedBlob(new byte[100]), Type.BINARY).getNodeState(),
                  new String[]{"function", "length", "@data"}).toString());
          // uppercase
          assertEquals("value = HELLO WORLD",
                  FunctionIndexProcessor.tryCalculateValue("x",
                  EMPTY_NODE.builder().setProperty("data", "Hello World").getNodeState(),
                  new String[]{"function", "upper", "@data"}).toString());
          // lowercase
          assertEquals("value = hello world",
                  FunctionIndexProcessor.tryCalculateValue("x",
                  EMPTY_NODE.builder().setProperty("data", "Hello World").getNodeState(),
                  new String[]{"function", "lower", "@data"}).toString());
      }
test_case.class_method_signature: FunctionIndexProcessorTest.tryCalculateValue()
test_case.full_signature: @Test public void tryCalculateValue()
test_case.identifier: tryCalculateValue
test_case.invocations: assertEquals toString tryCalculateValue getNodeState setProperty builder assertEquals toString tryCalculateValue getNodeState setProperty builder assertEquals toString tryCalculateValue getNodeState setProperty builder assertEquals toString tryCalculateValue getNodeState setProperty builder
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void tryCalculateValue()
focal_class.declarator: LOG =
              LoggerFactory.getLogger(FunctionIndexProcessor.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG =
              LoggerFactory.getLogger(FunctionIndexProcessor.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: remaining
focal_class.modifier: private
focal_class.original_string: private String remaining;
focal_class.type: String
focal_class.var_name: remaining
focal_class.declarator: EMPTY_PROPERTY_STATE = EmptyPropertyState.emptyProperty("empty", Type.STRINGS)
focal_class.modifier: private static final
focal_class.original_string: private static final PropertyState EMPTY_PROPERTY_STATE = EmptyPropertyState.emptyProperty("empty", Type.STRINGS);
focal_class.type: PropertyState
focal_class.var_name: EMPTY_PROPERTY_STATE
focal_class.file: oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/util/FunctionIndexProcessor.java
focal_class.identifier: FunctionIndexProcessor
focal_class.class_method_signature: FunctionIndexProcessor.FunctionIndexProcessor(String function)
focal_class.full_signature: protected  FunctionIndexProcessor(String function)
focal_class.identifier: FunctionIndexProcessor
focal_class.modifiers: protected
focal_class.parameters: (String function)
focal_class.signature:  FunctionIndexProcessor(String function)
focal_class.class_method_signature: FunctionIndexProcessor.getProperties(String[] functionCode)
focal_class.full_signature: public static String[] getProperties(String[] functionCode)
focal_class.identifier: getProperties
focal_class.modifiers: public static
focal_class.parameters: (String[] functionCode)
focal_class.return: String[]
focal_class.signature: String[] getProperties(String[] functionCode)
focal_class.class_method_signature: FunctionIndexProcessor.tryCalculateValue(String path, NodeState state, String[] functionCode)
focal_class.full_signature: public static PropertyState tryCalculateValue(String path, NodeState state, String[] functionCode)
focal_class.identifier: tryCalculateValue
focal_class.modifiers: public static
focal_class.parameters: (String path, NodeState state, String[] functionCode)
focal_class.return: PropertyState
focal_class.signature: PropertyState tryCalculateValue(String path, NodeState state, String[] functionCode)
focal_class.class_method_signature: FunctionIndexProcessor.getFunctionCode(String functionDescription)
focal_class.full_signature: public static String[] getFunctionCode(String functionDescription)
focal_class.identifier: getFunctionCode
focal_class.modifiers: public static
focal_class.parameters: (String functionDescription)
focal_class.return: String[]
focal_class.signature: String[] getFunctionCode(String functionDescription)
focal_class.class_method_signature: FunctionIndexProcessor.calculateFunction(String functionName,
                                                     Deque<PropertyState> stack)
focal_class.full_signature: private static PropertyState calculateFunction(String functionName,
                                                     Deque<PropertyState> stack)
focal_class.identifier: calculateFunction
focal_class.modifiers: private static
focal_class.parameters: (String functionName,
                                                     Deque<PropertyState> stack)
focal_class.return: PropertyState
focal_class.signature: PropertyState calculateFunction(String functionName,
                                                     Deque<PropertyState> stack)
focal_class.class_method_signature: FunctionIndexProcessor.getProperty(String path, NodeState state,
                                               String propertyName)
focal_class.full_signature: private static PropertyState getProperty(String path, NodeState state,
                                               String propertyName)
focal_class.identifier: getProperty
focal_class.modifiers: private static
focal_class.parameters: (String path, NodeState state,
                                               String propertyName)
focal_class.return: PropertyState
focal_class.signature: PropertyState getProperty(String path, NodeState state,
                                               String propertyName)
focal_class.class_method_signature: FunctionIndexProcessor.getLocalName(String name)
focal_class.full_signature: private static String getLocalName(String name)
focal_class.identifier: getLocalName
focal_class.modifiers: private static
focal_class.parameters: (String name)
focal_class.return: String
focal_class.signature: String getLocalName(String name)
focal_class.class_method_signature: FunctionIndexProcessor.convertToPolishNotation(String function)
focal_class.full_signature: public static String convertToPolishNotation(String function)
focal_class.identifier: convertToPolishNotation
focal_class.modifiers: public static
focal_class.parameters: (String function)
focal_class.return: String
focal_class.signature: String convertToPolishNotation(String function)
focal_class.class_method_signature: FunctionIndexProcessor.parse()
focal_class.full_signature:  String parse()
focal_class.identifier: parse
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String parse()
focal_class.class_method_signature: FunctionIndexProcessor.property(String p)
focal_class.full_signature:  String property(String p)
focal_class.identifier: property
focal_class.parameters: (String p)
focal_class.return: String
focal_class.signature: String property(String p)
focal_class.class_method_signature: FunctionIndexProcessor.read(String string)
focal_class.full_signature: private String read(String string)
focal_class.identifier: read
focal_class.modifiers: private
focal_class.parameters: (String string)
focal_class.return: String
focal_class.signature: String read(String string)
focal_class.class_method_signature: FunctionIndexProcessor.readCommaAndWhitespace()
focal_class.full_signature: private String readCommaAndWhitespace()
focal_class.identifier: readCommaAndWhitespace
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String readCommaAndWhitespace()
focal_class.class_method_signature: FunctionIndexProcessor.match(String string)
focal_class.full_signature: private boolean match(String string)
focal_class.identifier: match
focal_class.modifiers: private
focal_class.parameters: (String string)
focal_class.return: boolean
focal_class.signature: boolean match(String string)
focal_method.body: public static PropertyState tryCalculateValue(String path, NodeState state, String[] functionCode) {
          Deque<PropertyState> stack = new ArrayDeque<>();
          for (int i = functionCode.length - 1; i > 0; i--) {
              String token = functionCode[i];
              PropertyState ps;
              if (token.startsWith("@")) {
                  String propertyName = token.substring(1);
                  ps = getProperty(path, state, propertyName);
              } else {
                  ps = calculateFunction(token, stack);
              }
              if (ps == null) {
                  ps = EMPTY_PROPERTY_STATE;
              }
              stack.push(ps);
          }
  
          PropertyState ret = stack.pop();
          return ret==EMPTY_PROPERTY_STATE ? null : ret;
      }
focal_method.class_method_signature: FunctionIndexProcessor.tryCalculateValue(String path, NodeState state, String[] functionCode)
focal_method.full_signature: public static PropertyState tryCalculateValue(String path, NodeState state, String[] functionCode)
focal_method.identifier: tryCalculateValue
focal_method.invocations: startsWith substring getProperty calculateFunction push pop
focal_method.modifiers: public static
focal_method.parameters: (String path, NodeState state, String[] functionCode)
focal_method.return: PropertyState
focal_method.signature: PropertyState tryCalculateValue(String path, NodeState state, String[] functionCode)