Program: 15138
Project: 15138
Buggy source:
private void refreshViews(Cursor cursor){
  if (!cursor.moveToFirst())   return;
  mTitleView.setText(cursor.getString(cursor.getColumnIndex("String_Node_Str")));
  mCaptionView.setText(cursor.getString(cursor.getColumnIndex("String_Node_Str")));
  mDescriptionView.setText(cursor.getString(cursor.getColumnIndex("String_Node_Str")));
  String state=cursor.getString(cursor.getColumnIndex("String_Node_Str"));
  mIsLocal=MediaUtils.isLocalFile(state);
  if (mIsLocal)   getActivity().invalidateOptionsMenu();
  inflateImageView();
  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"));
  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;
  mTitleView.setText(cursor.getString(cursor.getColumnIndex("String_Node_Str")));
  mCaptionView.setText(cursor.getString(cursor.getColumnIndex("String_Node_Str")));
  mDescriptionView.setText(cursor.getString(cursor.getColumnIndex("String_Node_Str")));
  String state=cursor.getString(cursor.getColumnIndex("String_Node_Str"));
  mIsLocal=MediaUtils.isLocalFile(state);
  if (mIsLocal)   getSherlockActivity().invalidateOptionsMenu();
  inflateImageView();
  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"));
  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);
  }
}