Program: 193413
Project: 193413
Buggy source:
private void addInputWindowHandleLw(final InputWindowHandle inputWindowHandle,final WindowState child,int flags,final int type,final boolean isVisible,final boolean hasFocus,final boolean hasWallpaper,DisplayContent displayContent){
  inputWindowHandle.name=child.toString();
  final boolean modal=(flags & (WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)) == 0;
  if (modal && child.mAppToken != null) {
    flags|=WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL;
    final DimLayer.DimLayerUser dimLayerUser=child.getDimLayerUser();
    if (dimLayerUser != null) {
      dimLayerUser.getBounds(mTmpRect);
    }
 else {
      child.getVisibleBounds(mTmpRect,BOUNDS_FOR_TOUCH);
    }
    inputWindowHandle.touchableRegion.set(mTmpRect);
  }
 else {
    child.getTouchableRegion(inputWindowHandle.touchableRegion);
  }
  inputWindowHandle.layoutParamsFlags=flags;
  inputWindowHandle.layoutParamsType=type;
  inputWindowHandle.dispatchingTimeoutNanos=child.getInputDispatchingTimeoutNanos();
  inputWindowHandle.visible=isVisible;
  inputWindowHandle.canReceiveKeys=child.canReceiveKeys();
  inputWindowHandle.hasFocus=hasFocus;
  inputWindowHandle.hasWallpaper=hasWallpaper;
  inputWindowHandle.paused=child.mAppToken != null ? child.mAppToken.paused : false;
  inputWindowHandle.layer=child.mLayer;
  inputWindowHandle.ownerPid=child.mSession.mPid;
  inputWindowHandle.ownerUid=child.mSession.mUid;
  inputWindowHandle.inputFeatures=child.mAttrs.inputFeatures;
  final Rect frame=child.mFrame;
  inputWindowHandle.frameLeft=frame.left;
  inputWindowHandle.frameTop=frame.top;
  inputWindowHandle.frameRight=frame.right;
  inputWindowHandle.frameBottom=frame.bottom;
  if (child.mAttrs.type == TYPE_DOCK_DIVIDER) {
    int adjustment=displayContent.mDividerControllerLocked.getWidthAdjustment();
    if (inputWindowHandle.frameRight - inputWindowHandle.frameLeft > inputWindowHandle.frameTop - inputWindowHandle.frameBottom) {
      inputWindowHandle.frameTop-=adjustment;
      inputWindowHandle.frameBottom+=adjustment;
    }
 else {
      inputWindowHandle.frameLeft-=adjustment;
      inputWindowHandle.frameRight+=adjustment;
    }
  }
  if (child.mGlobalScale != 1) {
    inputWindowHandle.scaleFactor=1.0f / child.mGlobalScale;
  }
 else {
    inputWindowHandle.scaleFactor=1;
  }
  if (DEBUG_INPUT) {
    Slog.d(WindowManagerService.TAG,"String_Node_Str" + inputWindowHandle);
  }
  addInputWindowHandleLw(inputWindowHandle);
}

Fixed version (ground truth):
private void addInputWindowHandleLw(final InputWindowHandle inputWindowHandle,final WindowState child,int flags,final int type,final boolean isVisible,final boolean hasFocus,final boolean hasWallpaper,DisplayContent displayContent){
  inputWindowHandle.name=child.toString();
  flags=child.getTouchableRegion(inputWindowHandle.touchableRegion,flags,this);
  inputWindowHandle.layoutParamsFlags=flags;
  inputWindowHandle.layoutParamsType=type;
  inputWindowHandle.dispatchingTimeoutNanos=child.getInputDispatchingTimeoutNanos();
  inputWindowHandle.visible=isVisible;
  inputWindowHandle.canReceiveKeys=child.canReceiveKeys();
  inputWindowHandle.hasFocus=hasFocus;
  inputWindowHandle.hasWallpaper=hasWallpaper;
  inputWindowHandle.paused=child.mAppToken != null ? child.mAppToken.paused : false;
  inputWindowHandle.layer=child.mLayer;
  inputWindowHandle.ownerPid=child.mSession.mPid;
  inputWindowHandle.ownerUid=child.mSession.mUid;
  inputWindowHandle.inputFeatures=child.mAttrs.inputFeatures;
  final Rect frame=child.mFrame;
  inputWindowHandle.frameLeft=frame.left;
  inputWindowHandle.frameTop=frame.top;
  inputWindowHandle.frameRight=frame.right;
  inputWindowHandle.frameBottom=frame.bottom;
  if (child.mAttrs.type == TYPE_DOCK_DIVIDER) {
    int adjustment=displayContent.mDividerControllerLocked.getWidthAdjustment();
    if (inputWindowHandle.frameRight - inputWindowHandle.frameLeft > inputWindowHandle.frameTop - inputWindowHandle.frameBottom) {
      inputWindowHandle.frameTop-=adjustment;
      inputWindowHandle.frameBottom+=adjustment;
    }
 else {
      inputWindowHandle.frameLeft-=adjustment;
      inputWindowHandle.frameRight+=adjustment;
    }
  }
  if (child.mGlobalScale != 1) {
    inputWindowHandle.scaleFactor=1.0f / child.mGlobalScale;
  }
 else {
    inputWindowHandle.scaleFactor=1;
  }
  if (DEBUG_INPUT) {
    Slog.d(WindowManagerService.TAG,"String_Node_Str" + inputWindowHandle);
  }
  addInputWindowHandleLw(inputWindowHandle);
}