code: private void increaseCounter(int position) {
  
          // This should never happen, but let's check, just in case
          if (position >= currentCounts.length) {
              throw new IllegalArgumentException(
                      "Cannot increase the currentCounts counter at position "
                              + position);
          }
  
          lastIncreasedPosition = position;
  
          // Keep a lock on the currentCounts, because
          // getFinishedPercentage() might be called from another thread
          synchronized (currentCounts) {
  
              if (currentCounts[position] < maxCounts[position]) {
                  currentCounts[position]++;
              } else {
                  // Reset the value at given position, and increase the next one.
                  if (position < isotopes.length - 1) {
                      currentCounts[position] = minCounts[position];
                      increaseCounter(position + 1);
                  } else {
                      // If we are already at the last position, that means we
                      // have covered the whole search space and we can stop the
                      // search.
                      searchRunning = false;
  
                      // Copy the maxCounts[] array to currentCounts[]. This
                      // ensures that getFinishedPercentage() will return 1.0
                      System.arraycopy(maxCounts, 0, currentCounts, 0,
                              maxCounts.length);
                  }
              }
          }
  
      }
docs: Increases the internal counter array currentCounts[] at given position.
  If the position has reached its maximum value, its value is reset to the
  minimum value and the next position is increased.
  
  @param position
  Index to the currentCounts[] array that should be increased