Buggy code:
public class SessionViewAdapter extends BaseAdapter implements OnClickListener { private Activity activity ; private ArrayList < Session > sessionList ; private static LayoutInflater inflater = null ; private SessionViewAdapter . SessionViewHolder itemVisible = null ; int i = 0 ; public SessionViewAdapter ( Activity mactivity , ArrayList < Session > data ) { } @ Override public int getCount ( ) { } @ Override public Object getItem ( int position ) { } @ Override public long getItemId ( int position ) { } @ Override public void onClick ( View arg0 ) { } @ Override public View getView ( final int position , View mySessionView , ViewGroup parent ) { final SessionViewAdapter . SessionViewHolder holder ; if ( mySessionView == null ) { mySessionView = SessionViewAdapter . inflater . inflate ( session_child , null ) ; holder = new SessionViewAdapter . SessionViewHolder ( ) ; holder . sessionName = ( ( TextView ) ( mySessionView . findViewById ( sessionName ) ) ) ; holder . falls = ( ( TextView ) ( mySessionView . findViewById ( fallsNumber ) ) ) ; holder . startTime = ( ( TextView ) ( mySessionView . findViewById ( startTime ) ) ) ; holder . endTime = ( ( TextView ) ( mySessionView . findViewById ( endTime ) ) ) ; holder . durationTime = ( ( TextView ) ( mySessionView . findViewById ( durationTime ) ) ) ; holder . expandable = ( ( RelativeLayout ) ( mySessionView . findViewById ( expandableLayout ) ) ) ; holder . playButton = ( ( ImageView ) ( mySessionView . findViewById ( playButton ) ) ) ; holder . pauseButton = ( ( ImageView ) ( mySessionView . findViewById ( pauseButton ) ) ) ; holder . fallIcon = ( ( ImageView ) ( mySessionView . findViewById ( sessionImage ) ) ) ; holder . moreButton = ( ( ImageView ) ( mySessionView . findViewById ( moreButton ) ) ) ; holder . durationText = ( ( TextView ) ( mySessionView . findViewById ( duration ) ) ) ; mySessionView . setTag ( holder ) ; } else holder = ( ( SessionViewAdapter . SessionViewHolder ) ( mySessionView . getTag ( ) ) ) ; final Session ses = ( ( Session ) ( sessionList . get ( position ) ) ) ; Date start = new Date ( ses . getStart ( ) ) ; Date end = new Date ( ses . getEnd ( ) ) ; holder . sessionName . setText ( ses . getName ( ) ) ; holder . falls . setText ( String . valueOf ( ses . getFalls ( ) ) ) ; holder . startTime . setText ( getDate ( start ) ) ; PorterDuffColorFilter colorFilter = new PorterDuffColorFilter ( ses . getImgColor ( ) , Mode . SRC_ATOP ) ; holder . fallIcon . setColorFilter ( colorFilter ) ; holder . fallIcon . setBackgroundColor ( ses . getBgColor ( ) ) ; String duration = "" ; if ( ( ses . getEnd ( ) ) == 0 ) { holder . playButton . setVisibility ( VISIBLE ) ; holder . durationTime . setVisibility ( GONE ) ; holder . durationText . setVisibility ( GONE ) ; holder . endTime . setText ( mContext . getString ( inExecution ) ) ; } else { holder . endTime . setText ( getDate ( end ) ) ; long millis = ( ses . getEnd ( ) ) - ( ses . getStart ( ) ) ; long second = ( millis // 1000 ) % 60 ; long minute = ( millis // ( 1000 * 60 ) ) % 60 ; long hour = ( millis // ( ( 1000 * 60 ) * 60 ) ) % 24 ; duration = String . format ( "%02d:%02d:%02d" , hour , minute , second ) ; } holder . durationTime . setText ( duration ) ; holder . moreButton . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( final View v ) { PopupMenu popup = new PopupMenu ( v . getContext ( ) , holder . moreButton ) ; popup . getMenuInflater ( ) . inflate ( more_menu , popup . getMenu ( ) ) ; popup . setOnMenuItemClickListener ( new PopupMenu . OnMenuItemClickListener ( ) { public boolean onMenuItemClick ( MenuItem item ) { String selected = ( ( String ) ( item . getTitle ( ) ) ) ; DbManager databaseManager = new DbManager ( MainActivity . mContext ) ; if ( selected == ( mContext . getString ( delete ) ) ) { databaseManager . removeSession ( ses . getId ( ) ) ; <START_BUG> listViewValues . remove ( position ) ; <END_BUG> adapter . notifyDataSetChanged ( ) ; } if ( selected == ( mContext . getString ( rename ) ) ) { } if ( selected == ( mContext . getString ( stop ) ) ) { } if ( selected == ( mContext . getString ( details ) ) ) { } return true ; } } ) ; popup . show ( ) ; } } ) ; holder . playButton . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { holder . pauseButton . setVisibility ( VISIBLE ) ; holder . playButton . setVisibility ( GONE ) ; } } ) ; holder . pauseButton . setOnClickListener ( new OnClickListener ( ) { @ Override public void onClick ( View v ) { holder . playButton . setVisibility ( VISIBLE ) ; holder . pauseButton . setVisibility ( GONE ) ; } } ) ; mySessionView . setOnClickListener ( new SessionViewAdapter . OnItemClickListener ( position ) ) ; return mySessionView ; } private class OnItemClickListener implements OnClickListener { private int mPosition ; OnItemClickListener ( int position ) { } @ Override public void onClick ( View myView ) { } }

Fix:
sessionList . remove ( position ) ;