Program: 8319
Project: 8319
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main_activity);
  Fragment mainFragment=new KeyListFragment();
  FragmentManager fm=getSupportFragmentManager();
  FragmentTransaction transaction=fm.beginTransaction();
  transaction.replace(R.id.main_fragment_container,mainFragment);
  transaction.commit();
  mToolbar=(Toolbar)findViewById(R.id.toolbar);
  mToolbar.setTitle(R.string.app_name);
  setSupportActionBar(mToolbar);
  result=new Drawer().withActivity(this).withHeader(R.layout.main_drawer_header).withToolbar(mToolbar).addDrawerItems(new PrimaryDrawerItem().withName(R.string.nav_keys).withIcon(CommunityMaterial.Icon.cmd_key).withIdentifier(1).withCheckable(false),new PrimaryDrawerItem().withName(R.string.nav_encrypt_decrypt).withIcon(FontAwesome.Icon.faw_lock).withIdentifier(2).withCheckable(false),new PrimaryDrawerItem().withName(R.string.title_api_registered_apps).withIcon(CommunityMaterial.Icon.cmd_apps).withIdentifier(3).withCheckable(false)).addStickyDrawerItems(new PrimaryDrawerItem().withName(R.string.menu_preferences).withIcon(GoogleMaterial.Icon.gmd_settings).withIdentifier(4).withCheckable(false),new PrimaryDrawerItem().withName(R.string.menu_help).withIcon(CommunityMaterial.Icon.cmd_help_circle).withIdentifier(5).withCheckable(false)).withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener(){
    @Override public void onItemClick(    AdapterView<?> parent,    View view,    int position,    long id,    IDrawerItem drawerItem){
      if (drawerItem != null) {
        Intent intent=null;
switch (drawerItem.getIdentifier()) {
case 1:
          onKeysSelected();
        break;
case 2:
      onEnDecryptSelected();
    break;
case 3:
  onAppsSelected();
break;
case 4:
intent=new Intent(MainActivity.this,SettingsActivity.class);
break;
case 5:
intent=new Intent(MainActivity.this,HelpActivity.class);
break;
}
if (intent != null) {
MainActivity.this.startActivity(intent);
}
}
}
}
).withSelectedItem(-1).withSavedInstance(savedInstanceState).build();
Preferences prefs=Preferences.getPreferences(this);
if (prefs.isFirstTime()) {
Intent intent=new Intent(this,CreateKeyActivity.class);
intent.putExtra(CreateKeyActivity.EXTRA_FIRST_TIME,true);
startActivity(intent);
finish();
return;
}
Intent data=getIntent();
if (data != null && data.hasExtra(OperationResult.EXTRA_RESULT)) {
OperationResult result=data.getParcelableExtra(OperationResult.EXTRA_RESULT);
result.createNotify(this).show();
}
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main_activity);
  mToolbar=(Toolbar)findViewById(R.id.toolbar);
  mToolbar.setTitle(R.string.app_name);
  setSupportActionBar(mToolbar);
  mDrawerResult=new Drawer().withActivity(this).withHeader(R.layout.main_drawer_header).withToolbar(mToolbar).addDrawerItems(new PrimaryDrawerItem().withName(R.string.nav_keys).withIcon(CommunityMaterial.Icon.cmd_key).withIdentifier(1).withCheckable(false),new PrimaryDrawerItem().withName(R.string.nav_encrypt_decrypt).withIcon(FontAwesome.Icon.faw_lock).withIdentifier(2).withCheckable(false),new PrimaryDrawerItem().withName(R.string.title_api_registered_apps).withIcon(CommunityMaterial.Icon.cmd_apps).withIdentifier(3).withCheckable(false)).addStickyDrawerItems(new PrimaryDrawerItem().withName(R.string.menu_preferences).withIcon(GoogleMaterial.Icon.gmd_settings).withIdentifier(4).withCheckable(false),new PrimaryDrawerItem().withName(R.string.menu_help).withIcon(CommunityMaterial.Icon.cmd_help_circle).withIdentifier(5).withCheckable(false)).withOnDrawerItemClickListener(new Drawer.OnDrawerItemClickListener(){
    @Override public void onItemClick(    AdapterView<?> parent,    View view,    int position,    long id,    IDrawerItem drawerItem){
      if (drawerItem != null) {
        Intent intent=null;
switch (drawerItem.getIdentifier()) {
case 1:
          onKeysSelected();
        break;
case 2:
      onEnDecryptSelected();
    break;
case 3:
  onAppsSelected();
break;
case 4:
intent=new Intent(MainActivity.this,SettingsActivity.class);
break;
case 5:
intent=new Intent(MainActivity.this,HelpActivity.class);
break;
}
if (intent != null) {
MainActivity.this.startActivity(intent);
}
}
}
}
).withSelectedItem(-1).withSavedInstance(savedInstanceState).build();
Preferences prefs=Preferences.getPreferences(this);
if (prefs.isFirstTime()) {
Intent intent=new Intent(this,CreateKeyActivity.class);
intent.putExtra(CreateKeyActivity.EXTRA_FIRST_TIME,true);
startActivity(intent);
finish();
return;
}
Intent data=getIntent();
if (data != null && data.hasExtra(OperationResult.EXTRA_RESULT)) {
OperationResult result=data.getParcelableExtra(OperationResult.EXTRA_RESULT);
result.createNotify(this).show();
}
if (savedInstanceState == null) {
onKeysSelected();
}
}