private synchronized int getRuleId(@NotNull String ruleName) {
    if (ruleIds == null) {
      ruleIds = new Object2IntOpenHashMap<>();
    }
    int id = ruleIds.getInt(ruleName);
    if (id > 0) {
      return id;
    }
    int newId = ruleIds.size() + 1;
    ruleIds.put(ruleName, newId);
    return newId;
  }
private synchronized int getRuleId(@NotNull String ruleName)