Program: 15185
Project: 15185
Buggy source:
@Override public boolean onContextItemSelected(MenuItem item){
  Post post=new Post(WordPress.currentBlog.getId(),selectedID,isPage,getActivity().getApplicationContext());
  if (item.getGroupId() == 0) {
switch (item.getItemId()) {
case 0:
      Intent i2=new Intent(getActivity().getApplicationContext(),EditPost.class);
    i2.putExtra("String_Node_Str",selectedID);
  i2.putExtra("String_Node_Str",WordPress.currentBlog.getId());
i2.putExtra("String_Node_Str",accountName);
startActivityForResult(i2,0);
return true;
case 1:
onPostActionListener.onPostAction(Posts.POST_DELETE,post);
return true;
case 2:
onPostActionListener.onPostAction(Posts.POST_SHARE,post);
return true;
}
}
 else if (item.getGroupId() == 2) {
switch (item.getItemId()) {
case 0:
Intent i2=new Intent(getActivity().getApplicationContext(),EditPost.class);
i2.putExtra("String_Node_Str",selectedID);
i2.putExtra("String_Node_Str",WordPress.currentBlog.getId());
i2.putExtra("String_Node_Str",accountName);
i2.putExtra("String_Node_Str",true);
startActivityForResult(i2,0);
return true;
case 1:
onPostActionListener.onPostAction(Posts.POST_DELETE,post);
return true;
case 2:
onPostActionListener.onPostAction(Posts.POST_SHARE,post);
return true;
}
}
 else {
switch (item.getItemId()) {
case 0:
Intent i2=new Intent(getActivity().getApplicationContext(),EditPost.class);
i2.putExtra("String_Node_Str",selectedID);
i2.putExtra("String_Node_Str",WordPress.currentBlog.getId());
if (isPage) {
i2.putExtra("String_Node_Str",true);
}
i2.putExtra("String_Node_Str",accountName);
i2.putExtra("String_Node_Str",true);
startActivityForResult(i2,0);
return true;
case 1:
onPostActionListener.onPostAction(Posts.POST_DELETE,post);
return true;
}
}
return false;
}

Fixed version (ground truth):
@Override public boolean onContextItemSelected(MenuItem item){
  Post post=new Post(WordPress.currentBlog.getId(),selectedID,isPage,getActivity().getApplicationContext());
  if (item.getGroupId() == 0) {
switch (item.getItemId()) {
case 0:
      WordPress.richPostContent=null;
    Intent i2=new Intent(getActivity().getApplicationContext(),EditPost.class);
  i2.putExtra("String_Node_Str",selectedID);
i2.putExtra("String_Node_Str",WordPress.currentBlog.getId());
i2.putExtra("String_Node_Str",accountName);
startActivityForResult(i2,0);
return true;
case 1:
onPostActionListener.onPostAction(Posts.POST_DELETE,post);
return true;
case 2:
onPostActionListener.onPostAction(Posts.POST_SHARE,post);
return true;
}
}
 else if (item.getGroupId() == 2) {
switch (item.getItemId()) {
case 0:
WordPress.richPostContent=null;
Intent i2=new Intent(getActivity().getApplicationContext(),EditPost.class);
i2.putExtra("String_Node_Str",selectedID);
i2.putExtra("String_Node_Str",WordPress.currentBlog.getId());
i2.putExtra("String_Node_Str",accountName);
i2.putExtra("String_Node_Str",true);
startActivityForResult(i2,0);
return true;
case 1:
onPostActionListener.onPostAction(Posts.POST_DELETE,post);
return true;
case 2:
onPostActionListener.onPostAction(Posts.POST_SHARE,post);
return true;
}
}
 else {
switch (item.getItemId()) {
case 0:
WordPress.richPostContent=null;
Intent i2=new Intent(getActivity().getApplicationContext(),EditPost.class);
i2.putExtra("String_Node_Str",selectedID);
i2.putExtra("String_Node_Str",WordPress.currentBlog.getId());
if (isPage) {
i2.putExtra("String_Node_Str",true);
}
i2.putExtra("String_Node_Str",accountName);
i2.putExtra("String_Node_Str",true);
startActivityForResult(i2,0);
return true;
case 1:
onPostActionListener.onPostAction(Posts.POST_DELETE,post);
return true;
}
}
return false;
}