code: public List<Integer> getActiveIndices() {
  		TabSetModel model = getOrCreateComponentModel(); // this model may be updated
  		List<Integer> activeTabs = model.activeTabs;
  
  		// Remove invisible tabs from the active tab list
  		if (activeTabs != null) {
  			for (Iterator<Integer> i = activeTabs.iterator(); i.hasNext();) {
  				if (!isTabVisible(i.next())) {
  					i.remove();
  				}
  			}
  
  			if (activeTabs.isEmpty()) {
  				activeTabs = null;
  				model.activeTabs = null;
  			}
  		}
  
  		if (activeTabs == null) {
  			// If no tabs or is type accordian then no tabs are open by default
  			if (getTotalTabs() == 0 || getType() == TYPE_ACCORDION) {
  				return Collections.emptyList();
  			} else {
  				// If there are no active tabs, then the first visible tab will be returned as the active tab.
  				int idx = findFirstVisibleTab();
  				activeTabs = new ArrayList<>(1);
  				activeTabs.add(idx);
  			}
  		}
  
  		return Collections.unmodifiableList(activeTabs);
  	}
docs: Returns the active indices (as seen by the given context/session).
  
  @return the active tab indices (may be an empty list).