Program: 44555
Project: 44555
Buggy source:
MessageItem(Context context,String type,Cursor cursor,ColumnsMap columnsMap,String highlight) throws MmsException {
  mContext=context;
  mMsgId=cursor.getLong(columnsMap.mColumnMsgId);
  mHighlight=highlight != null ? highlight.toLowerCase() : null;
  mType=type;
  if ("String_Node_Str".equals(type)) {
    mReadReport=false;
    mDeliveryReport=(cursor.getLong(columnsMap.mColumnSmsStatus) != Sms.STATUS_NONE);
    mMessageUri=ContentUris.withAppendedId(Sms.CONTENT_URI,mMsgId);
    mBoxId=cursor.getInt(columnsMap.mColumnSmsType);
    mAddress=cursor.getString(columnsMap.mColumnSmsAddress);
    if (Sms.isOutgoingFolder(mBoxId)) {
      String meString=context.getString(R.string.messagelist_sender_self);
      mContact=meString;
    }
 else {
      mContact=Contact.get(mAddress,true).getName();
    }
    mBody=cursor.getString(columnsMap.mColumnSmsBody);
    if (!isOutgoingMessage()) {
      long date=cursor.getLong(columnsMap.mColumnSmsDate);
      mTimestamp=String.format(context.getString(R.string.sent_on),MessageUtils.formatTimeStampString(context,date));
    }
    mLocked=cursor.getInt(columnsMap.mColumnSmsLocked) != 0;
  }
 else   if ("String_Node_Str".equals(type)) {
    mMessageUri=ContentUris.withAppendedId(Mms.CONTENT_URI,mMsgId);
    mBoxId=cursor.getInt(columnsMap.mColumnMmsMessageBox);
    mMessageType=cursor.getInt(columnsMap.mColumnMmsMessageType);
    mErrorType=cursor.getInt(columnsMap.mColumnMmsErrorType);
    String subject=cursor.getString(columnsMap.mColumnMmsSubject);
    if (!TextUtils.isEmpty(subject)) {
      EncodedStringValue v=new EncodedStringValue(cursor.getInt(columnsMap.mColumnMmsSubjectCharset),PduPersister.getBytes(subject));
      mSubject=v.getString();
    }
    mLocked=cursor.getInt(columnsMap.mColumnMmsLocked) != 0;
    long timestamp=0L;
    PduPersister p=PduPersister.getPduPersister(mContext);
    if (PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND == mMessageType) {
      mDeliveryReport=false;
      NotificationInd notifInd=(NotificationInd)p.load(mMessageUri);
      interpretFrom(notifInd.getFrom());
      mBody=new String(notifInd.getContentLocation());
      mMessageSize=(int)notifInd.getMessageSize();
      timestamp=notifInd.getExpiry() * 1000L;
    }
 else {
      MultimediaMessagePdu msg=(MultimediaMessagePdu)p.load(mMessageUri);
      mSlideshow=SlideshowModel.createFromPduBody(context,msg.getBody());
      mAttachmentType=MessageUtils.getAttachmentType(mSlideshow);
      if (mMessageType == PduHeaders.MESSAGE_TYPE_RETRIEVE_CONF) {
        RetrieveConf retrieveConf=(RetrieveConf)msg;
        interpretFrom(retrieveConf.getFrom());
        timestamp=retrieveConf.getDate() * 1000L;
      }
 else {
        mContact=mAddress=context.getString(R.string.messagelist_sender_self);
        timestamp=((SendReq)msg).getDate() * 1000L;
      }
      String report=cursor.getString(columnsMap.mColumnMmsDeliveryReport);
      if ((report == null) || !mAddress.equals(context.getString(R.string.messagelist_sender_self))) {
        mDeliveryReport=false;
      }
 else {
        int reportInt;
        try {
          reportInt=Integer.parseInt(report);
          mDeliveryReport=(reportInt == PduHeaders.VALUE_YES);
        }
 catch (        NumberFormatException nfe) {
          Log.e(TAG,"String_Node_Str");
          mDeliveryReport=false;
        }
      }
      report=cursor.getString(columnsMap.mColumnMmsReadReport);
      if ((report == null) || !mAddress.equals(context.getString(R.string.messagelist_sender_self))) {
        mReadReport=false;
      }
 else {
        int reportInt;
        try {
          reportInt=Integer.parseInt(report);
          mReadReport=(reportInt == PduHeaders.VALUE_YES);
        }
 catch (        NumberFormatException nfe) {
          Log.e(TAG,"String_Node_Str");
          mReadReport=false;
        }
      }
      SlideModel slide=mSlideshow.get(0);
      if ((slide != null) && slide.hasText()) {
        TextModel tm=slide.getText();
        if (tm.isDrmProtected()) {
          mBody=mContext.getString(R.string.drm_protected_text);
        }
 else {
          mBody=slide.getText().getText();
        }
      }
      mMessageSize=mSlideshow.getCurrentMessageSize();
    }
    if (!isOutgoingMessage()) {
      mTimestamp=context.getString(getTimestampStrId(),MessageUtils.formatTimeStampString(context,timestamp));
    }
  }
 else {
    throw new MmsException("String_Node_Str" + type);
  }
}

