code: public void setInstalledFeatures(Set<String> newInstalledFeatures, Set<String> newConfiguredFeatures, boolean configurationError) {
          Set<String> current = installedFeatures;
          if (!current.equals(newInstalledFeatures)) {
              isDirty = true;
          }
          if (newInstalledFeatures.isEmpty())
              installedFeatures = Collections.emptySet();
          else
              installedFeatures = Collections.unmodifiableSet(new HashSet<String>(newInstalledFeatures));
  
          current = configuredFeatures;
          if (!current.equals(newConfiguredFeatures)) {
              isDirty = true;
          }
          if (newConfiguredFeatures.isEmpty())
              configuredFeatures = Collections.emptySet();
          else
              configuredFeatures = Collections.unmodifiableSet(new HashSet<String>(newConfiguredFeatures));
  
          this.configurationError = configurationError;
      }
docs: Change the active list of installed features
  
  @param newInstalledFeatures new set of installed features. Replaces the previous set.