test_class.file: oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/search/spi/query/IndexNameTest.java
test_class.identifier: IndexNameTest
test_case.body: @Test
      public void parse() {
          assertEquals("/lucene base=/lucene product=0 custom=0", 
                  IndexName.parse("/lucene").toString());
          assertEquals("/lucene-1 base=/lucene versioned product=1 custom=0", 
                  IndexName.parse("/lucene-1").toString());
          assertEquals("/lucene-2 base=/lucene versioned product=2 custom=0", 
                  IndexName.parse("/lucene-2").toString());
          assertEquals("/lucene-custom-3 base=/lucene versioned product=0 custom=3", 
                  IndexName.parse("/lucene-custom-3").toString());
          assertEquals("/lucene-4-custom-5 base=/lucene versioned product=4 custom=5", 
                  IndexName.parse("/lucene-4-custom-5").toString());
          assertEquals("/lucene-12-custom-34 base=/lucene versioned product=12 custom=34", 
                  IndexName.parse("/lucene-12-custom-34").toString());
          // illegal
          assertEquals("/lucene-abc base=/lucene-abc product=0 custom=0 illegal", 
                  IndexName.parse("/lucene-abc").toString());
          assertEquals("/lucene-abc-custom-2 base=/lucene-abc-custom-2 product=0 custom=0 illegal", 
                  IndexName.parse("/lucene-abc-custom-2").toString());
      }
