code: private Set<String> processAutoFeatures(Collection<ProvisioningFeatureDefinition> kernelFeatures, Set<String> result, Set<String> seenAutoFeatures,
                                              SelectionContext selectionContext) {
  
          Set<String> autoFeaturesToProcess = new HashSet<String>();
  
          Set<ProvisioningFeatureDefinition> filteredFeatureDefs = new HashSet<ProvisioningFeatureDefinition>(kernelFeatures);
          for (String feature : result) {
              filteredFeatureDefs.add(selectionContext.getRepository().getFeature(feature));
          }
  
          // Iterate over all of the auto-feature definitions...
          for (ProvisioningFeatureDefinition autoFeatureDef : selectionContext.getRepository().getAutoFeatures()) {
              String featureSymbolicName = autoFeatureDef.getSymbolicName();
  
              // if we haven't been here before, check the capability header against the list of
              // installed features to see if it should be auto-installed.
              if (!seenAutoFeatures.contains(featureSymbolicName))
                  if (autoFeatureDef.isCapabilitySatisfied(filteredFeatureDefs)) {
  
                      // Add this auto feature to the list of auto features to ignore on subsequent recursions.
                      seenAutoFeatures.add(featureSymbolicName);
                      // Add the feature to the return value of auto features to install if they are supported in this process.
                      if (supportedProcessType(selectionContext._supportedProcessTypes, autoFeatureDef)) {
                          autoFeaturesToProcess.add(featureSymbolicName);
                      }
                  }
          }
  
          return autoFeaturesToProcess;
      }
docs: /*
  This method is passed a list of features to check against the auto features. For each auto feature, the method checks to see if the capability
  statement has been satisfied by any of the other features in the list. If so, it is add to the list of features to process.
  We then need to recursively check the new set of features to see if other features have their capabilities satisfied by these auto features and keep
  going round until we've got the complete list.