Program: 2991
Project: 2991
Buggy source:
/** 
 * {@inheritDoc} 
 */
@Override public void applyPostLayoutPolicyLw(WindowState win,WindowManager.LayoutParams attrs){
  if (DEBUG_LAYOUT)   Slog.i(TAG,"String_Node_Str" + win + "String_Node_Str"+ win.isVisibleOrBehindKeyguardLw());
  if (mTopFullscreenOpaqueWindowState == null && win.isVisibleOrBehindKeyguardLw() && !win.isGoneForLayoutLw()) {
    if ((attrs.flags & FLAG_FORCE_NOT_FULLSCREEN) != 0) {
      if (attrs.type == TYPE_KEYGUARD) {
        mForceStatusBarFromKeyguard=true;
      }
 else {
        mForceStatusBar=true;
      }
    }
    if (attrs.type == TYPE_KEYGUARD) {
      mShowingLockscreen=true;
    }
    boolean applyWindow=attrs.type >= FIRST_APPLICATION_WINDOW && attrs.type <= LAST_APPLICATION_WINDOW;
    if (attrs.type == TYPE_DREAM) {
      if (!mDreamingLockscreen || (win.isVisibleLw() && win.hasDrawnLw())) {
        mShowingDream=true;
        applyWindow=true;
      }
    }
    if (applyWindow && attrs.x == 0 && attrs.y == 0 && attrs.width == WindowManager.LayoutParams.MATCH_PARENT && attrs.height == WindowManager.LayoutParams.MATCH_PARENT) {
      if (DEBUG_LAYOUT)       Log.v(TAG,"String_Node_Str" + win);
      mTopFullscreenOpaqueWindowState=win;
      if ((attrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0) {
        if (DEBUG_LAYOUT)         Log.v(TAG,"String_Node_Str" + win);
        mHideLockScreen=true;
        mForceStatusBarFromKeyguard=false;
      }
      if ((attrs.flags & FLAG_DISMISS_KEYGUARD) != 0 && mDismissKeyguard == DISMISS_KEYGUARD_NONE) {
        if (DEBUG_LAYOUT)         Log.v(TAG,"String_Node_Str" + win);
        mDismissKeyguard=mWinDismissingKeyguard == win ? DISMISS_KEYGUARD_CONTINUE : DISMISS_KEYGUARD_START;
        mWinDismissingKeyguard=win;
        mForceStatusBarFromKeyguard=false;
      }
      if ((attrs.flags & FLAG_ALLOW_LOCK_WHILE_SCREEN_ON) != 0) {
        mAllowLockscreenWhenOn=true;
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override public void applyPostLayoutPolicyLw(WindowState win,WindowManager.LayoutParams attrs){
  if (DEBUG_LAYOUT)   Slog.i(TAG,"String_Node_Str" + win + "String_Node_Str"+ win.isVisibleOrBehindKeyguardLw());
  if (mTopFullscreenOpaqueWindowState == null && (win.getAttrs().privateFlags & WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_SHOW_NAV_BAR) != 0) {
    if (mForcingShowNavBarLayer < 0) {
      mForcingShowNavBar=true;
      mForcingShowNavBarLayer=win.getSurfaceLayer();
    }
  }
  if (mTopFullscreenOpaqueWindowState == null && win.isVisibleOrBehindKeyguardLw() && !win.isGoneForLayoutLw()) {
    if ((attrs.flags & FLAG_FORCE_NOT_FULLSCREEN) != 0) {
      if (attrs.type == TYPE_KEYGUARD) {
        mForceStatusBarFromKeyguard=true;
      }
 else {
        mForceStatusBar=true;
      }
    }
    if (attrs.type == TYPE_KEYGUARD) {
      mShowingLockscreen=true;
    }
    boolean applyWindow=attrs.type >= FIRST_APPLICATION_WINDOW && attrs.type <= LAST_APPLICATION_WINDOW;
    if (attrs.type == TYPE_DREAM) {
      if (!mDreamingLockscreen || (win.isVisibleLw() && win.hasDrawnLw())) {
        mShowingDream=true;
        applyWindow=true;
      }
    }
    if (applyWindow && attrs.x == 0 && attrs.y == 0 && attrs.width == WindowManager.LayoutParams.MATCH_PARENT && attrs.height == WindowManager.LayoutParams.MATCH_PARENT) {
      if (DEBUG_LAYOUT)       Log.v(TAG,"String_Node_Str" + win);
      mTopFullscreenOpaqueWindowState=win;
      if ((attrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0) {
        if (DEBUG_LAYOUT)         Log.v(TAG,"String_Node_Str" + win);
        mHideLockScreen=true;
        mForceStatusBarFromKeyguard=false;
      }
      if ((attrs.flags & FLAG_DISMISS_KEYGUARD) != 0 && mDismissKeyguard == DISMISS_KEYGUARD_NONE) {
        if (DEBUG_LAYOUT)         Log.v(TAG,"String_Node_Str" + win);
        mDismissKeyguard=mWinDismissingKeyguard == win ? DISMISS_KEYGUARD_CONTINUE : DISMISS_KEYGUARD_START;
        mWinDismissingKeyguard=win;
        mForceStatusBarFromKeyguard=false;
      }
      if ((attrs.flags & FLAG_ALLOW_LOCK_WHILE_SCREEN_ON) != 0) {
        mAllowLockscreenWhenOn=true;
      }
    }
  }
}