Program: 15454
Project: 15454
Buggy source:
@Override public View onCreateView(final LayoutInflater inflater,final ViewGroup container,final Bundle savedInstanceState){
  super.onCreateView(inflater,container,savedInstanceState);
  final Context context=container.getContext();
  sharedPrefs=PreferenceManager.getDefaultSharedPreferences(context);
  final LinearLayout outer=new LinearLayout(context);
  outer.setOrientation(android.widget.LinearLayout.VERTICAL);
  fragmentHeader=createVerticalLinearLayout(context);
  final LinearLayout listHeader=createVerticalLinearLayout(context);
  listHeaderNotifications=createVerticalLinearLayout(context);
  listFooterNotifications=createVerticalLinearLayout(context);
  if (subreddit.isReal()) {
    final SubredditHeader subredditHeader=new SubredditHeader(context,subreddit);
    listHeader.addView(subredditHeader);
  }
  listHeader.addView(listHeaderNotifications);
  lv=(ListView)inflater.inflate(R.layout.reddit_post_list);
  lv.setOnScrollListener(this);
  lv.addHeaderView(listHeader);
  lv.addFooterView(listFooterNotifications);
  lv.setPersistentDrawingCache(ViewGroup.PERSISTENT_ALL_CACHES);
  lv.setAlwaysDrawnWithCacheEnabled(true);
  adapter=new PostListingAdapter(lv,this);
  lv.setAdapter(adapter);
  final ListOverlayView lov=new ListOverlayView(context,lv);
  outer.addView(fragmentHeader);
  outer.addView(lov);
  request=new PostListingRequest(url,RedditAccountManager.getInstance(context).getDefaultAccount(),session,downloadType,true);
  CacheManager.getInstance(context).makeRequest(request);
  return outer;
}

Fixed version (ground truth):
@Override public View onCreateView(final LayoutInflater inflater,final ViewGroup container,final Bundle savedInstanceState){
  super.onCreateView(inflater,container,savedInstanceState);
  final Context context=container.getContext();
  sharedPrefs=PreferenceManager.getDefaultSharedPreferences(context);
  final LinearLayout outer=new LinearLayout(context){
    @Override protected void onAttachedToWindow(){
      super.onAttachedToWindow();
      getLayoutParams().height=ViewGroup.LayoutParams.FILL_PARENT;
    }
  }
;
  outer.setOrientation(android.widget.LinearLayout.VERTICAL);
  fragmentHeader=createVerticalLinearLayout(context);
  final LinearLayout listHeader=createVerticalLinearLayout(context);
  listHeaderNotifications=createVerticalLinearLayout(context);
  listFooterNotifications=createVerticalLinearLayout(context);
  if (subreddit.isReal()) {
    final SubredditHeader subredditHeader=new SubredditHeader(context,subreddit);
    listHeader.addView(subredditHeader);
  }
  listHeader.addView(listHeaderNotifications);
  lv=(ListView)inflater.inflate(R.layout.reddit_post_list);
  lv.setOnScrollListener(this);
  lv.addHeaderView(listHeader);
  lv.addFooterView(listFooterNotifications);
  lv.setPersistentDrawingCache(ViewGroup.PERSISTENT_ALL_CACHES);
  lv.setAlwaysDrawnWithCacheEnabled(true);
  adapter=new PostListingAdapter(lv,outer,this);
  lv.setAdapter(adapter);
  final ListOverlayView lov=new ListOverlayView(context,lv);
  outer.addView(fragmentHeader);
  outer.addView(lov);
  lv.getLayoutParams().height=ViewGroup.LayoutParams.FILL_PARENT;
  request=new PostListingRequest(url,RedditAccountManager.getInstance(context).getDefaultAccount(),session,downloadType,true);
  CacheManager.getInstance(context).makeRequest(request);
  return outer;
}