Buggy code:
public class ShareDialogFragment extends DialogFragment { private static final String STORY = "story" ; private static final String CALLBACK = "callback" ; private static final String PREVIOUSLY_SAVED_SHARE_TEXT = "previouslySavedComment" ; private static final String SOURCE_USER_ID = "sourceUserId" ; private APIManager apiManager ; private ShareDialogFragment . SharedCallbackDialog callback ; private Story story ; private UserDetails user ; private boolean hasBeenShared = false ; private Comment previousComment ; private String previouslySavedShareText ; private boolean hasShared = false ; private EditText commentEditText ; private String sourceUserId ; public static ShareDialogFragment newInstance ( final ShareDialogFragment . SharedCallbackDialog sharedCallback , final Story story , final String previouslySavedShareText , final String sourceUserId ) { } @ Override public Dialog onCreateDialog ( Bundle savedInstanceState ) { final Activity activity = getActivity ( ) ; story = ( ( Story ) ( getArguments ( ) . getSerializable ( ShareDialogFragment . STORY ) ) ) ; callback = ( ( ShareDialogFragment . SharedCallbackDialog ) ( getArguments ( ) . getSerializable ( ShareDialogFragment . CALLBACK ) ) ) ; user = PrefsUtils . getUserDetails ( activity ) ; previouslySavedShareText = getArguments ( ) . getString ( ShareDialogFragment . PREVIOUSLY_SAVED_SHARE_TEXT ) ; sourceUserId = getArguments ( ) . getString ( ShareDialogFragment . SOURCE_USER_ID ) ; apiManager = new APIManager ( getActivity ( ) ) ; for ( String sharedUserId : story . sharedUserIds ) { if ( TextUtils . equals ( user . id , sharedUserId ) ) { hasBeenShared = true ; break ; } } if ( hasBeenShared ) { previousComment = dbHelper . getComment ( story . id , user . id ) ; } AlertDialog . Builder builder = new AlertDialog . Builder ( activity ) ; final String shareString = getResources ( ) . getString ( share_newsblur ) ; builder . setTitle ( String . format ( shareString , Html . fromHtml ( story . title ) ) ) ; LayoutInflater layoutInflater = LayoutInflater . from ( activity ) ; View replyView = layoutInflater . inflate ( share_dialog , null ) ; builder . setView ( replyView ) ; commentEditText = ( ( EditText ) ( replyView . findViewById ( comment_field ) ) ) ; int positiveButtonText = string . share_this_story ; if ( hasBeenShared ) { <START_BUG> positiveButtonText = string . edit ; <END_BUG> if ( ( previousComment ) != null ) { commentEditText . setText ( previousComment . commentText ) ; } } else if ( ! ( TextUtils . isEmpty ( previouslySavedShareText ) ) ) { commentEditText . setText ( previouslySavedShareText ) ; } builder . setPositiveButton ( positiveButtonText , new DialogInterface . OnClickListener ( ) { @ Override public void onClick ( DialogInterface dialogInterface , int i ) { final String shareComment = commentEditText . getText ( ) . toString ( ) ; new android . os . AsyncTask < Void , Void , Boolean > ( ) { @ Override protected Boolean doInBackground ( Void ... arg ) { if ( ( story . sourceUserId ) == null ) { return apiManager . shareStory ( story . id , story . feedId , shareComment , sourceUserId ) ; } else { return apiManager . shareStory ( story . id , story . feedId , shareComment , story . sourceUserId ) ; } } @ Override protected void onPostExecute ( Boolean result ) { if ( result ) { hasShared = true ; com . newsblur . util . UIUtils . safeToast ( activity , R . string . shared , Toast . LENGTH_LONG ) ; callback . sharedCallback ( shareComment , hasBeenShared ) ; } else { com . newsblur . util . UIUtils . safeToast ( activity , R . string . error_sharing , Toast . LENGTH_LONG ) ; } ShareDialogFragment . this . dismiss ( ) ; } } . execute ( ) ; } } ) ; builder . setNegativeButton ( alert_dialog_cancel , new DialogInterface . OnClickListener ( ) { @ Override public void onClick ( DialogInterface dialogInterface , int i ) { ShareDialogFragment . this . dismiss ( ) ; } } ) ; return builder . create ( ) ; } @ Override public void onDestroy ( ) { } public interface SharedCallbackDialog extends Serializable { public void setPreviouslySavedShareText ( String previouslySavedShareText ) { } public void sharedCallback ( String sharedText , boolean alreadyShared ) { } } }

Fix:
positiveButtonText = string . update_shared ;