Some of the current state is returned as a Bundle to allow quick restoration
of the ProfilePictureView object in scenarios like orientation changes.
@return a Parcelable containing the current state
483279
@Override
    protected Parcelable onSaveInstanceState() {
        Parcelable superState = super.onSaveInstanceState();
        Bundle instanceState = new Bundle();
        instanceState.putParcelable(SUPER_STATE_KEY, superState);
        instanceState.putString(PROFILE_ID_KEY, profileId);
        instanceState.putInt(PRESET_SIZE_KEY, presetSizeType);
        instanceState.putBoolean(IS_CROPPED_KEY, isCropped);
        instanceState.putParcelable(BITMAP_KEY, imageContents);
        instanceState.putInt(BITMAP_WIDTH_KEY, queryWidth);
        instanceState.putInt(BITMAP_HEIGHT_KEY, queryHeight);
        instanceState.putBoolean(PENDING_REFRESH_KEY, lastRequest != null);

        return instanceState;
    }
575455
@SideOnly(Side.CLIENT)
	public static TextureAtlasSprite getParticleIcon(IBlockState state)
	{
		return ClientRegistry.getParticleIcon(state);
	}
314064
public Object getPersistentState() {
    Map<String, Object> persistentState = new HashMap<String, Object>();
    persistentState.put("name", name);
    persistentState.put("owner", owner);
    persistentState.put("assignee", assignee);
    persistentState.put("endTime", endTime);
    persistentState.put("durationInMillis", durationInMillis);
    persistentState.put("description", description);
    persistentState.put("deleteReason", deleteReason);
    persistentState.put("taskDefinitionKey", taskDefinitionKey);
    persistentState.put("formKey", formKey);
    persistentState.put("priority", priority);
    persistentState.put("category", category);
    persistentState.put("processDefinitionId", processDefinitionId);
    if (parentTaskId != null) {
      persistentState.put("parentTaskId", parentTaskId);
    }
    if (dueDate != null) {
      persistentState.put("dueDate", dueDate);
    }
    if (claimTime != null) {
      persistentState.put("claimTime", claimTime);
    }
    return persistentState;
  }
719443
public String getState()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getState");
    String state = 
      index.getState(aliasDest).toString();
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getState");
    return state;
  }
1064574
public Bundle saveInstanceState(Bundle savedInstanceState) {
        if (savedInstanceState != null) {
            if (!mDrawerBuilder.mAppended) {
                savedInstanceState = mDrawerBuilder.mAdapter.saveInstanceState(savedInstanceState, BUNDLE_SELECTION);
                savedInstanceState.putInt(BUNDLE_STICKY_FOOTER_SELECTION, mDrawerBuilder.mCurrentStickyFooterSelection);
                savedInstanceState.putBoolean(BUNDLE_DRAWER_CONTENT_SWITCHED, switchedDrawerContent());
            } else {
                savedInstanceState = mDrawerBuilder.mAdapter.saveInstanceState(savedInstanceState, BUNDLE_SELECTION_APPENDED);
                savedInstanceState.putInt(BUNDLE_STICKY_FOOTER_SELECTION_APPENDED, mDrawerBuilder.mCurrentStickyFooterSelection);
                savedInstanceState.putBoolean(BUNDLE_DRAWER_CONTENT_SWITCHED_APPENDED, switchedDrawerContent());
            }
        }
        return savedInstanceState;
    }
1059251
private VS createViewState() {
    VS viewState = delegateCallback.createViewState();
    if (viewState == null) {
      throw new NullPointerException(
          "ViewState returned from createViewState() is null. Fragment is " + fragment);
    }

    if (keepPresenterInstanceDuringScreenOrientationChanges) {
      PresenterManager.putViewState(getActivity(), mosbyViewId, viewState);
    }

    return viewState;
  }
543800
public CmsResourceState getMovedState() {

        if (!m_isMoved) {
            return getState();
        } else if (getState().isDeleted()) {
            return STATE_MOVED_SOURCE;
        } else if (getState().isNew()) {
            return STATE_MOVED_DESTINATION;
        } else {
            // should never happen
            return getState();
        }
    }
848465
public EndState getEndState() {
        EndState result = EndState.PASSED;
        for ( ScenarioToken s : scenarios) {
            if ( s.getEndState() == EndState.FAILED) {
                result = EndState.FAILED;
                break;
            }
        }

        if ( result != EndState.FAILED) {
            for ( ScenarioToken s : scenarios) {
                if ( s.getEndState() == EndState.PENDING) {
                    result = EndState.PENDING;
                }
            }
        }
        return result;
    }
