Buggy code:
public class SongView extends UpdateView implements Checkable { private static final String TAG = SongView . class . getSimpleName ( ) ; private Entry song ; private CheckedTextView checkedTextView ; private TextView titleTextView ; private TextView artistTextView ; private TextView durationTextView ; private TextView statusTextView ; private ImageView statusImageView ; private ImageView bookmarkButton ; private View bottomRowView ; private DownloadService downloadService ; private long revision = - 1 ; private DownloadFile downloadFile ; private boolean dontChangeDownloadFile = false ; private boolean playing = false ; private boolean rightImage = false ; private int moreImage = 0 ; private boolean isWorkDone = false ; private boolean isSaved = false ; private File partialFile ; private boolean partialFileExists = false ; private boolean loaded = false ; private boolean isBookmarked = false ; private boolean bookmarked = false ; public SongView ( Context context ) { } public void setObjectImpl ( Object obj1 , Object obj2 ) { } public void setDownloadFile ( DownloadFile downloadFile ) { } public DownloadFile getDownloadFile ( ) { } @ Override protected void updateBackground ( ) { } @ Override protected void update ( ) { if ( loaded ) { setObjectImpl ( song , ( ( checkedTextView . getVisibility ( ) ) == ( View . VISIBLE ) ) ) ; } <START_BUG> if ( ( downloadService ) == null ) { <END_BUG> return ; } if ( song . isStarred ( ) ) { if ( ! ( starred ) ) { starButton . setVisibility ( VISIBLE ) ; starred = true ; } } else { if ( starred ) { starButton . setVisibility ( GONE ) ; starred = false ; } } if ( isWorkDone ) { int moreImage = ( isSaved ) ? drawable . download_pinned : drawable . download_cached ; if ( moreImage != ( this . moreImage ) ) { moreButton . setImageResource ( moreImage ) ; this . moreImage = moreImage ; } } else if ( ( this . moreImage ) != ( drawable . download_none_light ) ) { int [ ] attrs = new int [ ] { attr . download_none } ; TypedArray typedArray = context . obtainStyledAttributes ( attrs ) ; moreButton . setImageResource ( typedArray . getResourceId ( 0 , 0 ) ) ; typedArray . recycle ( ) ; this . moreImage = drawable . download_none_light ; } if ( ( ( downloadFile . isDownloading ( ) ) && ( ! ( downloadFile . isDownloadCancelled ( ) ) ) ) && ( partialFileExists ) ) { statusTextView . setText ( Util . formatLocalizedBytes ( partialFile . length ( ) , getContext ( ) ) ) ; if ( ! ( rightImage ) ) { statusImageView . setVisibility ( VISIBLE ) ; rightImage = true ; } } else if ( rightImage ) { statusTextView . setText ( null ) ; statusImageView . setVisibility ( GONE ) ; rightImage = false ; } boolean playing = ( downloadService . getCurrentPlaying ( ) ) == ( downloadFile ) ; if ( playing ) { if ( ! ( this . playing ) ) { this . playing = playing ; int [ ] attrs = new int [ ] { attr . media_button_start } ; TypedArray typedArray = context . obtainStyledAttributes ( attrs ) ; titleTextView . setCompoundDrawablesWithIntrinsicBounds ( typedArray . getResourceId ( 0 , 0 ) , 0 , 0 , 0 ) ; } } else { if ( this . playing ) { this . playing = playing ; titleTextView . setCompoundDrawablesWithIntrinsicBounds ( 0 , 0 , 0 , 0 ) ; } } if ( isBookmarked ) { if ( ! ( bookmarked ) ) { bookmarkButton . setVisibility ( VISIBLE ) ; bookmarked = true ; } } else { if ( bookmarked ) { bookmarkButton . setVisibility ( GONE ) ; bookmarked = false ; } } if ( ( isRated ) != ( rating ) ) { if ( ( isRated ) > 1 ) { if ( ( rating ) <= 1 ) { ratingBar . setVisibility ( VISIBLE ) ; } ratingBar . setNumStars ( isRated ) ; ratingBar . setRating ( isRated ) ; } else if ( ( isRated ) <= 1 ) { if ( ( rating ) > 1 ) { ratingBar . setVisibility ( GONE ) ; } } if ( ( isRated ) == 1 ) { this . setBackgroundColor ( RED ) ; this . getBackground ( ) . setAlpha ( 20 ) ; } else if ( ( rating ) == 1 ) { this . setBackgroundColor ( 0 ) ; } rating = isRated ; } } @ Override public void setChecked ( boolean b ) { } @ Override public boolean isChecked ( ) { } @ Override public void toggle ( ) { } public Entry getEntry ( ) { } }

Fix:
if ( ( ( downloadService ) == null ) || ( ( downloadFile ) == null ) ) {