Program: 15440
Project: 15440
Buggy source:
@Override public void handleMessage(final Message msg){
  final Context context=getSupportActivity();
switch (msg.what) {
case NOTIF_DOWNLOAD_NECESSARY:
    loadingView=new LoadingView(context,R.string.download_waiting,true,true);
  listFooterNotifications.addView(loadingView);
break;
case NOTIF_DOWNLOAD_START:
loadingView.setIndeterminate(R.string.download_connecting);
break;
case NOTIF_STARTING:
if (loadingView != null) loadingView.setIndeterminate(R.string.download_downloadstarting);
break;
case NOTIF_AGE:
final TextView cacheNotif=new TextView(context);
cacheNotif.setText(context.getString(R.string.listing_cached) + "String_Node_Str" + RRTime.formatDateTime((Long)msg.obj));
final int paddingPx=General.dpToPixels(context,6);
cacheNotif.setPadding(paddingPx,paddingPx,paddingPx,paddingPx);
cacheNotif.setTextSize(13f);
listHeaderNotifications.addView(cacheNotif);
listHeaderNotifications.requestLayout();
adapter.notifyDataSetChanged();
break;
case NOTIF_ERROR:
{
if (loadingView != null) loadingView.setDone(R.string.download_failed);
final RRError error=(RRError)msg.obj;
fragmentHeader.addView(new ErrorView(getSupportActivity(),error));
break;
}
case NOTIF_PROGRESS:
if (loadingView != null) loadingView.setProgress(R.string.download_loading,(Float)msg.obj);
break;
case NOTIF_DOWNLOAD_DONE:
if (loadingView != null) loadingView.setDoneNoAnim(R.string.download_done);
break;
case NOTIF_ERROR_FOOTER:
{
if (loadingView != null) loadingView.setDone(R.string.download_failed);
final RRError error=(RRError)msg.obj;
listFooterNotifications.addView(new ErrorView(getSupportActivity(),error));
adapter.notifyDataSetChanged();
break;
}
}
}

Fixed version (ground truth):
@Override public void handleMessage(final Message msg){
  final Context context=getSupportActivity();
switch (msg.what) {
case NOTIF_DOWNLOAD_NECESSARY:
    loadingView=new LoadingView(context,R.string.download_waiting,true,true);
  listFooterNotifications.addView(loadingView);
adapter.notifyDataSetChanged();
break;
case NOTIF_DOWNLOAD_START:
loadingView.setIndeterminate(R.string.download_connecting);
break;
case NOTIF_STARTING:
if (loadingView != null) loadingView.setIndeterminate(R.string.download_downloadstarting);
break;
case NOTIF_AGE:
final TextView cacheNotif=new TextView(context);
cacheNotif.setText(context.getString(R.string.listing_cached) + "String_Node_Str" + RRTime.formatDateTime((Long)msg.obj));
final int paddingPx=General.dpToPixels(context,6);
cacheNotif.setPadding(paddingPx,paddingPx,paddingPx,paddingPx);
cacheNotif.setTextSize(13f);
listHeaderNotifications.addView(cacheNotif);
listHeaderNotifications.requestLayout();
adapter.notifyDataSetChanged();
break;
case NOTIF_ERROR:
{
if (loadingView != null) loadingView.setDone(R.string.download_failed);
final RRError error=(RRError)msg.obj;
fragmentHeader.addView(new ErrorView(getSupportActivity(),error));
break;
}
case NOTIF_PROGRESS:
if (loadingView != null) loadingView.setProgress(R.string.download_loading,(Float)msg.obj);
break;
case NOTIF_DOWNLOAD_DONE:
if (loadingView != null) loadingView.setDoneNoAnim(R.string.download_done);
break;
case NOTIF_ERROR_FOOTER:
{
if (loadingView != null) loadingView.setDone(R.string.download_failed);
final RRError error=(RRError)msg.obj;
listFooterNotifications.addView(new ErrorView(getSupportActivity(),error));
adapter.notifyDataSetChanged();
break;
}
}
}