674818
public View<?, ?> getRootParentView()
	{
		View<?, ?> currentView = this;
		while (currentView.hasParent())
		{
			currentView = currentView.getParent();
		}
		return currentView;
	}
662054
@Override
    public ButtonState getState() {
        if(pin.isState(pressedState))
            return ButtonState.PRESSED;
        else
            return ButtonState.RELEASED;
    }
899310
@NonNull
    public Bundle saveInstanceState() {
        Bundle bundle = new Bundle();

        bundle.putBundle(KEY_VIEW_CONTROLLER_BUNDLE, controller.saveInstanceState());

        if (pushControllerChangeHandler != null) {
            bundle.putBundle(KEY_PUSH_TRANSITION, pushControllerChangeHandler.toBundle());
        }
        if (popControllerChangeHandler != null) {
            bundle.putBundle(KEY_POP_TRANSITION, popControllerChangeHandler.toBundle());
        }

        bundle.putString(KEY_TAG, tag);
        bundle.putInt(KEY_INDEX, transactionIndex);
        bundle.putBoolean(KEY_ATTACHED_TO_ROUTER, attachedToRouter);

        return bundle;
    }
420119
@Override public Parcelable onSaveInstanceState() {
    if (isInEditMode) return null;

    VS viewState = delegateCallback.getViewState();
    if (viewState == null) {
      throw new NullPointerException("ViewState returned from getViewState() is null for MvpView "
          + delegateCallback.getMvpView());
    }

    Parcelable superState = delegateCallback.superOnSaveInstanceState();

    if (keepPresenterDuringScreenOrientationChange) {
      if (viewState instanceof RestorableParcelableViewState) {
        return new MosbyViewStateSavedState(superState, mosbyViewId,
            (RestorableParcelableViewState) viewState);
      }
      return new MosbyViewStateSavedState(superState, mosbyViewId, null);
    } else {
      return superState;
    }
  }
543371
public Object getPersistentState() {
    Map<String, Object> persistentState = new HashMap<>();
    persistentState.put("processDefinitionId", this.processDefinitionId);
    persistentState.put("businessKey", businessKey);
    persistentState.put("activityId", this.activityId);
    persistentState.put("activityInstanceId", this.activityInstanceId);
    persistentState.put("isActive", this.isActive);
    persistentState.put("isConcurrent", this.isConcurrent);
    persistentState.put("isScope", this.isScope);
    persistentState.put("isEventScope", this.isEventScope);
    persistentState.put("parentId", parentId);
    persistentState.put("superExecution", this.superExecutionId);
    persistentState.put("superCaseExecutionId", this.superCaseExecutionId);
    persistentState.put("caseInstanceId", this.caseInstanceId);
    persistentState.put("suspensionState", this.suspensionState);
    persistentState.put("cachedEntityState", getCachedEntityState());
    persistentState.put("sequenceCounter", getSequenceCounter());
    return persistentState;
  }
480149
public HashMap<KafkaTopicPartition, Long> snapshotCurrentState() {
		// this method assumes that the checkpoint lock is held
		assert Thread.holdsLock(checkpointLock);

		HashMap<KafkaTopicPartition, Long> state = new HashMap<>(subscribedPartitionStates.size());
		for (KafkaTopicPartitionState<KPH> partition : subscribedPartitionStates) {
			state.put(partition.getKafkaTopicPartition(), partition.getOffset());
		}
		return state;
	}
1022347
public State get() {
    InternalState internalState = currentInternalState.get();
    while (!internalState.isRead) {
      // Slow path, the state is first time read. Change the state only if no other changes
      // happened between the moment initialState is read and this moment. This ensures that this
      // method only changes the isRead part of the internal state.
      currentInternalState.compareAndSet(
          internalState,
          internalState.state == State.ENABLED
              ? InternalState.ENABLED_READ
              : InternalState.DISABLED_READ);
      internalState = currentInternalState.get();
    }
    return internalState.state;
  }
917331
public Container getCurrentComponent() {
		Container currentComponent = null;

		if (((Container) (container.getChildAt(0))).getChildCount() > 0) {
			currentComponent = (Container) container.getChildAt(0);
		}

		return currentComponent;
	}
1105468
public final byte[] getContentAsBinary()
    {
        if(!this.contentType.equals(ContentType.BINARY))
        {
            throw new FaxException("Current content type is: "+this.contentType);
        }

        byte[] clone=null;
        if(this.contentBinary!=null)
        {
            clone=this.contentBinary.clone();
        }
        return clone;
    }