Source:
<code>public Loader<LoaderResult<Document>> onCreateLoader(int id, Bundle args) { Map<String, Serializable> props = new HashMap<String, Serializable>(3); props.put(ContentModel.PROP_DESCRIPTION, args.getString(ARGUMENT_CONTENT_DESCRIPTION)); props.put(ContentModel.PROP_TAGS, args.getStringArrayList(ARGUMENT_CONTENT_TAGS)); props.put(PropertyIds.OBJECT_TYPE_ID, ObjectType.DOCUMENT_BASETYPE_ID); String name = args.getString(ARGUMENT_CONTENT_NAME); ContentFile contentFile = (ContentFile) args.getSerializable(ARGUMENT_CONTENT_FILE); if (contentFile != null && name != null) { currentAccount = SessionUtils.getAccount(getActivity()); Bundle progressBundle = new Bundle(); ContentFile f = (ContentFile) getArguments().getSerializable(ARGUMENT_CONTENT_FILE); <START> if (f.getClass() == ContentFileProgressImpl.class) <END> { ((ContentFileProgressImpl) f).setFilename(name); progressBundle.putString(ProgressNotification.PARAM_DATA_NAME, name); } else { progressBundle.putString(ProgressNotification.PARAM_DATA_NAME, f.getFile().getName()); } progressBundle.putInt(ProgressNotification.PARAM_DATA_SIZE, (int) f.getFile().length()); progressBundle.putInt(ProgressNotification.PARAM_DATA_INCREMENT, (int) (f.getFile().length() / 10)); ProgressNotification.createProgressNotification(getActivity(), progressBundle, getActivity().getClass()); parentFolder = (Folder) getArguments().get(ARGUMENT_FOLDER); } return new DocumentCreateLoader(getActivity(), alfSession, (Folder) getArguments().get(ARGUMENT_FOLDER), args.getString(ARGUMENT_CONTENT_NAME), props, (ContentFile) args.getSerializable(ARGUMENT_CONTENT_FILE)); }</code><technical_language>Is "f" guaranteed non-null retrieved arguments</technical_language>

Target:
public Loader<LoaderResult<Document>> onCreateLoader(int id, Bundle args) { Map<String, Serializable> props = new HashMap<String, Serializable>(3); props.put(ContentModel.PROP_DESCRIPTION, args.getString(ARGUMENT_CONTENT_DESCRIPTION)); props.put(ContentModel.PROP_TAGS, args.getStringArrayList(ARGUMENT_CONTENT_TAGS)); props.put(PropertyIds.OBJECT_TYPE_ID, ObjectType.DOCUMENT_BASETYPE_ID); String name = args.getString(ARGUMENT_CONTENT_NAME); ContentFile contentFile = (ContentFile) args.getSerializable(ARGUMENT_CONTENT_FILE); if (contentFile != null && name != null) { currentAccount = SessionUtils.getAccount(getActivity()); Bundle progressBundle = new Bundle(); if (contentFile.getClass() == ContentFileProgressImpl.class) { ((ContentFileProgressImpl) contentFile).setFilename(name); progressBundle.putString(ProgressNotification.PARAM_DATA_NAME, name); } else { progressBundle.putString(ProgressNotification.PARAM_DATA_NAME, contentFile.getFile().getName()); } progressBundle.putInt(ProgressNotification.PARAM_DATA_SIZE, (int) contentFile.getFile().length()); progressBundle.putInt(ProgressNotification.PARAM_DATA_INCREMENT, (int) (contentFile.getFile().length() / 10)); ProgressNotification.createProgressNotification(getActivity(), progressBundle, getActivity().getClass()); parentFolder = (Folder) getArguments().get(ARGUMENT_FOLDER); } return new DocumentCreateLoader(getActivity(), alfSession, (Folder) getArguments().get(ARGUMENT_FOLDER), args.getString(ARGUMENT_CONTENT_NAME), props, (ContentFile) args.getSerializable(ARGUMENT_CONTENT_FILE)); }