Program: 14000
Project: 14000
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  AppLog.i(AppLog.T.NOTIFS,"String_Node_Str");
  setContentView(R.layout.notifications_detail_activity);
  ActionBar actionBar=getSupportActionBar();
  if (actionBar != null) {
    actionBar.setDisplayHomeAsUpEnabled(true);
  }
  if (savedInstanceState == null) {
    String noteId=getIntent().getStringExtra(NotificationsListFragment.NOTE_ID_EXTRA);
    if (noteId == null) {
      showErrorToastAndFinish();
      return;
    }
    final Note note=NotificationsTable.getNoteById(noteId);
    if (note == null) {
      showErrorToastAndFinish();
      return;
    }
    Map<String,String> properties=new HashMap<>();
    properties.put("String_Node_Str",note.getType());
    AnalyticsTracker.track(AnalyticsTracker.Stat.NOTIFICATIONS_OPENED_NOTIFICATION_DETAILS,properties);
    Fragment detailFragment=getDetailFragmentForNote(note);
    getFragmentManager().beginTransaction().add(R.id.notifications_detail_container,detailFragment).commitAllowingStateLoss();
    if (getSupportActionBar() != null) {
      String title=note.getTitle();
      if (TextUtils.isEmpty(title)) {
switch (note.getType()) {
case NOTE_FOLLOW_TYPE:
          title=getString(R.string.follows);
        break;
case NOTE_COMMENT_LIKE_TYPE:
      title=getString(R.string.comment_likes);
    break;
case NOTE_LIKE_TYPE:
  title=getString(R.string.like);
break;
case NOTE_COMMENT_TYPE:
title=getString(R.string.comment);
break;
}
}
getSupportActionBar().setTitle(title);
}
if (note.isUnread()) {
NotificationsActions.markNoteAsRead(note);
EventBus.getDefault().post(new NotificationEvents.NotificationsChanged());
}
if (getSupportActionBar() != null) {
getSupportActionBar().setTitle(note.getTitle());
}
NotificationsActions.markNoteAsRead(note);
GCMMessageService.removeNotificationWithNoteIdFromSystemBar(this,noteId);
}
 else if (savedInstanceState.containsKey(ARG_TITLE) && getSupportActionBar() != null) {
getSupportActionBar().setTitle(StringUtils.notNullStr(savedInstanceState.getString(ARG_TITLE)));
}
if (!getIntent().getBooleanExtra(NotificationsListFragment.NOTE_INSTANT_REPLY_EXTRA,false)) {
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
}
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  AppLog.i(AppLog.T.NOTIFS,"String_Node_Str");
  setContentView(R.layout.notifications_detail_activity);
  ActionBar actionBar=getSupportActionBar();
  if (actionBar != null) {
    actionBar.setDisplayHomeAsUpEnabled(true);
  }
  if (savedInstanceState == null) {
    String noteId=getIntent().getStringExtra(NotificationsListFragment.NOTE_ID_EXTRA);
    if (noteId == null) {
      showErrorToastAndFinish();
      return;
    }
    final Note note=NotificationsTable.getNoteById(noteId);
    if (note == null) {
      showErrorToastAndFinish();
      return;
    }
    Map<String,String> properties=new HashMap<>();
    properties.put("String_Node_Str",note.getType());
    AnalyticsTracker.track(AnalyticsTracker.Stat.NOTIFICATIONS_OPENED_NOTIFICATION_DETAILS,properties);
    Fragment detailFragment=getDetailFragmentForNote(note);
    getFragmentManager().beginTransaction().add(R.id.notifications_detail_container,detailFragment).commitAllowingStateLoss();
    if (getSupportActionBar() != null) {
      String title=note.getTitle();
      if (TextUtils.isEmpty(title)) {
switch (note.getType()) {
case NOTE_FOLLOW_TYPE:
          title=getString(R.string.follows);
        break;
case NOTE_COMMENT_LIKE_TYPE:
      title=getString(R.string.comment_likes);
    break;
case NOTE_LIKE_TYPE:
  title=getString(R.string.like);
break;
case NOTE_COMMENT_TYPE:
title=getString(R.string.comment);
break;
}
}
getSupportActionBar().setTitle(title);
}
if (getSupportActionBar() != null) {
getSupportActionBar().setTitle(note.getTitle());
}
NotificationsActions.markNoteAsRead(note);
GCMMessageService.removeNotificationWithNoteIdFromSystemBar(this,noteId);
EventBus.getDefault().post(new NotificationEvents.NotificationsChanged());
}
 else if (savedInstanceState.containsKey(ARG_TITLE) && getSupportActionBar() != null) {
getSupportActionBar().setTitle(StringUtils.notNullStr(savedInstanceState.getString(ARG_TITLE)));
}
if (!getIntent().getBooleanExtra(NotificationsListFragment.NOTE_INSTANT_REPLY_EXTRA,false)) {
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
}
}