code: protected final String[] selectPermutations( @Nonnull final String baseUrl,
                                                 @Nonnull final String moduleName,
                                                 @Nonnull final List<BindingProperty> computedBindings )
      throws ServletException
    {
      try
      {
        final List<SelectionDescriptor> descriptors = new ArrayList<>();
        descriptors.addAll( getPermutationDescriptors( baseUrl, moduleName ) );
        final List<BindingProperty> bindings = new ArrayList<>();
        bindings.addAll( computedBindings );
        reduceToMatchingDescriptors( bindings, descriptors );
        if ( 0 == bindings.size() )
        {
          if ( 1 == descriptors.size() )
          {
            return new String[]{ descriptors.get( 0 ).getPermutationName() };
          }
          else
          {
            final ArrayList<String> permutations = new ArrayList<>();
            for ( final SelectionDescriptor descriptor : descriptors )
            {
              if ( descriptor.getBindingProperties().size() == computedBindings.size() )
              {
                permutations.add( descriptor.getPermutationName() );
              }
              else
              {
                for ( final BindingProperty property : descriptor.getBindingProperties() )
                {
                  // This is one of the bindings that we could not reduce on
                  if ( null == findMatchingBindingProperty( computedBindings, property ) )
                  {
                    if ( canMergeManifestForSelectionProperty( property.getName() ) )
                    {
                      permutations.add( descriptor.getPermutationName() );
                    }
                  }
                }
              }
            }
            if ( 0 == permutations.size() )
            {
              return null;
            }
            else
            {
              return permutations.toArray( new String[ permutations.size() ] );
            }
          }
        }
        return null;
      }
      catch ( final Exception e )
      {
        throw new ServletException( "can not read permutation information", e );
      }
    }
docs: Return an array of permutation names that are selected based on supplied properties.
  
  The array may be null if no permutation could be found. It may be a single value if
  the bindings uniquely identify a permutation or it may be multiple values if client side
  properties are not specified and the server side properties do not uniquely identify a
  permutation.