Program: 15128
Project: 15128
Buggy source:
private void refreshViews(Cursor cursor){
  if (!cursor.moveToFirst())   return;
  String state=cursor.getString(cursor.getColumnIndex("String_Node_Str"));
  mIsLocal=MediaUtils.isLocalFile(state);
  if (mIsLocal)   getSherlockActivity().invalidateOptionsMenu();
  mTitleView.setText(cursor.getString(cursor.getColumnIndex("String_Node_Str")));
  String caption=cursor.getString(cursor.getColumnIndex("String_Node_Str"));
  if (caption == null || caption.length() == 0) {
    mCaptionView.setVisibility(View.GONE);
  }
 else {
    mCaptionView.setText(caption);
    mCaptionView.setVisibility(View.VISIBLE);
  }
  String desc=cursor.getString(cursor.getColumnIndex("String_Node_Str"));
  if (desc == null || desc.length() == 0) {
    mDescriptionView.setVisibility(View.GONE);
  }
 else {
    mDescriptionView.setText(desc);
    mDescriptionView.setVisibility(View.VISIBLE);
  }
  String date=MediaUtils.getDate(cursor.getLong(cursor.getColumnIndex("String_Node_Str")));
  if (mIsLocal)   mDateView.setText("String_Node_Str" + date);
 else   mDateView.setText("String_Node_Str" + date);
  String fileName=cursor.getString(cursor.getColumnIndex("String_Node_Str"));
  mFileNameView.setText("String_Node_Str" + fileName);
  String fileURL=cursor.getString(cursor.getColumnIndex("String_Node_Str"));
  if (fileURL != null) {
    String fileType=fileURL.replaceAll("String_Node_Str","String_Node_Str").toUpperCase();
    mFileTypeView.setText("String_Node_Str" + fileType);
    mFileTypeView.setVisibility(View.VISIBLE);
  }
 else {
    mFileTypeView.setVisibility(View.GONE);
  }
  String imageUri=cursor.getString(cursor.getColumnIndex("String_Node_Str"));
  if (imageUri == null)   imageUri=cursor.getString(cursor.getColumnIndex("String_Node_Str"));
  inflateImageView();
  if (MediaUtils.isValidImage(imageUri)) {
    int width=cursor.getInt(cursor.getColumnIndex("String_Node_Str"));
    int height=cursor.getInt(cursor.getColumnIndex("String_Node_Str"));
    float screenWidth;
    View parentView=(View)mImageView.getParent();
    if (this.isInLayout()) {
      screenWidth=parentView.getMeasuredWidth();
    }
 else {
      screenWidth=getActivity().getResources().getDisplayMetrics().widthPixels;
    }
    float screenHeight=getActivity().getResources().getDisplayMetrics().heightPixels;
    if (width > 0 && height > 0) {
      String dimensions=width + "String_Node_Str" + height;
      mDimensionsView.setText("String_Node_Str" + dimensions);
      mDimensionsView.setVisibility(View.VISIBLE);
    }
 else {
      mDimensionsView.setVisibility(View.GONE);
    }
    if (width > screenWidth) {
      height=(int)(height / (width / screenWidth));
    }
 else     if (height > screenHeight) {
      width=(int)(width / (height / screenHeight));
    }
    if (mIsLocal) {
      final String filePath=cursor.getString(cursor.getColumnIndex("String_Node_Str"));
      loadLocalImage(mImageView,filePath,width,height);
    }
 else {
      ((NetworkImageView)mImageView).setImageUrl(imageUri + "String_Node_Str" + screenWidth,WordPress.imageLoader);
    }
    mImageView.setVisibility(View.VISIBLE);
    mImageView.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,height));
  }
 else {
    mImageView.setVisibility(View.GONE);
    mDimensionsView.setVisibility(View.GONE);
  }
}

Fixed version (ground truth):
private void refreshViews(Cursor cursor){
  if (!cursor.moveToFirst())   return;
  String state=cursor.getString(cursor.getColumnIndex("String_Node_Str"));
  mIsLocal=MediaUtils.isLocalFile(state);
  if (mIsLocal)   getSherlockActivity().invalidateOptionsMenu();
  mTitleView.setText(cursor.getString(cursor.getColumnIndex("String_Node_Str")));
  String caption=cursor.getString(cursor.getColumnIndex("String_Node_Str"));
  if (caption == null || caption.length() == 0) {
    mCaptionView.setVisibility(View.GONE);
  }
 else {
    mCaptionView.setText(caption);
    mCaptionView.setVisibility(View.VISIBLE);
  }
  String desc=cursor.getString(cursor.getColumnIndex("String_Node_Str"));
  if (desc == null || desc.length() == 0) {
    mDescriptionView.setVisibility(View.GONE);
  }
 else {
    mDescriptionView.setText(desc);
    mDescriptionView.setVisibility(View.VISIBLE);
  }
  String date=MediaUtils.getDate(cursor.getLong(cursor.getColumnIndex("String_Node_Str")));
  if (mIsLocal)   mDateView.setText("String_Node_Str" + date);
 else   mDateView.setText("String_Node_Str" + date);
  String fileName=cursor.getString(cursor.getColumnIndex("String_Node_Str"));
  mFileNameView.setText("String_Node_Str" + fileName);
  String fileURL=cursor.getString(cursor.getColumnIndex("String_Node_Str"));
  if (fileURL != null) {
    String fileType=fileURL.replaceAll("String_Node_Str","String_Node_Str").toUpperCase();
    mFileTypeView.setText("String_Node_Str" + fileType);
    mFileTypeView.setVisibility(View.VISIBLE);
  }
 else {
    mFileTypeView.setVisibility(View.GONE);
  }
  String imageUri=cursor.getString(cursor.getColumnIndex("String_Node_Str"));
  if (imageUri == null)   imageUri=cursor.getString(cursor.getColumnIndex("String_Node_Str"));
  inflateImageView();
  if (MediaUtils.isValidImage(imageUri)) {
    int width=cursor.getInt(cursor.getColumnIndex("String_Node_Str"));
    int height=cursor.getInt(cursor.getColumnIndex("String_Node_Str"));
    float screenWidth;
    View parentView=(View)mImageView.getParent();
    if (this.isInLayout()) {
      screenWidth=parentView.getMeasuredWidth();
    }
 else {
      screenWidth=getActivity().getResources().getDisplayMetrics().widthPixels;
    }
    float screenHeight=getActivity().getResources().getDisplayMetrics().heightPixels;
    if (width > 0 && height > 0) {
      String dimensions=width + "String_Node_Str" + height;
      mDimensionsView.setText("String_Node_Str" + dimensions);
      mDimensionsView.setVisibility(View.VISIBLE);
    }
 else {
      mDimensionsView.setVisibility(View.GONE);
    }
    if (width > screenWidth) {
      height=(int)(height / (width / screenWidth));
      width=(int)screenWidth;
    }
 else     if (height > screenHeight) {
      width=(int)(width / (height / screenHeight));
      height=(int)screenHeight;
    }
    if (mIsLocal) {
      final String filePath=cursor.getString(cursor.getColumnIndex("String_Node_Str"));
      loadLocalImage(mImageView,filePath,width,height);
    }
 else {
      ((NetworkImageView)mImageView).setImageUrl(imageUri + "String_Node_Str" + screenWidth,WordPress.imageLoader);
    }
    mImageView.setVisibility(View.VISIBLE);
    mImageView.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,height));
  }
 else {
    mImageView.setVisibility(View.GONE);
    mDimensionsView.setVisibility(View.GONE);
  }
}