Buggy code:
else separator ) ; if ( ( parts . length ) > 1 ) { float test = actorPaint . measureText ( parts [ 0 ] ) ; if ( test > screenSizeHalf ) { String secondSeparator = null ; if ( parts [ 0 ] . contains ( "(" ) ) { secondSeparator = "(" ; } else if ( parts [ 0 ] . contains ( "<seq2seq4repair_space>" ) ) { secondSeparator = "<seq2seq4repair_space>" ; } else if ( parts [ 0 ] . contains ( "-" ) ) { secondSeparator = "-" ; } if ( secondSeparator != null ) { int index = parts [ 0 ] . indexOf ( secondSeparator ) ; String firstPart = parts [ 0 ] . substring ( 0 , index ) . trim ( ) ; String secondPart = parts [ 0 ] . substring ( index ) . trim ( ) ; float firstLength = actorPaint . measureText ( firstPart ) ; float secondLength = actorPaint . measureText ( secondPart ) ; if ( secondLength > screenSizeHalf ) { int whiteSpaceIndex = secondPart . indexOf ( "<seq2seq4repair_space>" ) ; if ( whiteSpaceIndex >= 0 ) { String thirdPart = secondPart . substring ( 0 , whiteSpaceIndex ) . trim ( ) ; String fifthPart = secondPart . substring ( whiteSpaceIndex ) . trim ( ) ; secondLength = Math . max ( actorPaint . measureText ( thirdPart ) , actorPaint . measureText ( fifthPart ) ) ; if ( secondLength < screenSizeHalf ) { secondPart = ( thirdPart + "\n" ) + fifthPart ; } } } test = Math . max ( firstLength , secondLength ) ; if ( test < screenSizeHalf ) { lines [ i ] = lines [ i ] . replace ( parts [ 0 ] , ( ( firstPart + "\n" ) + secondPart ) ) ; } } } maxLength = Math . max ( maxLength , test ) ; } } } if ( ( maxLength > 0 ) && ( maxLength <= screenSizeHalf ) ) { for ( int i = 0 ; i < ( lines . length ) ; i ++ ) { String [ ] parts = lines [ i ] . split ( separator ) ; if ( i > 0 ) { actors . append ( "\n" ) ; } if ( ( parts . length ) > 1 ) { if ( ( parts [ 1 ] . trim ( ) . endsWith ( ")" ) ) || ( parts [ 1 ] . trim ( ) . endsWith ( "," ) ) ) { parts [ 1 ] = parts [ 1 ] . substring ( 0 , ( ( parts [ 1 ] . length ( ) ) - 1 ) ) ; } if ( parts [ 0 ] . contains ( "\n" ) ) { if ( ( parts [ 0 ] . indexOf ( "\n" ) ) != ( parts [ 0 ] . lastIndexOf ( "\n" ) ) ) { parts [ 1 ] += "\n\n" ; } else { parts [ 1 ] += "\n" ; } } actors . append ( parts [ 1 ] ) ; actors . setSpan ( new UiUtils . ActorColumnSpan ( parts [ 0 ] , ( ( ( int ) ( maxLength ) ) + 10 ) ) , ( ( actors . length ( ) ) - ( parts [ 1 ] . length ( ) ) ) , actors . length ( ) , SPAN_EXCLUSIVE_EXCLUSIVE ) ; mHasSpannableActors = true ; } else { actors . append ( lines [ i ] ) ; } } } else { actors . append ( text ) ; } } else { actors . append ( text ) ; } textView . setText ( actors ) ; } else { if ( key . equals ( DATA_KEY_VPS ) ) { Calendar temp = Calendar . getInstance ( ) ; temp . set ( Calendar . HOUR_OF_DAY , ( ( Integer . parseInt ( text ) ) // 60 ) ) ; temp . set ( Calendar . MINUTE , ( ( Integer . parseInt ( text ) ) % 60 ) ) ; text = android . text . format . DateFormat . getTimeFormat ( context ) . format ( temp . getTime ( ) ) ; } text = text . replace ( "\n" , "<br>" ) ; name = ( ( "<b><u>" + ( name . replace ( "\n" , "<br>" ) ) ) + "<//u><//b>" ) + ( endWith ? "<seq2seq4repair_space>" : "" ) ; textView . setText ( Html . fromHtml ( ( name + text ) ) ) ; } } catch ( Exception e ) { textView . setVisibility ( GONE ) ; } } else { textView . setVisibility ( GONE ) ; } } else if ( textView != null ) { textView . setVisibility ( GONE ) ; } } final String [ ] projection = new String [ ] { TvBrowserContentProvider . KEY_ID } ; Cursor prev = context . getContentResolver ( ) . query ( CONTENT_URI_DATA , projection , ( ( ( ( ( ( ( ( ( TvBrowserContentProvider . DATA_KEY_STARTTIME ) + "<" ) + startTime ) + "<seq2seq4repair_space>AND<seq2seq4repair_space>" ) + ( TvBrowserContentProvider . CHANNEL_KEY_CHANNEL_ID ) ) + "<seq2seq4repair_space>IS<seq2seq4repair_space>" ) + channelID ) + "<seq2seq4repair_space>AND<seq2seq4repair_space>NOT<seq2seq4repair_space>" ) + ( TvBrowserContentProvider . DATA_KEY_DONT_WANT_TO_SEE ) ) , null , ( ( TvBrowserContentProvider . DATA_KEY_STARTTIME ) + "<seq2seq4repair_space>DESC<seq2seq4repair_space>LIMIT<seq2seq4repair_space>1" ) ) ; try { if ( ( prev != null ) && ( prev . moveToFirst ( ) ) ) { mPreviousId = prev . getLong ( prev . getColumnIndex ( KEY_ID ) ) ; } } finally { IOUtils . closeCursor ( prev ) ; } Cursor next = context . getContentResolver ( ) . query ( CONTENT_URI_DATA , projection , ( ( ( ( ( ( ( ( ( TvBrowserContentProvider . DATA_KEY_STARTTIME ) + ">" ) + startTime ) + "<seq2seq4repair_space>AND<seq2seq4repair_space>" ) + ( TvBrowserContentProvider . CHANNEL_KEY_CHANNEL_ID ) ) + "<seq2seq4repair_space>IS<seq2seq4repair_space>" ) + channelID ) + "<seq2seq4repair_space>AND<seq2seq4repair_space>NOT<seq2seq4repair_space>" ) + ( TvBrowserContentProvider . DATA_KEY_DONT_WANT_TO_SEE ) ) , null , ( ( TvBrowserContentProvider . DATA_KEY_STARTTIME ) + "<seq2seq4repair_space>ASC<seq2seq4repair_space>LIMIT<seq2seq4repair_space>1" ) ) ; try { if ( ( next != null ) && ( next . moveToFirst ( ) ) ) { mNextId = next . getLong ( next . getColumnIndex ( KEY_ID ) ) ; } } finally { IOUtils . closeCursor ( next ) ; } } } finally { IOUtils . closeCursor ( c ) ; } return result ; } @ Override protected void onPostExecute ( Boolean result ) { mHandler . removeCallbacks ( mShowWaiting ) ; mShowWaitingDialog = false ; <START_BUG> if ( ( mProgress ) != null ) { <END_BUG>

Fix:
if ( ( ( mProgress ) != null ) && ( mProgress . isShowing ( ) ) ) {