Program: 62849
Project: 62849
Buggy source:
/** 
 * Display the view of a file browser item.
 */
@Override public View getView(int position,View convertView,ViewGroup parent){
  ViewHolder holder;
  View v=convertView;
  if (v == null || (((ViewHolder)v.getTag()).listmode != mListMode)) {
    LayoutInflater inflater=(LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    if (!mListMode)     v=inflater.inflate(R.layout.video_grid_item,parent,false);
 else     v=inflater.inflate(R.layout.video_list_item,parent,false);
    holder=new ViewHolder();
    holder.layout=v.findViewById(R.id.layout_item);
    holder.thumbnail=(ImageView)v.findViewById(R.id.ml_item_thumbnail);
    holder.title=(TextView)v.findViewById(R.id.ml_item_title);
    holder.subtitle=(TextView)v.findViewById(R.id.ml_item_subtitle);
    holder.progress=(ProgressBar)v.findViewById(R.id.ml_item_progress);
    holder.listmode=mListMode;
    v.setTag(holder);
    v.setLayoutParams(new GridView.LayoutParams(v.getLayoutParams().width,v.getLayoutParams().height));
  }
 else   holder=(ViewHolder)v.getTag();
  Media media=getItem(position);
  holder.title.setText(media.getTitle());
  Bitmap thumbnail;
  if (media.getPicture() != null) {
    thumbnail=media.getPicture();
    holder.thumbnail.setImageBitmap(thumbnail);
  }
 else {
    thumbnail=BitmapFactory.decodeResource(v.getResources(),R.drawable.thumbnail);
    holder.thumbnail.setImageBitmap(thumbnail);
  }
  ColorStateList titleColor=v.getResources().getColorStateList(R.color.list_title);
  holder.title.setTextColor(titleColor);
  long lastTime=media.getTime();
  String text;
  if (lastTime > 0) {
    text=String.format("String_Node_Str",Util.millisToString(lastTime),Util.millisToString(media.getLength()));
    holder.progress.setVisibility(View.VISIBLE);
    holder.progress.setMax((int)(media.getLength() / 1000));
    holder.progress.setProgress((int)(lastTime / 1000));
  }
 else {
    text=String.format("String_Node_Str",Util.millisToString(media.getLength()));
    holder.progress.setVisibility(View.GONE);
  }
  if (media.getWidth() > 0 && media.getHeight() > 0) {
    text+=String.format("String_Node_Str",media.getWidth(),media.getHeight());
  }
  holder.subtitle.setText(text);
  return v;
}

Fixed version (ground truth):
/** 
 * Display the view of a file browser item.
 */
@Override public View getView(int position,View convertView,ViewGroup parent){
  ViewHolder holder;
  View v=convertView;
  if (v == null || (((ViewHolder)v.getTag()).listmode != mListMode)) {
    LayoutInflater inflater=(LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    if (!mListMode)     v=inflater.inflate(R.layout.video_grid_item,parent,false);
 else     v=inflater.inflate(R.layout.video_list_item,parent,false);
    holder=new ViewHolder();
    holder.layout=v.findViewById(R.id.layout_item);
    holder.thumbnail=(ImageView)v.findViewById(R.id.ml_item_thumbnail);
    holder.title=(TextView)v.findViewById(R.id.ml_item_title);
    holder.subtitle=(TextView)v.findViewById(R.id.ml_item_subtitle);
    holder.progress=(ProgressBar)v.findViewById(R.id.ml_item_progress);
    holder.listmode=mListMode;
    v.setTag(holder);
    v.setLayoutParams(new GridView.LayoutParams(v.getLayoutParams().width,v.getLayoutParams().height));
  }
 else   holder=(ViewHolder)v.getTag();
  Media media=getItem(position);
  holder.title.setText(media.getTitle());
  if (media.getPicture() != null) {
    final Bitmap thumbnail=media.getPicture();
    holder.thumbnail.setImageBitmap(thumbnail);
  }
 else {
    if (mDefaultThumbnail == null) {
      mDefaultThumbnail=BitmapFactory.decodeResource(v.getResources(),R.drawable.thumbnail);
    }
    holder.thumbnail.setImageBitmap(mDefaultThumbnail);
  }
  ColorStateList titleColor=v.getResources().getColorStateList(R.color.list_title);
  holder.title.setTextColor(titleColor);
  long lastTime=media.getTime();
  String text;
  if (lastTime > 0) {
    text=String.format("String_Node_Str",Util.millisToString(lastTime),Util.millisToString(media.getLength()));
    holder.progress.setVisibility(View.VISIBLE);
    holder.progress.setMax((int)(media.getLength() / 1000));
    holder.progress.setProgress((int)(lastTime / 1000));
  }
 else {
    text=String.format("String_Node_Str",Util.millisToString(media.getLength()));
    holder.progress.setVisibility(View.GONE);
  }
  if (media.getWidth() > 0 && media.getHeight() > 0) {
    text+=String.format("String_Node_Str",media.getWidth(),media.getHeight());
  }
  holder.subtitle.setText(text);
  return v;
}