private static int compareEntitiesByName(RefEntity entity1, RefEntity entity2) {
    final int nameComparing = entity1.getName().compareToIgnoreCase(entity2.getName());
    if (nameComparing != 0) {
      return nameComparing;
    }
    return entity1.getQualifiedName().compareToIgnoreCase(entity2.getQualifiedName());
  }
private static int compareEntitiesByName(RefEntity entity1, RefEntity entity2)