code: private String incrementAlias(KeyStore jKeyStore, String alias) throws KeyStoreException {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.entry(tc, "incrementAlias: " + alias);
  
          int num = 0;
          String base;
          int index = alias.lastIndexOf('_');
          if (-1 == index) {
              // no underscore found
              base = alias + '_';
          } else if (index == (alias.length() - 1)) {
              // alias ends with underscore
              base = alias;
          } else {
              // alias ends with _X where X might be a number...
              try {
                  ++index; // jump past the underscore
                  num = Integer.parseInt(alias.substring(index));
                  base = alias.substring(0, index);
              } catch (NumberFormatException nfe) {
                  // not a number
                  base = alias + '_';
              }
          }
          String newAlias = base + Integer.toString(++num);
          while (jKeyStore.containsAlias(newAlias)) {
              newAlias = base + Integer.toString(++num);
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.exit(tc, "incrementAlias: " + newAlias);
          return newAlias;
      }
docs: Increment the trailing number on the alias value until one is found that
  does not currently exist in the input store.
  
  @param jKeyStore
  @param alias
  @return String
  @throws KeyStoreException