DfaValue (DfaValueFactory factory, DfaCallState callState) { DfType dfType = callState.myMemoryState.getDfType(callState.myReturnValue); dfType = dfType.meet(DfTypes.NOT_NULL_OBJECT); if (callState.myCallArguments.myMutation.isPure()) { boolean unmodifiableView = Mutability.fromDfType(dfType) == Mutability.UNMODIFIABLE_VIEW; // Unmodifiable view methods like Collections.unmodifiableList create new object, but their special field "size" is // actually a delegate, so we cannot trust it if the original value is not local if (!unmodifiableView) { dfType = dfType.meet(DfTypes.LOCAL_OBJECT); } } return merge(callState.myReturnValue, factory.fromDfType(dfType), callState.myMemoryState); }