Fixed version (ground truth):
MessageItem(Context context,String type,Cursor cursor,ColumnsMap columnsMap,String highlight) throws MmsException {
  mContext=context;
  mMsgId=cursor.getLong(columnsMap.mColumnMsgId);
  mHighlight=highlight != null ? highlight.toLowerCase() : null;
  mType=type;
  if ("String_Node_Str".equals(type)) {
    mReadReport=false;
    mDeliveryReport=(cursor.getLong(columnsMap.mColumnSmsStatus) != Sms.STATUS_NONE);
    mMessageUri=ContentUris.withAppendedId(Sms.CONTENT_URI,mMsgId);
    mBoxId=cursor.getInt(columnsMap.mColumnSmsType);
    mAddress=cursor.getString(columnsMap.mColumnSmsAddress);
    if (Sms.isOutgoingFolder(mBoxId)) {
      String meString=context.getString(R.string.messagelist_sender_self);
      mContact=meString;
    }
 else {
      mContact=Contact.get(mAddress,true).getName();
    }
    mBody=cursor.getString(columnsMap.mColumnSmsBody);
    if (!isOutgoingMessage()) {
      long date=cursor.getLong(columnsMap.mColumnSmsDate);
      mTimestamp=String.format(context.getString(R.string.sent_on),MessageUtils.formatTimeStampString(context,date));
    }
    mLocked=cursor.getInt(columnsMap.mColumnSmsLocked) != 0;
  }
 else   if ("String_Node_Str".equals(type)) {
    mMessageUri=ContentUris.withAppendedId(Mms.CONTENT_URI,mMsgId);
    mBoxId=cursor.getInt(columnsMap.mColumnMmsMessageBox);
    mMessageType=cursor.getInt(columnsMap.mColumnMmsMessageType);
    mErrorType=cursor.getInt(columnsMap.mColumnMmsErrorType);
    String subject=cursor.getString(columnsMap.mColumnMmsSubject);
    if (!TextUtils.isEmpty(subject)) {
      EncodedStringValue v=new EncodedStringValue(cursor.getInt(columnsMap.mColumnMmsSubjectCharset),PduPersister.getBytes(subject));
      mSubject=v.getString();
    }
    mLocked=cursor.getInt(columnsMap.mColumnMmsLocked) != 0;
    long timestamp=0L;
    PduPersister p=PduPersister.getPduPersister(mContext);
    if (PduHeaders.MESSAGE_TYPE_NOTIFICATION_IND == mMessageType) {
      mDeliveryReport=false;
      NotificationInd notifInd=(NotificationInd)p.load(mMessageUri);
      interpretFrom(notifInd.getFrom());
      mBody=new String(notifInd.getContentLocation());
      mMessageSize=(int)notifInd.getMessageSize();
      timestamp=notifInd.getExpiry() * 1000L;
    }
 else {
      MultimediaMessagePdu msg=(MultimediaMessagePdu)p.load(mMessageUri);
      mSlideshow=SlideshowModel.createFromPduBody(context,msg.getBody());
      mAttachmentType=MessageUtils.getAttachmentType(mSlideshow);
      if (mMessageType == PduHeaders.MESSAGE_TYPE_RETRIEVE_CONF) {
        RetrieveConf retrieveConf=(RetrieveConf)msg;
        interpretFrom(retrieveConf.getFrom());
        timestamp=retrieveConf.getDate() * 1000L;
      }
 else {
        mContact=mAddress=context.getString(R.string.messagelist_sender_self);
        timestamp=((SendReq)msg).getDate() * 1000L;
      }
      String report=cursor.getString(columnsMap.mColumnMmsDeliveryReport);
      if ((report == null) || !mAddress.equals(context.getString(R.string.messagelist_sender_self))) {
        mDeliveryReport=false;
      }
 else {
        int reportInt;
        try {
          reportInt=Integer.parseInt(report);
          mDeliveryReport=(reportInt == PduHeaders.VALUE_YES);
        }
 catch (        NumberFormatException nfe) {
          Log.e(TAG,"String_Node_Str");
          mDeliveryReport=false;
        }
      }
      report=cursor.getString(columnsMap.mColumnMmsReadReport);
      if ((report == null) || !mAddress.equals(context.getString(R.string.messagelist_sender_self))) {
        mReadReport=false;
      }
 else {
        int reportInt;
        try {
          reportInt=Integer.parseInt(report);
          mReadReport=(reportInt == PduHeaders.VALUE_YES);
        }
 catch (        NumberFormatException nfe) {
          Log.e(TAG,"String_Node_Str");
          mReadReport=false;
        }
      }
      SlideModel slide=mSlideshow.get(0);
      if ((slide != null) && slide.hasText()) {
        TextModel tm=slide.getText();
        if (tm.isDrmProtected()) {
          mBody=mContext.getString(R.string.drm_protected_text);
        }
 else {
          mBody=tm.getText();
        }
      }
      mMessageSize=mSlideshow.getCurrentMessageSize();
    }
    if (!isOutgoingMessage()) {
      mTimestamp=context.getString(getTimestampStrId(),MessageUtils.formatTimeStampString(context,timestamp));
    }
  }
 else {
    throw new MmsException("String_Node_Str" + type);
  }
}