Program: 193679
Project: 193679
Buggy source:
/** 
 * Refresh or remove lockscreen artwork from media metadata.
 */
public void updateMediaMetaData(boolean metaDataChanged){
  if (!SHOW_LOCKSCREEN_MEDIA_ARTWORK)   return;
  if (mBackdrop == null)   return;
  if (mLaunchTransitionFadingAway) {
    mBackdrop.setVisibility(View.INVISIBLE);
    return;
  }
  if (DEBUG_MEDIA) {
    Log.v(TAG,"String_Node_Str" + mMediaNotificationKey + "String_Node_Str"+ mMediaMetadata+ "String_Node_Str"+ metaDataChanged+ "String_Node_Str"+ mState);
  }
  Bitmap artworkBitmap=null;
  if (mMediaMetadata != null) {
    artworkBitmap=mMediaMetadata.getBitmap(MediaMetadata.METADATA_KEY_ART);
    if (artworkBitmap == null) {
      artworkBitmap=mMediaMetadata.getBitmap(MediaMetadata.METADATA_KEY_ALBUM_ART);
    }
  }
  final boolean hasArtwork=artworkBitmap != null;
  if ((hasArtwork || DEBUG_MEDIA_FAKE_ARTWORK) && (mState == StatusBarState.KEYGUARD || mState == StatusBarState.SHADE_LOCKED)) {
    if (mBackdrop.getVisibility() != View.VISIBLE) {
      mBackdrop.setVisibility(View.VISIBLE);
      mBackdrop.animate().alpha(1f);
      metaDataChanged=true;
      if (DEBUG_MEDIA) {
        Log.v(TAG,"String_Node_Str");
      }
    }
    if (metaDataChanged) {
      if (mBackdropBack.getDrawable() != null) {
        Drawable drawable=mBackdropBack.getDrawable().getConstantState().newDrawable().mutate();
        mBackdropFront.setImageDrawable(drawable);
        if (mScrimSrcModeEnabled) {
          mBackdropFront.getDrawable().mutate().setXfermode(mSrcOverXferMode);
        }
        mBackdropFront.setAlpha(1f);
        mBackdropFront.setVisibility(View.VISIBLE);
      }
 else {
        mBackdropFront.setVisibility(View.INVISIBLE);
      }
      if (DEBUG_MEDIA_FAKE_ARTWORK) {
        final int c=0xFF000000 | (int)(Math.random() * 0xFFFFFF);
        Log.v(TAG,String.format("String_Node_Str",c));
        mBackdropBack.setBackgroundColor(0xFFFFFFFF);
        mBackdropBack.setImageDrawable(new ColorDrawable(c));
      }
 else {
        mBackdropBack.setImageBitmap(artworkBitmap);
      }
      if (mScrimSrcModeEnabled) {
        mBackdropBack.getDrawable().mutate().setXfermode(mSrcXferMode);
      }
      if (mBackdropFront.getVisibility() == View.VISIBLE) {
        if (DEBUG_MEDIA) {
          Log.v(TAG,"String_Node_Str" + mBackdropFront.getDrawable() + "String_Node_Str"+ mBackdropBack.getDrawable());
        }
        mBackdropFront.animate().setDuration(250).alpha(0f).withEndAction(mHideBackdropFront);
      }
    }
  }
 else {
    if (mBackdrop.getVisibility() != View.GONE) {
      if (DEBUG_MEDIA) {
        Log.v(TAG,"String_Node_Str");
      }
      mBackdrop.animate().alpha(0.002f).setInterpolator(mBackdropInterpolator).setDuration(300).setStartDelay(0).withEndAction(new Runnable(){
        @Override public void run(){
          mBackdrop.setVisibility(View.GONE);
          mBackdropFront.animate().cancel();
          mBackdropBack.animate().cancel();
          mHandler.post(mHideBackdropFront);
        }
      }
);
      if (mKeyguardFadingAway) {
        mBackdrop.animate().setDuration(mKeyguardFadingAwayDuration / 2).setStartDelay(mKeyguardFadingAwayDelay).setInterpolator(mLinearInterpolator).start();
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Refresh or remove lockscreen artwork from media metadata.
 */
public void updateMediaMetaData(boolean metaDataChanged){
  if (!SHOW_LOCKSCREEN_MEDIA_ARTWORK)   return;
  if (mBackdrop == null)   return;
  if (mLaunchTransitionFadingAway) {
    mBackdrop.setVisibility(View.INVISIBLE);
    return;
  }
  if (DEBUG_MEDIA) {
    Log.v(TAG,"String_Node_Str" + mMediaNotificationKey + "String_Node_Str"+ mMediaMetadata+ "String_Node_Str"+ metaDataChanged+ "String_Node_Str"+ mState);
  }
  Bitmap artworkBitmap=null;
  if (mMediaMetadata != null) {
    artworkBitmap=mMediaMetadata.getBitmap(MediaMetadata.METADATA_KEY_ART);
    if (artworkBitmap == null) {
      artworkBitmap=mMediaMetadata.getBitmap(MediaMetadata.METADATA_KEY_ALBUM_ART);
    }
  }
  final boolean hasArtwork=artworkBitmap != null;
  if ((hasArtwork || DEBUG_MEDIA_FAKE_ARTWORK) && (mState == StatusBarState.KEYGUARD || mState == StatusBarState.SHADE_LOCKED) && mFingerprintUnlockController.getMode() != FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING) {
    if (mBackdrop.getVisibility() != View.VISIBLE) {
      mBackdrop.setVisibility(View.VISIBLE);
      mBackdrop.animate().alpha(1f);
      metaDataChanged=true;
      if (DEBUG_MEDIA) {
        Log.v(TAG,"String_Node_Str");
      }
    }
    if (metaDataChanged) {
      if (mBackdropBack.getDrawable() != null) {
        Drawable drawable=mBackdropBack.getDrawable().getConstantState().newDrawable().mutate();
        mBackdropFront.setImageDrawable(drawable);
        if (mScrimSrcModeEnabled) {
          mBackdropFront.getDrawable().mutate().setXfermode(mSrcOverXferMode);
        }
        mBackdropFront.setAlpha(1f);
        mBackdropFront.setVisibility(View.VISIBLE);
      }
 else {
        mBackdropFront.setVisibility(View.INVISIBLE);
      }
      if (DEBUG_MEDIA_FAKE_ARTWORK) {
        final int c=0xFF000000 | (int)(Math.random() * 0xFFFFFF);
        Log.v(TAG,String.format("String_Node_Str",c));
        mBackdropBack.setBackgroundColor(0xFFFFFFFF);
        mBackdropBack.setImageDrawable(new ColorDrawable(c));
      }
 else {
        mBackdropBack.setImageBitmap(artworkBitmap);
      }
      if (mScrimSrcModeEnabled) {
        mBackdropBack.getDrawable().mutate().setXfermode(mSrcXferMode);
      }
      if (mBackdropFront.getVisibility() == View.VISIBLE) {
        if (DEBUG_MEDIA) {
          Log.v(TAG,"String_Node_Str" + mBackdropFront.getDrawable() + "String_Node_Str"+ mBackdropBack.getDrawable());
        }
        mBackdropFront.animate().setDuration(250).alpha(0f).withEndAction(mHideBackdropFront);
      }
    }
  }
 else {
    if (mBackdrop.getVisibility() != View.GONE) {
      if (DEBUG_MEDIA) {
        Log.v(TAG,"String_Node_Str");
      }
      if (mFingerprintUnlockController.getMode() == FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING) {
        mBackdrop.setVisibility(View.GONE);
      }
 else {
        mBackdrop.animate().alpha(0.002f).setInterpolator(mBackdropInterpolator).setDuration(300).setStartDelay(0).withEndAction(new Runnable(){
          @Override public void run(){
            mBackdrop.setVisibility(View.GONE);
            mBackdropFront.animate().cancel();
            mBackdropBack.animate().cancel();
            mHandler.post(mHideBackdropFront);
          }
        }
);
        if (mKeyguardFadingAway) {
          mBackdrop.animate().setDuration(mKeyguardFadingAwayDuration / 2).setStartDelay(mKeyguardFadingAwayDelay).setInterpolator(mLinearInterpolator).start();
        }
      }
    }
  }
}