code: public Comparator<Integer> getCompByName() {
      return new Comparator<Integer>() {
        @Override
        public int compare(Integer t1, Integer t2) {
          Integer p1 = tokenCollection.get(t1).getPositionStart();
          Integer p2 = tokenCollection.get(t2).getPositionStart();
          assert p1 != null : "no position for " + tokenCollection.get(t1);
          assert p2 != null : "no position for " + tokenCollection.get(t2);
          if (p1.equals(p2)) {
            Integer o1 = tokenCollection.get(t1).getOffsetStart();
            Integer o2 = tokenCollection.get(t2).getOffsetStart();
            if (o1 != null && o2 != null) {
              if (o1.equals(o2)) {
                return tokenCollection.get(t1).getValue()
                    .compareTo(tokenCollection.get(t2).getValue());
              } else {
                return o1.compareTo(o2);
              }
            } else {
              return tokenCollection.get(t1).getValue()
                  .compareTo(tokenCollection.get(t2).getValue());
            }
          }
          return p1.compareTo(p2);
        }
      };
    }
docs: Gets the comp by name.
  
  @return the comp by name