code: protected JRDesignGroup getParent(JRDesignGroup group) {
          int index = realGroups.indexOf(group);
          return (index > 0) ? (JRDesignGroup) realGroups.get(index - 1) : group;
      }
docs: Finds the parent group of the given one and returns it
  
  @param group Group for which the parent is needed
  @return The parent group of the given one. If the given one is the first one, it returns the same group