Program: 26139
Project: 26139
Buggy source:
@Override public boolean onOptionsItemSelected(MenuItem item){
  RssItem rssItem=rssItems.get(currentPosition);
switch (item.getItemId()) {
case android.R.id.home:
    if (handlePodcastBackPressed())     ;
 else {
      super.onBackPressed();
    }
  break;
case R.id.action_read:
markItemAsReadUnread(rssItem,!menuItem_Read.isChecked());
UpdateActionBarIcons();
pDelayHandler.DelayTimer();
break;
case R.id.action_starred:
Boolean curState=rssItem.getStarred_temp();
rssItem.setStarred_temp(!curState);
dbConn.updateRssItem(rssItem);
UpdateActionBarIcons();
pDelayHandler.DelayTimer();
break;
case R.id.action_openInBrowser:
NewsDetailFragment newsDetailFragment=getNewsDetailFragmentAtPosition(currentPosition);
String link=newsDetailFragment.mWebView.getUrl();
if (link.equals("String_Node_Str")) link=rssItem.getLink();
if (link.length() > 0) {
if (mCustomTabsSupported) {
CustomTabActivityManager mCustomTabsManager=CustomTabActivityManager.getInstance();
mCustomTabsSession=getSession();
CustomTabUiBuilder uiBuilder=new CustomTabUiBuilder();
uiBuilder.setToolbarColor(getResources().getColor(R.color.colorPrimaryDarkTheme));
uiBuilder.setShowTitle(true);
uiBuilder.setCloseButtonStyle(CustomTabUiBuilder.CLOSE_BUTTON_ARROW);
uiBuilder.setStartAnimations(this,R.anim.slide_in_right,R.anim.slide_out_left);
uiBuilder.setExitAnimations(this,R.anim.slide_in_left,R.anim.slide_out_right);
mCustomTabsManager.launchUrl(this,mCustomTabsSession,link,uiBuilder);
}
 else {
Intent browserIntent=new Intent(Intent.ACTION_VIEW,Uri.parse(link));
startActivity(browserIntent);
}
}
break;
case R.id.action_playPodcast:
openPodcast(rssItem);
break;
case R.id.action_tts:
TTSItem ttsItem=new TTSItem(rssItem.getId(),rssItem.getTitle(),rssItem.getTitle() + "String_Node_Str" + Html.fromHtml(rssItem.getBody()).toString(),rssItem.getFeed().getFaviconUrl());
openTTSItem(ttsItem);
break;
case R.id.action_ShareItem:
String title=rssItem.getTitle();
String content=rssItem.getLink();
NewsDetailFragment fragment=getNewsDetailFragmentAtPosition(currentPosition);
if (fragment != null) {
if (!fragment.mWebView.getUrl().equals("String_Node_Str") && !fragment.mWebView.getUrl().trim().equals("String_Node_Str")) {
content=fragment.mWebView.getUrl();
title=fragment.mWebView.getTitle();
}
}
content=title + "String_Node_Str" + content;
Intent share=new Intent(Intent.ACTION_SEND);
share.setType("String_Node_Str");
share.putExtra(Intent.EXTRA_SUBJECT,title);
share.putExtra(Intent.EXTRA_TEXT,content);
startActivity(Intent.createChooser(share,"String_Node_Str"));
break;
}
return super.onOptionsItemSelected(item);
}

Fixed version (ground truth):
@Override public boolean onOptionsItemSelected(MenuItem item){
  RssItem rssItem=rssItems.get(currentPosition);
switch (item.getItemId()) {
case android.R.id.home:
    onBackPressed();
  return true;
case R.id.action_read:
markItemAsReadUnread(rssItem,!menuItem_Read.isChecked());
UpdateActionBarIcons();
pDelayHandler.DelayTimer();
break;
case R.id.action_starred:
Boolean curState=rssItem.getStarred_temp();
rssItem.setStarred_temp(!curState);
dbConn.updateRssItem(rssItem);
UpdateActionBarIcons();
pDelayHandler.DelayTimer();
break;
case R.id.action_openInBrowser:
NewsDetailFragment newsDetailFragment=getNewsDetailFragmentAtPosition(currentPosition);
String link=newsDetailFragment.mWebView.getUrl();
if (link.equals("String_Node_Str")) link=rssItem.getLink();
if (link.length() > 0) {
if (mCustomTabsSupported) {
CustomTabActivityManager mCustomTabsManager=CustomTabActivityManager.getInstance();
mCustomTabsSession=getSession();
CustomTabUiBuilder uiBuilder=new CustomTabUiBuilder();
uiBuilder.setToolbarColor(getResources().getColor(R.color.colorPrimaryDarkTheme));
uiBuilder.setShowTitle(true);
uiBuilder.setCloseButtonStyle(CustomTabUiBuilder.CLOSE_BUTTON_ARROW);
uiBuilder.setStartAnimations(this,R.anim.slide_in_right,R.anim.slide_out_left);
uiBuilder.setExitAnimations(this,R.anim.slide_in_left,R.anim.slide_out_right);
mCustomTabsManager.launchUrl(this,mCustomTabsSession,link,uiBuilder);
}
 else {
Intent browserIntent=new Intent(Intent.ACTION_VIEW,Uri.parse(link));
startActivity(browserIntent);
}
}
break;
case R.id.action_playPodcast:
openPodcast(rssItem);
break;
case R.id.action_tts:
TTSItem ttsItem=new TTSItem(rssItem.getId(),rssItem.getTitle(),rssItem.getTitle() + "String_Node_Str" + Html.fromHtml(rssItem.getBody()).toString(),rssItem.getFeed().getFaviconUrl());
openTTSItem(ttsItem);
break;
case R.id.action_ShareItem:
String title=rssItem.getTitle();
String content=rssItem.getLink();
NewsDetailFragment fragment=getNewsDetailFragmentAtPosition(currentPosition);
if (fragment != null) {
if (!fragment.mWebView.getUrl().equals("String_Node_Str") && !fragment.mWebView.getUrl().trim().equals("String_Node_Str")) {
content=fragment.mWebView.getUrl();
title=fragment.mWebView.getTitle();
}
}
content=title + "String_Node_Str" + content;
Intent share=new Intent(Intent.ACTION_SEND);
share.setType("String_Node_Str");
share.putExtra(Intent.EXTRA_SUBJECT,title);
share.putExtra(Intent.EXTRA_TEXT,content);
startActivity(Intent.createChooser(share,"String_Node_Str"));
break;
}
return super.onOptionsItemSelected(item);
}