Program: 44112
Project: 44112
Buggy source:
/** 
 * Permanently delete the selected item.
 */
protected final void deleteItem(){
  final long packedPosition=getSelectedPosition();
  final int type=ExpandableListView.getPackedPositionType(packedPosition);
  final int childPosition=ExpandableListView.getPackedPositionChild(packedPosition);
  final int groupPosition=ExpandableListView.getPackedPositionGroup(packedPosition);
switch (type) {
case ExpandableListView.PACKED_POSITION_TYPE_CHILD:
    Log.d(cTag,"String_Node_Str" + groupPosition + "String_Node_Str"+ childPosition);
  final long childId=getSelectedId();
Log.i(cTag,"String_Node_Str" + childId);
Uri childUri=ContentUris.withAppendedId(getChildContentUri(),childId);
getContentResolver().delete(childUri,null,null);
break;
case ExpandableListView.PACKED_POSITION_TYPE_GROUP:
Log.d(cTag,"String_Node_Str" + groupPosition);
int childCount=getExpandableListAdapter().getChildrenCount(groupPosition);
if (childCount > 0) {
OnClickListener buttonListener=new OnClickListener(){
public void onClick(DialogInterface dialog,int which){
if (which == DialogInterface.BUTTON2) {
final long groupId=getSelectedId();
Log.i(cTag,"String_Node_Str" + groupId);
Uri uri=ContentUris.withAppendedId(getGroupContentUri(),groupId);
getContentResolver().delete(uri,null,null);
Log.i(cTag,"String_Node_Str" + groupId);
getContentResolver().delete(getChildContentUri(),getGroupIdColumnName() + "String_Node_Str",new String[]{String.valueOf(groupId)});
}
 else {
Log.d(cTag,"String_Node_Str");
}
}
}
;
AlertUtils.showDeleteGroupWarning(this,getGroupName(),getChildName(),childCount,buttonListener);
}
 else {
Log.i(cTag,"String_Node_Str" + groupPosition);
final long groupId=getSelectedId();
Log.i(cTag,"String_Node_Str" + groupId);
Uri groupUri=ContentUris.withAppendedId(getGroupContentUri(),groupId);
getContentResolver().delete(groupUri,null,null);
}
break;
}
}

Fixed version (ground truth):
protected final void deleteItem(final long packedPosition){
  final int type=ExpandableListView.getPackedPositionType(packedPosition);
  final int childPosition=ExpandableListView.getPackedPositionChild(packedPosition);
  final int groupPosition=ExpandableListView.getPackedPositionGroup(packedPosition);
switch (type) {
case ExpandableListView.PACKED_POSITION_TYPE_CHILD:
    Log.d(cTag,"String_Node_Str" + groupPosition + "String_Node_Str"+ childPosition);
  final long childId=getSelectedId();
Log.i(cTag,"String_Node_Str" + childId);
Uri childUri=ContentUris.withAppendedId(getChildContentUri(),childId);
getContentResolver().delete(childUri,null,null);
refreshChildCount();
getExpandableListView().invalidate();
break;
case ExpandableListView.PACKED_POSITION_TYPE_GROUP:
Log.d(cTag,"String_Node_Str" + groupPosition);
int childCount=getExpandableListAdapter().getChildrenCount(groupPosition);
if (childCount > 0) {
OnClickListener buttonListener=new OnClickListener(){
public void onClick(DialogInterface dialog,int which){
if (which == DialogInterface.BUTTON1) {
final long groupId=getExpandableListAdapter().getGroupId(groupPosition);
Log.i(cTag,"String_Node_Str" + groupId);
Uri uri=ContentUris.withAppendedId(getGroupContentUri(),groupId);
getContentResolver().delete(uri,null,null);
Log.i(cTag,"String_Node_Str" + groupId);
getContentResolver().delete(getChildContentUri(),getGroupIdColumnName() + "String_Node_Str",new String[]{String.valueOf(groupId)});
}
 else {
Log.d(cTag,"String_Node_Str");
}
}
}
;
AlertUtils.showDeleteGroupWarning(this,getGroupName(),getChildName(),childCount,buttonListener);
}
 else {
Log.i(cTag,"String_Node_Str" + groupPosition);
final long groupId=getSelectedId();
Log.i(cTag,"String_Node_Str" + groupId);
Uri groupUri=ContentUris.withAppendedId(getGroupContentUri(),groupId);
getContentResolver().delete(groupUri,null,null);
}
break;
}
}