code: public static Throwable getCause(final DeferredGroupException e) {
      Throwable ex = e;
      while (ex.getClass().equals(DeferredGroupException.class)) {
        if (ex.getCause() == null) {
          break;
        } else {
          ex = ex.getCause();
        }
      }
      return ex;
    }
docs: Iterates through the stack trace, looking for the actual cause of the
  deferred group exception. These traces can be huge and truncated in the
  logs so it's really useful to be able to spit out the source.
  @param e A DeferredGroupException to parse
  @return The root cause of the exception if found.