test_class.declarator: header                      = "b,a,d,c"
test_class.modifier: private final
test_class.original_string: private final String                    header                      = "b,a,d,c";
test_class.type: String
test_class.var_name: header
test_class.declarator: headerWithSpaces            = " b\t, a , d,  c   "
test_class.modifier: private final
test_class.original_string: private final String                    headerWithSpaces            = " b\t, a , d,  c   ";
test_class.type: String
test_class.var_name: headerWithSpaces
test_class.declarator: expectedQualityValueList    = newArrayList(mockQualityValue("a", 1.0f),
                                                                                         mockQualityValue("b", 0.7f),
                                                                                         mockQualityValue("c", 0.5f),
                                                                                         mockQualityValue("d", 0.3f))
test_class.modifier: private final
test_class.original_string: private final List<QualityValue>        expectedQualityValueList    = newArrayList(mockQualityValue("a", 1.0f),
                                                                                         mockQualityValue("b", 0.7f),
                                                                                         mockQualityValue("c", 0.5f),
                                                                                         mockQualityValue("d", 0.3f));
test_class.type: List<QualityValue>
test_class.var_name: expectedQualityValueList
test_class.declarator: headerItemToQualityValueMap = ImmutableMap.of("a", expectedQualityValueList.get(0),
                                                                                            "b", expectedQualityValueList.get(1),
                                                                                            "c", expectedQualityValueList.get(2),
                                                                                            "d", expectedQualityValueList.get(3))
test_class.modifier: private final
test_class.original_string: private final Map<String, QualityValue> headerItemToQualityValueMap = ImmutableMap.of("a", expectedQualityValueList.get(0),
                                                                                            "b", expectedQualityValueList.get(1),
                                                                                            "c", expectedQualityValueList.get(2),
                                                                                            "d", expectedQualityValueList.get(3));
test_class.type: Map<String, QualityValue>
test_class.var_name: headerItemToQualityValueMap
test_class.declarator: listHeaderProducer
test_class.modifier: private
test_class.original_string: private ListHeaderProducer<QualityValue> listHeaderProducer;
test_class.type: ListHeaderProducer<QualityValue>
test_class.var_name: listHeaderProducer
test_class.file: everrest-core/src/test/java/org/everrest/core/impl/header/ListHeaderProducerTest.java
test_class.identifier: ListHeaderProducerTest
test_case.body: @Test
      public void parsesGivenStringWithSpacesToSortedListOfQualityValues() {
          List<QualityValue> qualitySortedList = listHeaderProducer.createQualitySortedList(headerWithSpaces);
          assertEquals(expectedQualityValueList, qualitySortedList);
      }
test_case.class_method_signature: ListHeaderProducerTest.parsesGivenStringWithSpacesToSortedListOfQualityValues()
test_case.full_signature: @Test public void parsesGivenStringWithSpacesToSortedListOfQualityValues()
test_case.identifier: parsesGivenStringWithSpacesToSortedListOfQualityValues
test_case.invocations: createQualitySortedList assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void parsesGivenStringWithSpacesToSortedListOfQualityValues()
focal_class.declarator: itemFactory
focal_class.modifier: private final
focal_class.original_string: private final ListItemFactory<T> itemFactory;
focal_class.type: ListItemFactory<T>
focal_class.var_name: itemFactory
focal_class.file: everrest-core/src/main/java/org/everrest/core/impl/header/ListHeaderProducer.java
focal_class.identifier: ListHeaderProducer
focal_class.class_method_signature: ListHeaderProducer.ListHeaderProducer(ListItemFactory<T> itemFactory)
focal_class.full_signature: public  ListHeaderProducer(ListItemFactory<T> itemFactory)
focal_class.identifier: ListHeaderProducer
focal_class.modifiers: public
focal_class.parameters: (ListItemFactory<T> itemFactory)
focal_class.signature:  ListHeaderProducer(ListItemFactory<T> itemFactory)
focal_class.class_method_signature: ListHeaderProducer.createQualitySortedList(String header)
focal_class.full_signature: public List<T> createQualitySortedList(String header)
focal_class.identifier: createQualitySortedList
focal_class.modifiers: public
focal_class.parameters: (String header)
focal_class.return: List<T>
focal_class.signature: List<T> createQualitySortedList(String header)
focal_method.body: public List<T> createQualitySortedList(String header) {
          final List<T> tokens = new ArrayList<>();
          int n;
          int p = 0;
          final int length = header.length();
          while (p < length) {
              n = scan(header, p, ',');
  
              String token;
              if (charAtIs(header, n, ',')) {
                  token = header.substring(p, n);
              } else {
                  token = header.substring(p);
                  n = length;
              }
  
              tokens.add(itemFactory.createItem(token));
  
              p = n + 1;
          }
  
          if (tokens.size() > 1) {
              Collections.sort(tokens, QUALITY_VALUE_COMPARATOR);
          }
  
          return tokens;
      }
focal_method.class_method_signature: ListHeaderProducer.createQualitySortedList(String header)
focal_method.full_signature: public List<T> createQualitySortedList(String header)
focal_method.identifier: createQualitySortedList
focal_method.invocations: length scan charAtIs substring substring add createItem size sort
focal_method.modifiers: public
focal_method.parameters: (String header)
focal_method.return: List<T>
focal_method.signature: List<T> createQualitySortedList(String header)