Buggy code:
public class ChatMsgViewAdapter extends BaseAdapter { @ SuppressWarnings ( "unused" ) private static final String TAG = "ChatMsgViewAdapter" ; private Context mContext ; private LayoutInflater mInflater ; private ArrayList < ChatMsgItem > mData = new ArrayList < ChatMsgItem > ( ) ; private HashMap < String , Bitmap > mHeadPics = new HashMap < String , Bitmap > ( ) ; private Long mLastChatTime = 0L ; public static interface IMsgViewType { int IMVT_COM_MSG = 0 ; int IMVT_TO_MSG = 1 ; } public ChatMsgViewAdapter ( Context context ) { } public void setChatDataSource ( ArrayList < ChatMsgItem > source ) { } public void setHeadPisDataSource ( HashMap < String , Bitmap > source ) { } @ Override public int getCount ( ) { } @ Override public Object getItem ( int position ) { } @ Override public long getItemId ( int position ) { } @ Override public int getItemViewType ( int position ) { } @ Override public int getViewTypeCount ( ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { final ChatMsgItem msgItem = mData . get ( position ) ; if ( msgItem == null ) { return convertView ; } ChatMsgViewAdapter . ViewHolder holder = null ; if ( convertView == null ) { if ( ( msgItem . getMsgType ( ) ) == ( ChatMsgViewAdapter . IMsgViewType . IMVT_COM_MSG ) ) { convertView = mInflater . inflate ( chat_msg_item_from_left_layout , parent , false ) ; } else { convertView = mInflater . inflate ( chat_msg_item_to_right_layout , parent , false ) ; } holder = new ChatMsgViewAdapter . ViewHolder ( ) ; holder . chat_msg_send_time = ( ( TextView ) ( convertView . findViewById ( chat_msg_sendtime ) ) ) ; holder . chat_msg_content = ( ( TextView ) ( convertView . findViewById ( chat_msg_content ) ) ) ; holder . chat_person_pic = ( ( ImageView ) ( convertView . findViewById ( chat_msg_person_pic ) ) ) ; convertView . setTag ( holder ) ; } else { holder = ( ( ChatMsgViewAdapter . ViewHolder ) ( convertView . getTag ( ) ) ) ; } if ( ( mHeadPics . get ( msgItem . getFromUid ( ) ) ) == null ) { holder . chat_person_pic . setImageResource ( person_default_small_pic ) ; } else { holder . chat_person_pic . setImageBitmap ( mHeadPics . get ( msgItem . getFromUid ( ) ) ) ; } holder . chat_person_pic . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View arg0 ) { startToViewContactsInfo ( msgItem . getFromUid ( ) ) ; } } ) ; String time = msgItem . getAddedTime ( ) ; String chat_time = time . substring ( 0 , ( ( time . length ( ) ) - 6 ) ) ; if ( ( ( Long . valueOf ( chat_time ) ) - ( mLastChatTime ) ) > ( CommonDataStructure . TIME_FIVE_MINUTES_BEFORE ) ) { mLastChatTime = Long . valueOf ( chat_time ) ; holder . chat_msg_send_time . setVisibility ( VISIBLE ) ; holder . chat_msg_send_time . setText ( Utils . getAddedTimeTitle ( mContext , chat_time ) ) ; } else { <START_BUG> holder . chat_msg_send_time . setVisibility ( INVISIBLE ) ; <END_BUG> } holder . chat_msg_content . setText ( msgItem . getChatContent ( ) ) ; return convertView ; } class ViewHolder { ImageView chat_person_pic ; TextView chat_msg_send_time ; TextView chat_msg_content ; } private void startToViewContactsInfo ( String uid ) { } }

Fix:
holder . chat_msg_send_time . setVisibility ( GONE ) ;