public static List<CliFunctionResult> cleanResults(List<?> results) {
    List<CliFunctionResult> returnResults = new ArrayList<>(results.size());
    for (Object result : results) {
      if (result instanceof CliFunctionResult) {
        returnResults.add((CliFunctionResult) result);
      }
    }

    Collections.sort(returnResults);
    return returnResults;
  }
Remove elements from the list that are not instances of CliFunctionResult and then sort the
results.

@param results The results to clean.
@return The cleaned results.
geode-core/src/main/java/org/apache/geode/management/internal/functions/CliFunctionResult.java