Buggy code:
public class ReadingItemFragment extends NbFragment implements ClassifierDialogFragment . TagUpdateCallback , ShareDialogFragment . SharedCallbackDialog { public static final String TEXT_SIZE_CHANGED = "textSizeChanged" ; public static final String TEXT_SIZE_VALUE = "textSizeChangeValue" ; public Story story ; private LayoutInflater inflater ; private APIManager apiManager ; private ImageLoader imageLoader ; private String feedColor ; private String feedTitle ; private String feedFade ; private String feedBorder ; private String feedIconUrl ; private String faviconText ; private Classifier classifier ; private NewsblurWebview web ; private BroadcastReceiver receiver ; private TextView itemAuthors ; private TextView itemFeed ; private boolean displayFeedDetails ; private FlowLayout tagContainer ; private View view ; private UserDetails user ; public String previouslySavedShareText ; private ImageView feedIcon ; private Reading activity ; private DefaultFeedView selectedFeedView ; private String storyContent ; private String originalText ; private HashMap < String , String > imageAltTexts ; private HashMap < String , String > imageUrlRemaps ; private String sourceUserId ; private int contentHash ; private final Object WEBVIEW_CONTENT_MUTEX = new Object ( ) ; public static ReadingItemFragment newInstance ( Story story , String feedTitle , String feedFaviconColor , String feedFaviconFade , String feedFaviconBorder , String faviconText , String faviconUrl , Classifier classifier , boolean displayFeedDetails , DefaultFeedView defaultFeedView , String sourceUserId ) { } @ Override public void onAttach ( Activity activity ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onSaveInstanceState ( Bundle outState ) { } @ Override public void onDestroy ( ) { } @ Override public void onPause ( ) { } @ Override public void onResume ( ) { } public View onCreateView ( final LayoutInflater inflater , final ViewGroup container , final Bundle savedInstanceState ) { } private void setupImmersiveViewGestureDetector ( ) { } @ Override public void onCreateContextMenu ( ContextMenu menu , View v , ContextMenu . ContextMenuInfo menuInfo ) { } private void setupSaveButton ( ) { } private void updateSaveButton ( ) { } private void setupShareButton ( ) { Button shareButton = ( ( Button ) ( view . findViewById ( share_story_button ) ) ) ; for ( String userId : story . sharedUserIds ) { if ( TextUtils . equals ( userId , user . id ) ) { <START_BUG> shareButton . setText ( edit ) ; <END_BUG> break ; } } shareButton . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { DialogFragment newFragment = ShareDialogFragment . newInstance ( ReadingItemFragment . this , story , previouslySavedShareText , sourceUserId ) ; newFragment . show ( getFragmentManager ( ) , "dialog" ) ; } } ) ; } private void setupItemCommentsAndShares ( final View view ) { } private void setupItemMetadata ( ) { } private void setupTags ( ) { } public void switchSelectedFeedView ( ) { } public DefaultFeedView getSelectedFeedView ( ) { } private void reloadStoryContent ( ) { } private void enableProgress ( boolean loading ) { } public void offerStoryUpdate ( Story story ) { } public void handleUpdate ( ) { } private void loadOriginalText ( ) { } private void loadStoryContent ( ) { } private void setupWebview ( String storyText ) { } private void sniffAltTexts ( String html ) { } private String swapInOfflineImages ( String html ) { } private class TextSizeReceiver extends BroadcastReceiver { @ Override public void onReceive ( Context context , Intent intent ) { } } @ Override public void updateTagView ( String key , int classifierType , int classifierAction ) { } @ Override public void sharedCallback ( String sharedText , boolean hasAlreadyBeenShared ) { } @ Override public void setPreviouslySavedShareText ( String previouslySavedShareText ) { } private class ImmersiveViewHandler extends GestureDetector . SimpleOnGestureListener implements View . OnSystemUiVisibilityChangeListener { private View view ; public ImmersiveViewHandler ( View view ) { } @ Override public boolean onSingleTapUp ( MotionEvent e ) { } @ Override public void onSystemUiVisibilityChange ( int i ) { } } }

Fix:
shareButton . setText ( already_shared ) ;