Buggy code:
public class HSRecordsAdapter extends BaseAdapter { private List < HSRecord > recordList = new ArrayList < > ( ) ; private Context context ; private boolean showSelect = false ; public HSRecordsAdapter ( List < HSRecord > recordList , Context context ) { } @ Override public int getCount ( ) { } @ Override public Object getItem ( int position ) { } @ Override public long getItemId ( int position ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { if ( convertView == null ) { convertView = LayoutInflater . from ( context ) . inflate ( layout_records_item , parent , false ) ; } final HSRecord record = ( ( HSRecord ) ( getItem ( position ) ) ) ; TextView tv_mobile = ( ( TextView ) ( convertView . findViewById ( mobile ) ) ) ; TextView tv_type = ( ( TextView ) ( convertView . findViewById ( type ) ) ) ; TextView tv_time = ( ( TextView ) ( convertView . findViewById ( time ) ) ) ; TextView tv_duration = ( ( TextView ) ( convertView . findViewById ( duration ) ) ) ; SimpleDateFormat sfd = new SimpleDateFormat ( "MM-dd<seq2seq4repair_space>HH:mm:ss" ) ; String time = sfd . format ( record . getDate ( ) ) ; String type = "" ; switch ( record . getType ( ) ) { case HSRecordsUploadHelper . INCOMING_TYPE : type = "接听" ; tv_type . setTextColor ( context . getResources ( ) . getColor ( green ) ) ; tv_mobile . setTextColor ( context . getResources ( ) . getColor ( green ) ) ; tv_time . setTextColor ( context . getResources ( ) . getColor ( green ) ) ; tv_duration . setTextColor ( context . getResources ( ) . getColor ( green ) ) ; break ; case HSRecordsUploadHelper . MISSED_TYPE : type = "未接" ; tv_type . setTextColor ( context . getResources ( ) . getColor ( red ) ) ; tv_mobile . setTextColor ( context . getResources ( ) . getColor ( red ) ) ; tv_time . setTextColor ( context . getResources ( ) . getColor ( red ) ) ; tv_duration . setTextColor ( context . getResources ( ) . getColor ( red ) ) ; break ; case HSRecordsUploadHelper . OUTGOING_TYPE : type = "打出" ; tv_type . setTextColor ( context . getResources ( ) . getColor ( blue ) ) ; tv_mobile . setTextColor ( context . getResources ( ) . getColor ( blue ) ) ; tv_time . setTextColor ( context . getResources ( ) . getColor ( blue ) ) ; tv_duration . setTextColor ( context . getResources ( ) . getColor ( blue ) ) ; break ; } tv_mobile . setText ( ( ( record . getNumber ( ) ) + "" ) ) ; tv_time . setText ( time ) ; tv_type . setText ( type ) ; tv_duration . setText ( ( ( ( record . getType ( ) ) == 3 ? "0" : String . valueOf ( record . getDuration ( ) ) ) + "秒" ) ) ; ImageView play_record = ( ( ImageView ) ( convertView . findViewById ( play_record ) ) ) ; <START_BUG> if ( ! ( TextUtils . isEmpty ( record . getFile_path ( ) ) ) ) { <END_BUG> play_record . setVisibility ( VISIBLE ) ; final boolean isPlay = record . isPlay_state ( ) ; if ( isPlay ) { play_record . setImageResource ( icon_pause ) ; } else { play_record . setImageResource ( icon_play ) ; } play_record . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { boolean isPlaying = record . isPlay_state ( ) ; if ( isPlaying ) { HSRecordHelper . stopPlay ( ) ; ( ( ImageView ) ( v ) ) . setImageResource ( icon_play ) ; record . setPlay_state ( false ) ; } else { if ( HSRecordHelper . isPlaying ) return ; HSRecordHelper . play ( record . getFile_path ( ) ) ; ( ( ImageView ) ( v ) ) . setImageResource ( icon_pause ) ; record . setPlay_state ( true ) ; } } } ) ; } else { play_record . setVisibility ( GONE ) ; } final TextView reupload = ( ( TextView ) ( convertView . findViewById ( reupload ) ) ) ; if ( TextUtils . isEmpty ( record . getReupload_id ( ) ) ) { reupload . setVisibility ( GONE ) ; } else { reupload . setVisibility ( VISIBLE ) ; reupload . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { List < HSRecord > records = new ArrayList < HSRecord > ( ) ; records . add ( record ) ; reupload . setText ( "正在重传..." ) ; HSApiHelper . requestReleaseRecord ( records , context , new HSApiHelper . CallBack ( ) { @ Override public void onSuccess ( JSONObject response ) { int status = response . optInt ( "status" ) ; if ( status == 201 ) { reupload . setText ( "重传" ) ; } else { reupload . setVisibility ( GONE ) ; } } @ Override public void onFailure ( ) { } } ) ; } } ) ; } final ImageView select = ( ( ImageView ) ( convertView . findViewById ( select ) ) ) ; if ( showSelect ) { select . setBackgroundResource ( ( record . select ? drawable . btn_selected : drawable . btn_unselect ) ) ; select . setVisibility ( VISIBLE ) ; select . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { if ( record . select ) { record . select = false ; select . setBackgroundResource ( btn_unselect ) ; }

Fix:
if ( ( ! ( TextUtils . isEmpty ( record . getFile_path ( ) ) ) ) && ( ( ( record . getType ( ) ) != 3 ) && ( ( record . getDuration ( ) ) != 0 ) ) ) {