Program: 20228
Project: 20228
Buggy source:
/** 
 * Override   {@link #getChildView(int,int,boolean,View,ViewGroup)} instead.
 */
@Override public final View getChildView(final int groupPosition,int childPosition,boolean isLastChild,View convertView,final ViewGroup parent){
  final GroupInfo info=getGroupInfo(groupPosition);
  if (info.animating) {
    if (convertView == null) {
      convertView=new DummyView(parent.getContext());
      convertView.setLayoutParams(new AbsListView.LayoutParams(LayoutParams.MATCH_PARENT,0));
    }
    if (childPosition < info.firstChildPosition) {
      convertView.getLayoutParams().height=0;
      return convertView;
    }
    final ExpandableListView listView=(ExpandableListView)parent;
    DummyView dummyView=(DummyView)convertView;
    dummyView.clearViews();
    dummyView.setDivider(listView.getDivider(),parent.getMeasuredWidth(),listView.getDividerHeight());
    final int measureSpecW=MeasureSpec.makeMeasureSpec(parent.getWidth(),MeasureSpec.EXACTLY);
    final int measureSpecH=MeasureSpec.makeMeasureSpec(0,MeasureSpec.UNSPECIFIED);
    int totalHeight=0;
    int clipHeight=parent.getHeight();
    final int len=getRealChildrenCount(groupPosition);
    for (int i=info.firstChildPosition; i < len; i++) {
      View childView=getRealChildView(groupPosition,i,(i == len - 1),null,parent);
      childView.measure(measureSpecW,measureSpecH);
      totalHeight+=childView.getMeasuredHeight();
      if (totalHeight < clipHeight) {
        dummyView.addFakeView(childView);
      }
 else {
        dummyView.addFakeView(childView);
        int averageHeight=totalHeight / (i + 1);
        totalHeight+=(len - i - 1) * averageHeight;
        break;
      }
    }
    if (info.expanding) {
      ExpandAnimation ani=new ExpandAnimation(dummyView,0,totalHeight,info);
      ani.setDuration(this.parent.getAnimationDuration());
      ani.setAnimationListener(new AnimationListener(){
        @Override public void onAnimationEnd(        Animation animation){
          stopAnimation(groupPosition);
          notifyDataSetChanged();
        }
        @Override public void onAnimationRepeat(        Animation animation){
        }
        @Override public void onAnimationStart(        Animation animation){
        }
      }
);
      dummyView.startAnimation(ani);
    }
 else {
      if (info.dummyHeight == -1) {
        info.dummyHeight=totalHeight;
      }
      ExpandAnimation ani=new ExpandAnimation(dummyView,info.dummyHeight,0,info);
      ani.setDuration(this.parent.getAnimationDuration());
      ani.setAnimationListener(new AnimationListener(){
        @Override public void onAnimationEnd(        Animation animation){
          stopAnimation(groupPosition);
          listView.collapseGroup(groupPosition);
          notifyDataSetChanged();
          info.dummyHeight=-1;
        }
        @Override public void onAnimationRepeat(        Animation animation){
        }
        @Override public void onAnimationStart(        Animation animation){
        }
      }
);
      dummyView.startAnimation(ani);
    }
    return convertView;
  }
 else {
    return getRealChildView(groupPosition,childPosition,isLastChild,convertView,parent);
  }
}

Fixed version (ground truth):
/** 
 * Override   {@link #getChildView(int,int,boolean,View,ViewGroup)} instead.
 */
@Override public final View getChildView(final int groupPosition,int childPosition,boolean isLastChild,View convertView,final ViewGroup parent){
  final GroupInfo info=getGroupInfo(groupPosition);
  if (info.animating) {
    if (convertView == null) {
      convertView=new DummyView(parent.getContext());
      convertView.setLayoutParams(new AbsListView.LayoutParams(LayoutParams.MATCH_PARENT,0));
    }
    if (childPosition < info.firstChildPosition) {
      convertView.getLayoutParams().height=0;
      return convertView;
    }
    final ExpandableListView listView=(ExpandableListView)parent;
    final DummyView dummyView=(DummyView)convertView;
    dummyView.clearViews();
    dummyView.setDivider(listView.getDivider(),parent.getMeasuredWidth(),listView.getDividerHeight());
    final int measureSpecW=MeasureSpec.makeMeasureSpec(parent.getWidth(),MeasureSpec.EXACTLY);
    final int measureSpecH=MeasureSpec.makeMeasureSpec(0,MeasureSpec.UNSPECIFIED);
    int totalHeight=0;
    int clipHeight=parent.getHeight();
    final int len=getRealChildrenCount(groupPosition);
    for (int i=info.firstChildPosition; i < len; i++) {
      View childView=getRealChildView(groupPosition,i,(i == len - 1),null,parent);
      childView.measure(measureSpecW,measureSpecH);
      totalHeight+=childView.getMeasuredHeight();
      if (totalHeight < clipHeight) {
        dummyView.addFakeView(childView);
      }
 else {
        dummyView.addFakeView(childView);
        int averageHeight=totalHeight / (i + 1);
        totalHeight+=(len - i - 1) * averageHeight;
        break;
      }
    }
    Object o;
    int state=(o=dummyView.getTag()) == null ? STATE_IDLE : (Integer)o;
    if (info.expanding && state != STATE_EXPANDING) {
      ExpandAnimation ani=new ExpandAnimation(dummyView,0,totalHeight,info);
      ani.setDuration(this.parent.getAnimationDuration());
      ani.setAnimationListener(new AnimationListener(){
        @Override public void onAnimationEnd(        Animation animation){
          stopAnimation(groupPosition);
          notifyDataSetChanged();
          dummyView.setTag(STATE_IDLE);
        }
        @Override public void onAnimationRepeat(        Animation animation){
        }
        @Override public void onAnimationStart(        Animation animation){
        }
      }
);
      dummyView.startAnimation(ani);
      dummyView.setTag(STATE_EXPANDING);
    }
 else     if (!info.expanding && state != STATE_COLLAPSING) {
      if (info.dummyHeight == -1) {
        info.dummyHeight=totalHeight;
      }
      ExpandAnimation ani=new ExpandAnimation(dummyView,info.dummyHeight,0,info);
      ani.setDuration(this.parent.getAnimationDuration());
      ani.setAnimationListener(new AnimationListener(){
        @Override public void onAnimationEnd(        Animation animation){
          stopAnimation(groupPosition);
          listView.collapseGroup(groupPosition);
          notifyDataSetChanged();
          info.dummyHeight=-1;
          dummyView.setTag(STATE_IDLE);
        }
        @Override public void onAnimationRepeat(        Animation animation){
        }
        @Override public void onAnimationStart(        Animation animation){
        }
      }
);
      dummyView.startAnimation(ani);
      dummyView.setTag(STATE_COLLAPSING);
    }
    return convertView;
  }
 else {
    return getRealChildView(groupPosition,childPosition,isLastChild,convertView,parent);
  }
}