test_case.class_method_signature: IndexNameTest.parse()
test_case.full_signature: @Test public void parse()
test_case.identifier: parse
test_case.invocations: assertEquals toString parse assertEquals toString parse assertEquals toString parse assertEquals toString parse assertEquals toString parse assertEquals toString parse assertEquals toString parse assertEquals toString parse
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void parse()
focal_class.declarator: LOG = LoggerFactory.getLogger(IndexName.class)
focal_class.modifier: private final static
focal_class.original_string: private final static Logger LOG = LoggerFactory.getLogger(IndexName.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: LOGGED_WARN = new HashSet<>()
focal_class.modifier: private static final
focal_class.original_string: private static final HashSet<String> LOGGED_WARN = new HashSet<>();
focal_class.type: HashSet<String>
focal_class.var_name: LOGGED_WARN
focal_class.declarator: nextLogWarnClear
focal_class.modifier: private static
focal_class.original_string: private static long nextLogWarnClear;
focal_class.type: long
focal_class.var_name: nextLogWarnClear
focal_class.declarator: nodeName
focal_class.modifier: private final
focal_class.original_string: private final String nodeName;
focal_class.type: String
focal_class.var_name: nodeName
focal_class.declarator: baseName
focal_class.modifier: private final
focal_class.original_string: private final String baseName;
focal_class.type: String
focal_class.var_name: baseName
focal_class.declarator: isVersioned
focal_class.modifier: private final
focal_class.original_string: private final boolean isVersioned;
focal_class.type: boolean
focal_class.var_name: isVersioned
focal_class.declarator: productVersion
focal_class.modifier: private final
focal_class.original_string: private final int productVersion;
focal_class.type: int
focal_class.var_name: productVersion
focal_class.declarator: customerVersion
focal_class.modifier: private final
focal_class.original_string: private final int customerVersion;
focal_class.type: int
focal_class.var_name: customerVersion
focal_class.declarator: isLegal
focal_class.modifier: private final
focal_class.original_string: private final boolean isLegal;
focal_class.type: boolean
focal_class.var_name: isLegal
focal_class.file: oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/query/IndexName.java
focal_class.identifier: IndexName
focal_class.interfaces: implements Comparable<IndexName>
focal_class.class_method_signature: IndexName.parse(final String nodeName)
focal_class.full_signature: public static IndexName parse(final String nodeName)
focal_class.identifier: parse
focal_class.modifiers: public static
focal_class.parameters: (final String nodeName)
focal_class.return: IndexName
focal_class.signature: IndexName parse(final String nodeName)
focal_class.class_method_signature: IndexName.IndexName(String nodeName, boolean isLegal)
focal_class.full_signature: private  IndexName(String nodeName, boolean isLegal)
focal_class.identifier: IndexName
focal_class.modifiers: private
focal_class.parameters: (String nodeName, boolean isLegal)
focal_class.signature:  IndexName(String nodeName, boolean isLegal)
focal_class.class_method_signature: IndexName.IndexName(String nodeName, String baseName, int productVersion, int customerVersion)
focal_class.full_signature: private  IndexName(String nodeName, String baseName, int productVersion, int customerVersion)
focal_class.identifier: IndexName
focal_class.modifiers: private
focal_class.parameters: (String nodeName, String baseName, int productVersion, int customerVersion)
focal_class.signature:  IndexName(String nodeName, String baseName, int productVersion, int customerVersion)
focal_class.class_method_signature: IndexName.toString()
focal_class.full_signature: public String toString()
focal_class.identifier: toString
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: IndexName.compareTo(IndexName o)
focal_class.full_signature: @Override public int compareTo(IndexName o)
focal_class.identifier: compareTo
focal_class.modifiers: @Override public
focal_class.parameters: (IndexName o)
focal_class.return: int
focal_class.signature: int compareTo(IndexName o)
focal_class.class_method_signature: IndexName.getLatestCustomized(List<IndexName> all)
focal_class.full_signature: public IndexName getLatestCustomized(List<IndexName> all)
focal_class.identifier: getLatestCustomized
focal_class.modifiers: public
focal_class.parameters: (List<IndexName> all)
focal_class.return: IndexName
focal_class.signature: IndexName getLatestCustomized(List<IndexName> all)
focal_class.class_method_signature: IndexName.getLatestProduct(List<IndexName> all)
focal_class.full_signature: public IndexName getLatestProduct(List<IndexName> all)
focal_class.identifier: getLatestProduct
focal_class.modifiers: public
focal_class.parameters: (List<IndexName> all)
focal_class.return: IndexName
focal_class.signature: IndexName getLatestProduct(List<IndexName> all)
focal_class.class_method_signature: IndexName.filterReplacedIndexes(Collection<String> indexPaths, NodeState rootState)
focal_class.full_signature: public static Collection<String> filterReplacedIndexes(Collection<String> indexPaths, NodeState rootState)
focal_class.identifier: filterReplacedIndexes
focal_class.modifiers: public static
focal_class.parameters: (Collection<String> indexPaths, NodeState rootState)
focal_class.return: Collection<String>
focal_class.signature: Collection<String> filterReplacedIndexes(Collection<String> indexPaths, NodeState rootState)
focal_class.class_method_signature: IndexName.nextCustomizedName()
focal_class.full_signature: public String nextCustomizedName()
focal_class.identifier: nextCustomizedName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String nextCustomizedName()
focal_class.class_method_signature: IndexName.isIndexActive(String indexPath, NodeState rootState)
focal_class.full_signature: private static boolean isIndexActive(String indexPath, NodeState rootState)
focal_class.identifier: isIndexActive
focal_class.modifiers: private static
focal_class.parameters: (String indexPath, NodeState rootState)
focal_class.return: boolean
focal_class.signature: boolean isIndexActive(String indexPath, NodeState rootState)
focal_class.class_method_signature: IndexName.getNodeName()
focal_class.full_signature: public String getNodeName()
focal_class.identifier: getNodeName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getNodeName()
focal_class.class_method_signature: IndexName.getCustomerVersion()
focal_class.full_signature: public int getCustomerVersion()
focal_class.identifier: getCustomerVersion
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getCustomerVersion()
focal_class.class_method_signature: IndexName.getProductVersion()
focal_class.full_signature: public int getProductVersion()
focal_class.identifier: getProductVersion
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getProductVersion()
focal_class.class_method_signature: IndexName.getBaseName()
focal_class.full_signature: public String getBaseName()
focal_class.identifier: getBaseName
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getBaseName()
focal_class.class_method_signature: IndexName.isVersioned()
focal_class.full_signature: public boolean isVersioned()
focal_class.identifier: isVersioned
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isVersioned()
focal_class.class_method_signature: IndexName.isLegal()
focal_class.full_signature: public boolean isLegal()
focal_class.identifier: isLegal
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isLegal()
focal_method.body: public static IndexName parse(final String nodeName) {
          String baseName = nodeName;
          int index = baseName.lastIndexOf('-');
          if (index < 0) {
              return new IndexName(nodeName, true);
          }
          String last = baseName.substring(index + 1);
          baseName = baseName.substring(0, index);
          try {
              int v1 = Integer.parseInt(last);
              if (!baseName.endsWith("-custom")) {
                  return new IndexName(nodeName, baseName, v1, 0);
              }
              baseName = baseName.substring(0, 
                      baseName.length() - "-custom".length());
              index = baseName.lastIndexOf('-');
              if (index < 0) {
                  return new IndexName(nodeName, baseName, 0, v1);
              }
              last = baseName.substring(index + 1);
              baseName = baseName.substring(0, index);
              int v2 = Integer.parseInt(last);
              return new IndexName(nodeName, baseName, v2, v1);
          } catch (NumberFormatException e) {
              long now = System.currentTimeMillis();
              if (nextLogWarnClear < now) {
                  LOGGED_WARN.clear();
                  // clear again each 5 minutes
                  nextLogWarnClear = now + 5 * 60 * 1000;
              }
              if (LOGGED_WARN.add(nodeName)) {
                  LOG.warn("Index name format error: " + nodeName);
              }
              return new IndexName(nodeName, false);
          }
      }
focal_method.class_method_signature: IndexName.parse(final String nodeName)
focal_method.full_signature: public static IndexName parse(final String nodeName)
focal_method.identifier: parse
focal_method.invocations: lastIndexOf substring substring parseInt endsWith substring length length lastIndexOf substring substring parseInt currentTimeMillis clear add warn
focal_method.modifiers: public static
focal_method.parameters: (final String nodeName)
focal_method.return: IndexName
focal_method.signature: IndexName parse(final String nodeName)