Program: 184141
Project: 184141
Buggy source:
public boolean onChildClick(ExpandableListView parent,View v,int groupPosition,int childPosition,long id){
  EditEntry entry=null;
  dismissDialog(LABEL_PICKER_ALL_TYPES_DIALOG);
switch (groupPosition) {
case LABEL_PICKER_PHONES_POSITION:
{
      String[] labels=getLabelsForKind(this,Contacts.KIND_PHONE);
      final int type=getTypeFromLabelPosition(labels,childPosition);
      entry=EditEntry.newPhoneEntry(EditContactActivity.this,labels[childPosition],type,null,Uri.withAppendedPath(mUri,People.Phones.CONTENT_DIRECTORY),0);
      if (type == Phones.TYPE_CUSTOM) {
        createCustomPicker(entry,mPhoneEntries);
        return true;
      }
 else {
        mPhoneEntries.add(entry);
      }
      break;
    }
case LABEL_PICKER_EMAIL_POSITION:
{
    String[] labels=getLabelsForKind(this,Contacts.KIND_EMAIL);
    final int type=getTypeFromLabelPosition(labels,childPosition);
    entry=EditEntry.newEmailEntry(EditContactActivity.this,labels[childPosition],type,null,Uri.withAppendedPath(mUri,People.ContactMethods.CONTENT_DIRECTORY),0);
    if (type == ContactMethods.TYPE_CUSTOM) {
      createCustomPicker(entry,mEmailEntries);
      return true;
    }
 else {
      mEmailEntries.add(entry);
    }
    break;
  }
case LABEL_PICKER_IM_POSITION:
{
  String[] labels=getLabelsForKind(this,Contacts.KIND_IM);
  entry=EditEntry.newImEntry(EditContactActivity.this,labels[childPosition],childPosition,null,Uri.withAppendedPath(mUri,People.ContactMethods.CONTENT_DIRECTORY),0);
  mImEntries.add(entry);
  break;
}
case LABEL_PICKER_POSTAL_POSITION:
{
String[] labels=getLabelsForKind(this,Contacts.KIND_POSTAL);
final int type=getTypeFromLabelPosition(labels,childPosition);
entry=EditEntry.newPostalEntry(EditContactActivity.this,labels[childPosition],type,null,Uri.withAppendedPath(mUri,People.ContactMethods.CONTENT_DIRECTORY),0);
if (type == ContactMethods.TYPE_CUSTOM) {
  createCustomPicker(entry,mPostalEntries);
  return true;
}
 else {
  mPostalEntries.add(entry);
}
break;
}
case LABEL_PICKER_OTHER_POSITION:
{
switch (childPosition) {
case OTHER_ORGANIZATION:
entry=EditEntry.newOrganizationEntry(EditContactActivity.this,Uri.withAppendedPath(mUri,Organizations.CONTENT_DIRECTORY),ContactMethods.TYPE_WORK);
mOtherEntries.add(entry);
break;
case OTHER_NOTE:
entry=EditEntry.newNotesEntry(EditContactActivity.this,null,mUri);
mOtherEntries.add(entry);
break;
default :
entry=null;
}
break;
}
default :
entry=null;
}
if (entry != null) {
buildViews();
View dataView=entry.view.findViewById(R.id.data);
if (dataView == null) {
entry.view.requestFocus();
}
 else {
dataView.requestFocus();
}
}
return true;
}

Fixed version (ground truth):
public boolean onChildClick(ExpandableListView parent,View v,int groupPosition,int childPosition,long id){
  EditEntry entry=null;
  dismissDialog(LABEL_PICKER_ALL_TYPES_DIALOG);
switch (groupPosition) {
case LABEL_PICKER_PHONES_POSITION:
{
      String[] labels=getLabelsForKind(this,Contacts.KIND_PHONE);
      final int type=getTypeFromLabelPosition(labels,childPosition);
      entry=EditEntry.newPhoneEntry(EditContactActivity.this,labels[childPosition],type,null,Uri.withAppendedPath(mUri,People.Phones.CONTENT_DIRECTORY),0);
      if (type == Phones.TYPE_CUSTOM) {
        createCustomPicker(entry,mPhoneEntries);
        return true;
      }
 else {
        mPhoneEntries.add(entry);
      }
      break;
    }
case LABEL_PICKER_EMAIL_POSITION:
{
    String[] labels=getLabelsForKind(this,Contacts.KIND_EMAIL);
    final int type=getTypeFromLabelPosition(labels,childPosition);
    entry=EditEntry.newEmailEntry(EditContactActivity.this,labels[childPosition],type,null,Uri.withAppendedPath(mUri,People.ContactMethods.CONTENT_DIRECTORY),0);
    if (type == ContactMethods.TYPE_CUSTOM) {
      createCustomPicker(entry,mEmailEntries);
      return true;
    }
 else {
      mEmailEntries.add(entry);
    }
    break;
  }
case LABEL_PICKER_IM_POSITION:
{
  String[] labels=getLabelsForKind(this,Contacts.KIND_IM);
  entry=EditEntry.newImEntry(EditContactActivity.this,labels[childPosition],childPosition,null,Uri.withAppendedPath(mUri,People.ContactMethods.CONTENT_DIRECTORY),0);
  mImEntries.add(entry);
  break;
}
case LABEL_PICKER_POSTAL_POSITION:
{
String[] labels=getLabelsForKind(this,Contacts.KIND_POSTAL);
final int type=getTypeFromLabelPosition(labels,childPosition);
entry=EditEntry.newPostalEntry(EditContactActivity.this,labels[childPosition],type,null,Uri.withAppendedPath(mUri,People.ContactMethods.CONTENT_DIRECTORY),0);
if (type == ContactMethods.TYPE_CUSTOM) {
  createCustomPicker(entry,mPostalEntries);
  return true;
}
 else {
  mPostalEntries.add(entry);
}
break;
}
case LABEL_PICKER_OTHER_POSITION:
{
switch (childPosition) {
case OTHER_ORGANIZATION:
entry=EditEntry.newOrganizationEntry(EditContactActivity.this,Uri.withAppendedPath(mUri,Organizations.CONTENT_DIRECTORY),Organizations.TYPE_WORK);
mOtherEntries.add(entry);
break;
case OTHER_NOTE:
entry=EditEntry.newNotesEntry(EditContactActivity.this,null,mUri);
mOtherEntries.add(entry);
break;
default :
entry=null;
}
break;
}
default :
entry=null;
}
if (entry != null) {
buildViews();
View dataView=entry.view.findViewById(R.id.data);
if (dataView == null) {
entry.view.requestFocus();
}
 else {
dataView.requestFocus();
}
}
return true;
}