nus-yam/ex-repair huggingface dataset:
Program: 195676
Project: 195676
Buggy source:
/** 
 * Create an ActivityOptions specifying an animation where the new activity window and a thumbnail is aspect-scaled to a new location.
 * @param source The View that this thumbnail is animating to.  Thisdefines the coordinate space for <var>startX</var> and <var>startY</var>.
 * @param thumbnail The bitmap that will be shown as the final thumbnailof the animation.
 * @param startX The x end location of the bitmap, relative to <var>source</var>.
 * @param startY The y end location of the bitmap, relative to <var>source</var>.
 * @param listener Optional OnAnimationStartedListener to find out when therequested animation has started running.  If for some reason the animation is not executed, the callback will happen immediately.
 * @return Returns a new ActivityOptions object that you can use tosupply these options as the options Bundle when starting an activity.
 * @hide
 */
public static ActivityOptions makeThumbnailAspectScaleDownAnimation(View source,Bitmap thumbnail,int startX,int startY,int targetWidth,int targetHeight,OnAnimationStartedListener listener){
  return makeAspectScaledThumbnailAnimation(source,thumbnail,startX,startY,targetWidth,targetHeight,listener,false);
}

Fixed version (ground truth):
/** 
 * Create an ActivityOptions specifying an animation where the new activity window and a thumbnail is aspect-scaled to a new location.
 * @param source The View that this thumbnail is animating to.  Thisdefines the coordinate space for <var>startX</var> and <var>startY</var>.
 * @param thumbnail The bitmap that will be shown as the final thumbnailof the animation.
 * @param startX The x end location of the bitmap, relative to <var>source</var>.
 * @param startY The y end location of the bitmap, relative to <var>source</var>.
 * @param handler If <var>listener</var> is non-null this must be a validHandler on which to dispatch the callback; otherwise it should be null.
 * @param listener Optional OnAnimationStartedListener to find out when therequested animation has started running.  If for some reason the animation is not executed, the callback will happen immediately.
 * @return Returns a new ActivityOptions object that you can use tosupply these options as the options Bundle when starting an activity.
 * @hide
 */
public static ActivityOptions makeThumbnailAspectScaleDownAnimation(View source,Bitmap thumbnail,int startX,int startY,int targetWidth,int targetHeight,Handler handler,OnAnimationStartedListener listener){
  return makeAspectScaledThumbnailAnimation(source,thumbnail,startX,startY,targetWidth,targetHeight,handler,listener,false);
}
Program: 195677
Project: 195677
Buggy source:
private static ActivityOptions makeAspectScaledThumbnailAnimation(View source,Bitmap thumbnail,int startX,int startY,int targetWidth,int targetHeight,OnAnimationStartedListener listener,boolean scaleUp){
  ActivityOptions opts=new ActivityOptions();
  opts.mPackageName=source.getContext().getPackageName();
  opts.mAnimationType=scaleUp ? ANIM_THUMBNAIL_ASPECT_SCALE_UP : ANIM_THUMBNAIL_ASPECT_SCALE_DOWN;
  opts.mThumbnail=thumbnail;
  int[] pts=new int[2];
  source.getLocationOnScreen(pts);
  opts.mStartX=pts[0] + startX;
  opts.mStartY=pts[1] + startY;
  opts.mWidth=targetWidth;
  opts.mHeight=targetHeight;
  opts.setOnAnimationStartedListener(source.getHandler(),listener);
  return opts;
}

Fixed version (ground truth):
private static ActivityOptions makeAspectScaledThumbnailAnimation(View source,Bitmap thumbnail,int startX,int startY,int targetWidth,int targetHeight,Handler handler,OnAnimationStartedListener listener,boolean scaleUp){
  ActivityOptions opts=new ActivityOptions();
  opts.mPackageName=source.getContext().getPackageName();
  opts.mAnimationType=scaleUp ? ANIM_THUMBNAIL_ASPECT_SCALE_UP : ANIM_THUMBNAIL_ASPECT_SCALE_DOWN;
  opts.mThumbnail=thumbnail;
  int[] pts=new int[2];
  source.getLocationOnScreen(pts);
  opts.mStartX=pts[0] + startX;
  opts.mStartY=pts[1] + startY;
  opts.mWidth=targetWidth;
  opts.mHeight=targetHeight;
  opts.setOnAnimationStartedListener(handler,listener);
  return opts;
}
Program: 195678
Project: 195678
Buggy source:
/** 
 * Creates the activity options for an app->recents transition.
 */
ActivityOptions getThumbnailTransitionActivityOptions(ActivityManager.RunningTaskInfo topTask,TaskStack stack,TaskStackView stackView){
  Task toTask=new Task();
  TaskViewTransform toTransform=getThumbnailTransitionTransform(stack,stackView,topTask.id,toTask);
  if (toTransform != null && toTask.key != null) {
    Rect toTaskRect=toTransform.rect;
    int toHeaderWidth=(int)(mHeaderBar.getMeasuredWidth() * toTransform.scale);
    int toHeaderHeight=(int)(mHeaderBar.getMeasuredHeight() * toTransform.scale);
    Bitmap thumbnail=Bitmap.createBitmap(toHeaderWidth,toHeaderHeight,Bitmap.Config.ARGB_8888);
    if (Constants.DebugFlags.App.EnableTransitionThumbnailDebugMode) {
      thumbnail.eraseColor(0xFFff0000);
    }
 else {
      Canvas c=new Canvas(thumbnail);
      c.scale(toTransform.scale,toTransform.scale);
      mHeaderBar.rebindToTask(toTask);
      mHeaderBar.draw(c);
      c.setBitmap(null);
    }
    mStartAnimationTriggered=false;
    return ActivityOptions.makeThumbnailAspectScaleDownAnimation(mDummyStackView,thumbnail,toTaskRect.left,toTaskRect.top,toTaskRect.width(),toTaskRect.height(),this);
  }
  return getUnknownTransitionActivityOptions();
}

Fixed version (ground truth):
/** 
 * Creates the activity options for an app->recents transition.
 */
ActivityOptions getThumbnailTransitionActivityOptions(ActivityManager.RunningTaskInfo topTask,TaskStack stack,TaskStackView stackView){
  Task toTask=new Task();
  TaskViewTransform toTransform=getThumbnailTransitionTransform(stack,stackView,topTask.id,toTask);
  if (toTransform != null && toTask.key != null) {
    Rect toTaskRect=toTransform.rect;
    int toHeaderWidth=(int)(mHeaderBar.getMeasuredWidth() * toTransform.scale);
    int toHeaderHeight=(int)(mHeaderBar.getMeasuredHeight() * toTransform.scale);
    Bitmap thumbnail=Bitmap.createBitmap(toHeaderWidth,toHeaderHeight,Bitmap.Config.ARGB_8888);
    if (Constants.DebugFlags.App.EnableTransitionThumbnailDebugMode) {
      thumbnail.eraseColor(0xFFff0000);
    }
 else {
      Canvas c=new Canvas(thumbnail);
      c.scale(toTransform.scale,toTransform.scale);
      mHeaderBar.rebindToTask(toTask);
      mHeaderBar.draw(c);
      c.setBitmap(null);
    }
    mStartAnimationTriggered=false;
    return ActivityOptions.makeThumbnailAspectScaleDownAnimation(mDummyStackView,thumbnail,toTaskRect.left,toTaskRect.top,toTaskRect.width(),toTaskRect.height(),mHandler,this);
  }
  return getUnknownTransitionActivityOptions();
}
Program: 195680
Project: 195680
Buggy source:
/** 
 * Create an ActivityOptions specifying an animation where the new activity window and a thumbnail is aspect-scaled to a new location.
 * @param source The View that this thumbnail is animating from.  Thisdefines the coordinate space for <var>startX</var> and <var>startY</var>.
 * @param thumbnail The bitmap that will be shown as the initial thumbnailof the animation.
 * @param startX The x starting location of the bitmap, relative to <var>source</var>.
 * @param startY The y starting location of the bitmap, relative to <var>source</var>.
 * @param listener Optional OnAnimationStartedListener to find out when therequested animation has started running.  If for some reason the animation is not executed, the callback will happen immediately.
 * @return Returns a new ActivityOptions object that you can use tosupply these options as the options Bundle when starting an activity.
 * @hide
 */
public static ActivityOptions makeThumbnailAspectScaleUpAnimation(View source,Bitmap thumbnail,int startX,int startY,int targetWidth,int targetHeight,OnAnimationStartedListener listener){
  return makeAspectScaledThumbnailAnimation(source,thumbnail,startX,startY,targetWidth,targetHeight,listener,true);
}

Fixed version (ground truth):
/** 
 * Create an ActivityOptions specifying an animation where the new activity window and a thumbnail is aspect-scaled to a new location.
 * @param source The View that this thumbnail is animating from.  Thisdefines the coordinate space for <var>startX</var> and <var>startY</var>.
 * @param thumbnail The bitmap that will be shown as the initial thumbnailof the animation.
 * @param startX The x starting location of the bitmap, relative to <var>source</var>.
 * @param startY The y starting location of the bitmap, relative to <var>source</var>.
 * @param handler If <var>listener</var> is non-null this must be a validHandler on which to dispatch the callback; otherwise it should be null.
 * @param listener Optional OnAnimationStartedListener to find out when therequested animation has started running.  If for some reason the animation is not executed, the callback will happen immediately.
 * @return Returns a new ActivityOptions object that you can use tosupply these options as the options Bundle when starting an activity.
 * @hide
 */
public static ActivityOptions makeThumbnailAspectScaleUpAnimation(View source,Bitmap thumbnail,int startX,int startY,int targetWidth,int targetHeight,Handler handler,OnAnimationStartedListener listener){
  return makeAspectScaledThumbnailAnimation(source,thumbnail,startX,startY,targetWidth,targetHeight,handler,listener,true);
}
Program: 195681
Project: 195681
Buggy source:
/** 
 * Create an ActivityOptions specifying an animation where the new activity window and a thumbnail is aspect-scaled to a new location.
 * @param source The View that this thumbnail is animating to.  Thisdefines the coordinate space for <var>startX</var> and <var>startY</var>.
 * @param thumbnail The bitmap that will be shown as the final thumbnailof the animation.
 * @param startX The x end location of the bitmap, relative to <var>source</var>.
 * @param startY The y end location of the bitmap, relative to <var>source</var>.
 * @param listener Optional OnAnimationStartedListener to find out when therequested animation has started running.  If for some reason the animation is not executed, the callback will happen immediately.
 * @return Returns a new ActivityOptions object that you can use tosupply these options as the options Bundle when starting an activity.
 * @hide
 */
public static ActivityOptions makeThumbnailAspectScaleDownAnimation(View source,Bitmap thumbnail,int startX,int startY,int targetWidth,int targetHeight,OnAnimationStartedListener listener){
  return makeAspectScaledThumbnailAnimation(source,thumbnail,startX,startY,targetWidth,targetHeight,listener,false);
}

Fixed version (ground truth):
/** 
 * Create an ActivityOptions specifying an animation where the new activity window and a thumbnail is aspect-scaled to a new location.
 * @param source The View that this thumbnail is animating to.  Thisdefines the coordinate space for <var>startX</var> and <var>startY</var>.
 * @param thumbnail The bitmap that will be shown as the final thumbnailof the animation.
 * @param startX The x end location of the bitmap, relative to <var>source</var>.
 * @param startY The y end location of the bitmap, relative to <var>source</var>.
 * @param handler If <var>listener</var> is non-null this must be a validHandler on which to dispatch the callback; otherwise it should be null.
 * @param listener Optional OnAnimationStartedListener to find out when therequested animation has started running.  If for some reason the animation is not executed, the callback will happen immediately.
 * @return Returns a new ActivityOptions object that you can use tosupply these options as the options Bundle when starting an activity.
 * @hide
 */
public static ActivityOptions makeThumbnailAspectScaleDownAnimation(View source,Bitmap thumbnail,int startX,int startY,int targetWidth,int targetHeight,Handler handler,OnAnimationStartedListener listener){
  return makeAspectScaledThumbnailAnimation(source,thumbnail,startX,startY,targetWidth,targetHeight,handler,listener,false);
}
Program: 195682
Project: 195682
Buggy source:
private static ActivityOptions makeAspectScaledThumbnailAnimation(View source,Bitmap thumbnail,int startX,int startY,int targetWidth,int targetHeight,OnAnimationStartedListener listener,boolean scaleUp){
  ActivityOptions opts=new ActivityOptions();
  opts.mPackageName=source.getContext().getPackageName();
  opts.mAnimationType=scaleUp ? ANIM_THUMBNAIL_ASPECT_SCALE_UP : ANIM_THUMBNAIL_ASPECT_SCALE_DOWN;
  opts.mThumbnail=thumbnail;
  int[] pts=new int[2];
  source.getLocationOnScreen(pts);
  opts.mStartX=pts[0] + startX;
  opts.mStartY=pts[1] + startY;
  opts.mWidth=targetWidth;
  opts.mHeight=targetHeight;
  opts.setOnAnimationStartedListener(source.getHandler(),listener);
  return opts;
}

Fixed version (ground truth):
private static ActivityOptions makeAspectScaledThumbnailAnimation(View source,Bitmap thumbnail,int startX,int startY,int targetWidth,int targetHeight,Handler handler,OnAnimationStartedListener listener,boolean scaleUp){
  ActivityOptions opts=new ActivityOptions();
  opts.mPackageName=source.getContext().getPackageName();
  opts.mAnimationType=scaleUp ? ANIM_THUMBNAIL_ASPECT_SCALE_UP : ANIM_THUMBNAIL_ASPECT_SCALE_DOWN;
  opts.mThumbnail=thumbnail;
  int[] pts=new int[2];
  source.getLocationOnScreen(pts);
  opts.mStartX=pts[0] + startX;
  opts.mStartY=pts[1] + startY;
  opts.mWidth=targetWidth;
  opts.mHeight=targetHeight;
  opts.setOnAnimationStartedListener(handler,listener);
  return opts;
}
Program: 195683
Project: 195683
Buggy source:
/** 
 * Creates the activity options for an app->recents transition.
 */
ActivityOptions getThumbnailTransitionActivityOptions(ActivityManager.RunningTaskInfo topTask,TaskStack stack,TaskStackView stackView){
  Task toTask=new Task();
  TaskViewTransform toTransform=getThumbnailTransitionTransform(stack,stackView,topTask.id,toTask);
  if (toTransform != null && toTask.key != null) {
    Rect toTaskRect=toTransform.rect;
    int toHeaderWidth=(int)(mHeaderBar.getMeasuredWidth() * toTransform.scale);
    int toHeaderHeight=(int)(mHeaderBar.getMeasuredHeight() * toTransform.scale);
    Bitmap thumbnail=Bitmap.createBitmap(toHeaderWidth,toHeaderHeight,Bitmap.Config.ARGB_8888);
    if (Constants.DebugFlags.App.EnableTransitionThumbnailDebugMode) {
      thumbnail.eraseColor(0xFFff0000);
    }
 else {
      Canvas c=new Canvas(thumbnail);
      c.scale(toTransform.scale,toTransform.scale);
      mHeaderBar.rebindToTask(toTask);
      mHeaderBar.draw(c);
      c.setBitmap(null);
    }
    mStartAnimationTriggered=false;
    return ActivityOptions.makeThumbnailAspectScaleDownAnimation(mDummyStackView,thumbnail,toTaskRect.left,toTaskRect.top,toTaskRect.width(),toTaskRect.height(),this);
  }
  return getUnknownTransitionActivityOptions();
}

Fixed version (ground truth):
/** 
 * Creates the activity options for an app->recents transition.
 */
ActivityOptions getThumbnailTransitionActivityOptions(ActivityManager.RunningTaskInfo topTask,TaskStack stack,TaskStackView stackView){
  Task toTask=new Task();
  TaskViewTransform toTransform=getThumbnailTransitionTransform(stack,stackView,topTask.id,toTask);
  if (toTransform != null && toTask.key != null) {
    Rect toTaskRect=toTransform.rect;
    int toHeaderWidth=(int)(mHeaderBar.getMeasuredWidth() * toTransform.scale);
    int toHeaderHeight=(int)(mHeaderBar.getMeasuredHeight() * toTransform.scale);
    Bitmap thumbnail=Bitmap.createBitmap(toHeaderWidth,toHeaderHeight,Bitmap.Config.ARGB_8888);
    if (Constants.DebugFlags.App.EnableTransitionThumbnailDebugMode) {
      thumbnail.eraseColor(0xFFff0000);
    }
 else {
      Canvas c=new Canvas(thumbnail);
      c.scale(toTransform.scale,toTransform.scale);
      mHeaderBar.rebindToTask(toTask);
      mHeaderBar.draw(c);
      c.setBitmap(null);
    }
    mStartAnimationTriggered=false;
    return ActivityOptions.makeThumbnailAspectScaleDownAnimation(mDummyStackView,thumbnail,toTaskRect.left,toTaskRect.top,toTaskRect.width(),toTaskRect.height(),mHandler,this);
  }
  return getUnknownTransitionActivityOptions();
}
Program: 195686
Project: 195686
Buggy source:
/** 
 * <p>Enables or disables the duplication of the parent's state into this view. When duplication is enabled, this view gets its drawable state from its parent rather than from its own internal properties.</p> <p>Note: in the current implementation, setting this property to true after the view was added to a ViewGroup might have no effect at all. This property should always be used from XML or set to true before adding this view to a ViewGroup.</p> <p>Note: if this view's parent addStateFromChildren property is enabled and this property is enabled, an exception will be thrown.</p> <p>Note: if the child view uses and updates additionnal states which are unknown to the parent, these states should not be affected by this method.</p>
 * @param enabled True to enable duplication of the parent's drawable state, falseto disable it.
 * @see #getDrawableState()
 * @see #isDuplicateParentStateEnabled()
 */
public void setDuplicateParentStateEnabled(boolean enabled){
  setFlags(enabled ? DUPLICATE_PARENT_STATE : 0,DUPLICATE_PARENT_STATE);
}

Fixed version (ground truth):
/** 
 * <p>Enables or disables the duplication of the parent's state into this view. When duplication is enabled, this view gets its drawable state from its parent rather than from its own internal properties.</p> <p>Note: in the current implementation, setting this property to true after the view was added to a ViewGroup might have no effect at all. This property should always be used from XML or set to true before adding this view to a ViewGroup.</p> <p>Note: if this view's parent addStateFromChildren property is enabled and this property is enabled, an exception will be thrown.</p> <p>Note: if the child view uses and updates additional states which are unknown to the parent, these states should not be affected by this method.</p>
 * @param enabled True to enable duplication of the parent's drawable state, falseto disable it.
 * @see #getDrawableState()
 * @see #isDuplicateParentStateEnabled()
 */
public void setDuplicateParentStateEnabled(boolean enabled){
  setFlags(enabled ? DUPLICATE_PARENT_STATE : 0,DUPLICATE_PARENT_STATE);
}
Program: 195687
Project: 195687
Buggy source:
/** 
 * Call this to try to give focus to a specific view or to one of its descendants. This is a special variant of   {@link #requestFocus() } that will allow views that are not focuable intouch mode to request focus when they are touched.
 * @return Whether this view or one of its descendants actually took focus.
 * @see #isInTouchMode()
 */
public final boolean requestFocusFromTouch(){
  if (isInTouchMode()) {
    ViewRootImpl viewRoot=getViewRootImpl();
    if (viewRoot != null) {
      viewRoot.ensureTouchMode(false);
    }
  }
  return requestFocus(View.FOCUS_DOWN);
}

Fixed version (ground truth):
/** 
 * Call this to try to give focus to a specific view or to one of its descendants. This is a special variant of   {@link #requestFocus() } that will allow views that are not focusable intouch mode to request focus when they are touched.
 * @return Whether this view or one of its descendants actually took focus.
 * @see #isInTouchMode()
 */
public final boolean requestFocusFromTouch(){
  if (isInTouchMode()) {
    ViewRootImpl viewRoot=getViewRootImpl();
    if (viewRoot != null) {
      viewRoot.ensureTouchMode(false);
    }
  }
  return requestFocus(View.FOCUS_DOWN);
}
Program: 195688
Project: 195688
Buggy source:
/** 
 * Define whether scrollbars will fade when the view is not scrolling.
 * @param fadeScrollbars wheter to enable fading
 * @attr ref android.R.styleable#View_fadeScrollbars
 */
public void setScrollbarFadingEnabled(boolean fadeScrollbars){
  initScrollCache();
  final ScrollabilityCache scrollabilityCache=mScrollCache;
  scrollabilityCache.fadeScrollBars=fadeScrollbars;
  if (fadeScrollbars) {
    scrollabilityCache.state=ScrollabilityCache.OFF;
  }
 else {
    scrollabilityCache.state=ScrollabilityCache.ON;
  }
}

Fixed version (ground truth):
/** 
 * Define whether scrollbars will fade when the view is not scrolling.
 * @param fadeScrollbars whether to enable fading
 * @attr ref android.R.styleable#View_fadeScrollbars
 */
public void setScrollbarFadingEnabled(boolean fadeScrollbars){
  initScrollCache();
  final ScrollabilityCache scrollabilityCache=mScrollCache;
  scrollabilityCache.fadeScrollBars=fadeScrollbars;
  if (fadeScrollbars) {
    scrollabilityCache.state=ScrollabilityCache.OFF;
  }
 else {
    scrollabilityCache.state=ScrollabilityCache.ON;
  }
}
Program: 195689
Project: 195689
Buggy source:
/** 
 * Returns true if this view has focus iteself, or is the ancestor of the view that has focus.
 * @return True if this view has or contains focus, false otherwise.
 */
@ViewDebug.ExportedProperty(category="String_Node_Str") public boolean hasFocus(){
  return (mPrivateFlags & PFLAG_FOCUSED) != 0;
}

Fixed version (ground truth):
/** 
 * Returns true if this view has focus itself, or is the ancestor of the view that has focus.
 * @return True if this view has or contains focus, false otherwise.
 */
@ViewDebug.ExportedProperty(category="String_Node_Str") public boolean hasFocus(){
  return (mPrivateFlags & PFLAG_FOCUSED) != 0;
}
Program: 195691
Project: 195691
Buggy source:
/** 
 * Called when the current configuration of the resources being used by the application have changed.  You can use this to decide when to reload resources that can changed based on orientation and other configuration characterstics.  You only need to use this if you are not relying on the normal   {@link android.app.Activity} mechanism ofrecreating the activity instance upon a configuration change.
 * @param newConfig The new resource configuration.
 */
protected void onConfigurationChanged(Configuration newConfig){
}

Fixed version (ground truth):
/** 
 * Called when the current configuration of the resources being used by the application have changed.  You can use this to decide when to reload resources that can changed based on orientation and other configuration characteristics.  You only need to use this if you are not relying on the normal   {@link android.app.Activity} mechanism ofrecreating the activity instance upon a configuration change.
 * @param newConfig The new resource configuration.
 */
protected void onConfigurationChanged(Configuration newConfig){
}
Program: 195695
Project: 195695
Buggy source:
/** 
 * Adds any focusable views that are descendants of this view (possibly including this view if it is focusable itself) to views. This method adds all focusable views regardless if we are in touch mode or only views focusable in touch mode if we are in touch mode or only views that can take accessibility focus if accessibility is enabeld depending on the focusable mode paramater.
 * @param views Focusable views found so far or null if all we are interested isthe number of focusables.
 * @param direction The direction of the focus.
 * @param focusableMode The type of focusables to be added.
 * @see #FOCUSABLES_ALL
 * @see #FOCUSABLES_TOUCH_MODE
 */
public void addFocusables(ArrayList<View> views,@FocusDirection int direction,@FocusableMode int focusableMode){
  if (views == null) {
    return;
  }
  if (!isFocusable()) {
    return;
  }
  if ((focusableMode & FOCUSABLES_TOUCH_MODE) == FOCUSABLES_TOUCH_MODE && isInTouchMode() && !isFocusableInTouchMode()) {
    return;
  }
  views.add(this);
}

Fixed version (ground truth):
/** 
 * Adds any focusable views that are descendants of this view (possibly including this view if it is focusable itself) to views. This method adds all focusable views regardless if we are in touch mode or only views focusable in touch mode if we are in touch mode or only views that can take accessibility focus if accessibility is enabled depending on the focusable mode parameter.
 * @param views Focusable views found so far or null if all we are interested isthe number of focusables.
 * @param direction The direction of the focus.
 * @param focusableMode The type of focusables to be added.
 * @see #FOCUSABLES_ALL
 * @see #FOCUSABLES_TOUCH_MODE
 */
public void addFocusables(ArrayList<View> views,@FocusDirection int direction,@FocusableMode int focusableMode){
  if (views == null) {
    return;
  }
  if (!isFocusable()) {
    return;
  }
  if ((focusableMode & FOCUSABLES_TOUCH_MODE) == FOCUSABLES_TOUCH_MODE && isInTouchMode() && !isFocusableInTouchMode()) {
    return;
  }
  views.add(this);
}
Program: 195696
Project: 195696
Buggy source:
/** 
 * Return if the padding as been set thru relative values  {@link #setPaddingRelative(int,int,int,int)} or thru
 * @attr ref android.R.styleable#View_paddingStart or
 * @attr ref android.R.styleable#View_paddingEnd
 * @return true if the padding is relative or false if it is not.
 */
public boolean isPaddingRelative(){
  return (mUserPaddingStart != UNDEFINED_PADDING || mUserPaddingEnd != UNDEFINED_PADDING);
}

Fixed version (ground truth):
/** 
 * Return if the padding has been set through relative values  {@link #setPaddingRelative(int,int,int,int)} or through
 * @attr ref android.R.styleable#View_paddingStart or
 * @attr ref android.R.styleable#View_paddingEnd
 * @return true if the padding is relative or false if it is not.
 */
public boolean isPaddingRelative(){
  return (mUserPaddingStart != UNDEFINED_PADDING || mUserPaddingEnd != UNDEFINED_PADDING);
}
Program: 195697
Project: 195697
Buggy source:
/** 
 * This is a framework-internal mirror of onDetachedFromWindow() that's called after onDetachedFromWindow(). If you override this you *MUST* call super.onDetachedFromWindowInternal()! The super method should be called at the end of the overriden method to ensure subclasses are destroyed first
 * @hide
 */
protected void onDetachedFromWindowInternal(){
  mPrivateFlags&=~PFLAG_CANCEL_NEXT_UP_EVENT;
  mPrivateFlags3&=~PFLAG3_IS_LAID_OUT;
  removeUnsetPressCallback();
  removeLongPressCallback();
  removePerformClickCallback();
  removeSendViewScrolledAccessibilityEventCallback();
  stopNestedScroll();
  jumpDrawablesToCurrentState();
  destroyDrawingCache();
  cleanupDraw();
  mCurrentAnimation=null;
}

Fixed version (ground truth):
/** 
 * This is a framework-internal mirror of onDetachedFromWindow() that's called after onDetachedFromWindow(). If you override this you *MUST* call super.onDetachedFromWindowInternal()! The super method should be called at the end of the overridden method to ensure subclasses are destroyed first
 * @hide
 */
protected void onDetachedFromWindowInternal(){
  mPrivateFlags&=~PFLAG_CANCEL_NEXT_UP_EVENT;
  mPrivateFlags3&=~PFLAG3_IS_LAID_OUT;
  removeUnsetPressCallback();
  removeLongPressCallback();
  removePerformClickCallback();
  removeSendViewScrolledAccessibilityEventCallback();
  stopNestedScroll();
  jumpDrawablesToCurrentState();
  destroyDrawingCache();
  cleanupDraw();
  mCurrentAnimation=null;
}
Program: 195704
Project: 195704
Buggy source:
KeyguardState(){
  showing=true;
  showingAndNotOccluded=true;
  secure=true;
}

Fixed version (ground truth):
KeyguardState(){
  showing=true;
  showingAndNotOccluded=true;
  secure=true;
  deviceHasKeyguard=true;
}
Program: 195705
Project: 195705
Buggy source:
private static final View createScrim(Context context){
  View view=new View(context);
  int flags=WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR | WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN| WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
  final int stretch=ViewGroup.LayoutParams.MATCH_PARENT;
  final int type=WindowManager.LayoutParams.TYPE_KEYGUARD_SCRIM;
  WindowManager.LayoutParams lp=new WindowManager.LayoutParams(stretch,stretch,type,flags,PixelFormat.TRANSLUCENT);
  lp.softInputMode=WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
  lp.screenOrientation=ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;
  lp.privateFlags|=WindowManager.LayoutParams.PRIVATE_FLAG_FAKE_HARDWARE_ACCELERATED;
  lp.setTitle("String_Node_Str");
  WindowManager wm=(WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
  wm.addView(view,lp);
  view.setVisibility(View.GONE);
  view.setSystemUiVisibility(View.STATUS_BAR_DISABLE_HOME | View.STATUS_BAR_DISABLE_BACK | View.STATUS_BAR_DISABLE_RECENT| View.STATUS_BAR_DISABLE_EXPAND| View.STATUS_BAR_DISABLE_SEARCH);
  return view;
}

Fixed version (ground truth):
private static final View createScrim(Context context){
  View view=new View(context);
  int flags=WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR | WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN| WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
  final int stretch=ViewGroup.LayoutParams.MATCH_PARENT;
  final int type=WindowManager.LayoutParams.TYPE_KEYGUARD_SCRIM;
  WindowManager.LayoutParams lp=new WindowManager.LayoutParams(stretch,stretch,type,flags,PixelFormat.TRANSLUCENT);
  lp.softInputMode=WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
  lp.screenOrientation=ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;
  lp.privateFlags|=WindowManager.LayoutParams.PRIVATE_FLAG_FAKE_HARDWARE_ACCELERATED;
  lp.setTitle("String_Node_Str");
  WindowManager wm=(WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
  wm.addView(view,lp);
  view.setSystemUiVisibility(View.STATUS_BAR_DISABLE_HOME | View.STATUS_BAR_DISABLE_BACK | View.STATUS_BAR_DISABLE_RECENT| View.STATUS_BAR_DISABLE_EXPAND| View.STATUS_BAR_DISABLE_SEARCH);
  return view;
}
Program: 195706
Project: 195706
Buggy source:
public void onScreenTurnedOn(final ShowListener showListener){
  if (mKeyguardService != null) {
    if (DEBUG)     Log.v(TAG,"String_Node_Str" + showListener + "String_Node_Str");
    mKeyguardService.onScreenTurnedOn(new KeyguardShowDelegate(showListener));
  }
 else {
    Slog.w(TAG,"String_Node_Str");
    showListener.onShown(null);
  }
  mKeyguardState.screenIsOn=true;
}

Fixed version (ground truth):
public void onScreenTurnedOn(final ShowListener showListener){
  if (mKeyguardService != null) {
    if (DEBUG)     Log.v(TAG,"String_Node_Str" + showListener + "String_Node_Str");
    mKeyguardService.onScreenTurnedOn(new KeyguardShowDelegate(showListener));
  }
 else {
    Slog.w(TAG,"String_Node_Str");
    mShowListenerWhenConnect=showListener;
    showScrim();
  }
  mKeyguardState.screenIsOn=true;
}
Program: 195707
Project: 195707
Buggy source:
public void showScrim(){
  mScrim.post(new Runnable(){
    @Override public void run(){
      mScrim.setVisibility(View.VISIBLE);
    }
  }
);
}

Fixed version (ground truth):
public void showScrim(){
  if (!mKeyguardState.deviceHasKeyguard)   return;
  mScrim.post(new Runnable(){
    @Override public void run(){
      mScrim.setVisibility(View.VISIBLE);
    }
  }
);
}
Program: 195708
Project: 195708
Buggy source:
@Override public void onServiceConnected(ComponentName name,IBinder service){
  if (DEBUG)   Log.v(TAG,"String_Node_Str");
  mKeyguardService=new KeyguardServiceWrapper(mContext,IKeyguardService.Stub.asInterface(service));
  if (mKeyguardState.systemIsReady) {
    mKeyguardService.onSystemReady();
    mKeyguardService.onScreenTurnedOn(new KeyguardShowDelegate(null));
  }
  if (mKeyguardState.bootCompleted) {
    mKeyguardService.onBootCompleted();
  }
}

Fixed version (ground truth):
@Override public void onServiceConnected(ComponentName name,IBinder service){
  if (DEBUG)   Log.v(TAG,"String_Node_Str");
  mKeyguardService=new KeyguardServiceWrapper(mContext,IKeyguardService.Stub.asInterface(service));
  if (mKeyguardState.systemIsReady) {
    mKeyguardService.onSystemReady();
    mKeyguardService.onScreenTurnedOn(new KeyguardShowDelegate(mShowListenerWhenConnect));
    mShowListenerWhenConnect=null;
  }
  if (mKeyguardState.bootCompleted) {
    mKeyguardService.onBootCompleted();
  }
}
Program: 195709
Project: 195709
Buggy source:
public void bindService(Context context){
  Intent intent=new Intent();
  intent.setClassName(KEYGUARD_PACKAGE,KEYGUARD_CLASS);
  if (!context.bindServiceAsUser(intent,mKeyguardConnection,Context.BIND_AUTO_CREATE,UserHandle.OWNER)) {
    if (DEBUG)     Log.v(TAG,"String_Node_Str" + KEYGUARD_CLASS);
    mKeyguardState.showing=false;
    mKeyguardState.showingAndNotOccluded=false;
    mKeyguardState.secure=false;
  }
 else {
    if (DEBUG)     Log.v(TAG,"String_Node_Str");
  }
}

Fixed version (ground truth):
public void bindService(Context context){
  Intent intent=new Intent();
  intent.setClassName(KEYGUARD_PACKAGE,KEYGUARD_CLASS);
  if (!context.bindServiceAsUser(intent,mKeyguardConnection,Context.BIND_AUTO_CREATE,UserHandle.OWNER)) {
    Log.v(TAG,"String_Node_Str" + KEYGUARD_CLASS);
    mKeyguardState.showing=false;
    mKeyguardState.showingAndNotOccluded=false;
    mKeyguardState.secure=false;
    mKeyguardState.deviceHasKeyguard=false;
    hideScrim();
  }
 else {
    if (DEBUG)     Log.v(TAG,"String_Node_Str");
  }
}
Program: 195711
Project: 195711
Buggy source:
KeyguardState(){
  showing=true;
  showingAndNotOccluded=true;
  secure=true;
}

Fixed version (ground truth):
KeyguardState(){
  showing=true;
  showingAndNotOccluded=true;
  secure=true;
  deviceHasKeyguard=true;
}
Program: 195712
Project: 195712
Buggy source:
private static final View createScrim(Context context){
  View view=new View(context);
  int flags=WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR | WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN| WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
  final int stretch=ViewGroup.LayoutParams.MATCH_PARENT;
  final int type=WindowManager.LayoutParams.TYPE_KEYGUARD_SCRIM;
  WindowManager.LayoutParams lp=new WindowManager.LayoutParams(stretch,stretch,type,flags,PixelFormat.TRANSLUCENT);
  lp.softInputMode=WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
  lp.screenOrientation=ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;
  lp.privateFlags|=WindowManager.LayoutParams.PRIVATE_FLAG_FAKE_HARDWARE_ACCELERATED;
  lp.setTitle("String_Node_Str");
  WindowManager wm=(WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
  wm.addView(view,lp);
  view.setVisibility(View.GONE);
  view.setSystemUiVisibility(View.STATUS_BAR_DISABLE_HOME | View.STATUS_BAR_DISABLE_BACK | View.STATUS_BAR_DISABLE_RECENT| View.STATUS_BAR_DISABLE_EXPAND| View.STATUS_BAR_DISABLE_SEARCH);
  return view;
}

Fixed version (ground truth):
private static final View createScrim(Context context){
  View view=new View(context);
  int flags=WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR | WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN| WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
  final int stretch=ViewGroup.LayoutParams.MATCH_PARENT;
  final int type=WindowManager.LayoutParams.TYPE_KEYGUARD_SCRIM;
  WindowManager.LayoutParams lp=new WindowManager.LayoutParams(stretch,stretch,type,flags,PixelFormat.TRANSLUCENT);
  lp.softInputMode=WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
  lp.screenOrientation=ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;
  lp.privateFlags|=WindowManager.LayoutParams.PRIVATE_FLAG_FAKE_HARDWARE_ACCELERATED;
  lp.setTitle("String_Node_Str");
  WindowManager wm=(WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
  wm.addView(view,lp);
  view.setSystemUiVisibility(View.STATUS_BAR_DISABLE_HOME | View.STATUS_BAR_DISABLE_BACK | View.STATUS_BAR_DISABLE_RECENT| View.STATUS_BAR_DISABLE_EXPAND| View.STATUS_BAR_DISABLE_SEARCH);
  return view;
}
Program: 195713
Project: 195713
Buggy source:
public void onScreenTurnedOn(final ShowListener showListener){
  if (mKeyguardService != null) {
    if (DEBUG)     Log.v(TAG,"String_Node_Str" + showListener + "String_Node_Str");
    mKeyguardService.onScreenTurnedOn(new KeyguardShowDelegate(showListener));
  }
 else {
    Slog.w(TAG,"String_Node_Str");
    showListener.onShown(null);
  }
  mKeyguardState.screenIsOn=true;
}

Fixed version (ground truth):
public void onScreenTurnedOn(final ShowListener showListener){
  if (mKeyguardService != null) {
    if (DEBUG)     Log.v(TAG,"String_Node_Str" + showListener + "String_Node_Str");
    mKeyguardService.onScreenTurnedOn(new KeyguardShowDelegate(showListener));
  }
 else {
    Slog.w(TAG,"String_Node_Str");
    mShowListenerWhenConnect=showListener;
    showScrim();
  }
  mKeyguardState.screenIsOn=true;
}
Program: 195714
Project: 195714
Buggy source:
public void showScrim(){
  mScrim.post(new Runnable(){
    @Override public void run(){
      mScrim.setVisibility(View.VISIBLE);
    }
  }
);
}

Fixed version (ground truth):
public void showScrim(){
  if (!mKeyguardState.deviceHasKeyguard)   return;
  mScrim.post(new Runnable(){
    @Override public void run(){
      mScrim.setVisibility(View.VISIBLE);
    }
  }
);
}
Program: 195715
Project: 195715
Buggy source:
@Override public void onServiceConnected(ComponentName name,IBinder service){
  if (DEBUG)   Log.v(TAG,"String_Node_Str");
  mKeyguardService=new KeyguardServiceWrapper(mContext,IKeyguardService.Stub.asInterface(service));
  if (mKeyguardState.systemIsReady) {
    mKeyguardService.onSystemReady();
    mKeyguardService.onScreenTurnedOn(new KeyguardShowDelegate(null));
  }
  if (mKeyguardState.bootCompleted) {
    mKeyguardService.onBootCompleted();
  }
}

Fixed version (ground truth):
@Override public void onServiceConnected(ComponentName name,IBinder service){
  if (DEBUG)   Log.v(TAG,"String_Node_Str");
  mKeyguardService=new KeyguardServiceWrapper(mContext,IKeyguardService.Stub.asInterface(service));
  if (mKeyguardState.systemIsReady) {
    mKeyguardService.onSystemReady();
    mKeyguardService.onScreenTurnedOn(new KeyguardShowDelegate(mShowListenerWhenConnect));
    mShowListenerWhenConnect=null;
  }
  if (mKeyguardState.bootCompleted) {
    mKeyguardService.onBootCompleted();
  }
}
Program: 195716
Project: 195716
Buggy source:
public void bindService(Context context){
  Intent intent=new Intent();
  intent.setClassName(KEYGUARD_PACKAGE,KEYGUARD_CLASS);
  if (!context.bindServiceAsUser(intent,mKeyguardConnection,Context.BIND_AUTO_CREATE,UserHandle.OWNER)) {
    if (DEBUG)     Log.v(TAG,"String_Node_Str" + KEYGUARD_CLASS);
    mKeyguardState.showing=false;
    mKeyguardState.showingAndNotOccluded=false;
    mKeyguardState.secure=false;
  }
 else {
    if (DEBUG)     Log.v(TAG,"String_Node_Str");
  }
}

Fixed version (ground truth):
public void bindService(Context context){
  Intent intent=new Intent();
  intent.setClassName(KEYGUARD_PACKAGE,KEYGUARD_CLASS);
  if (!context.bindServiceAsUser(intent,mKeyguardConnection,Context.BIND_AUTO_CREATE,UserHandle.OWNER)) {
    Log.v(TAG,"String_Node_Str" + KEYGUARD_CLASS);
    mKeyguardState.showing=false;
    mKeyguardState.showingAndNotOccluded=false;
    mKeyguardState.secure=false;
    mKeyguardState.deviceHasKeyguard=false;
    hideScrim();
  }
 else {
    if (DEBUG)     Log.v(TAG,"String_Node_Str");
  }
}
Program: 195717
Project: 195717
Buggy source:
boolean checkAllowNonWakeupDelayLocked(long nowELAPSED){
  if (mInteractive) {
    return false;
  }
  if (mLastAlarmDeliveryTime <= 0) {
    return false;
  }
  if (mPendingNonWakeupAlarms.size() > 0 && mNextNonWakeupDeliveryTime > nowELAPSED) {
    return false;
  }
  long timeSinceLast=nowELAPSED - mLastAlarmDeliveryTime;
  return timeSinceLast <= currentNonWakeupFuzzLocked(nowELAPSED);
}

Fixed version (ground truth):
boolean checkAllowNonWakeupDelayLocked(long nowELAPSED){
  if (mInteractive) {
    return false;
  }
  if (mLastAlarmDeliveryTime <= 0) {
    return false;
  }
  if (mPendingNonWakeupAlarms.size() > 0 && mNextNonWakeupDeliveryTime < nowELAPSED) {
    return false;
  }
  long timeSinceLast=nowELAPSED - mLastAlarmDeliveryTime;
  return timeSinceLast <= currentNonWakeupFuzzLocked(nowELAPSED);
}
Program: 195718
Project: 195718
Buggy source:
boolean checkAllowNonWakeupDelayLocked(long nowELAPSED){
  if (mInteractive) {
    return false;
  }
  if (mLastAlarmDeliveryTime <= 0) {
    return false;
  }
  if (mPendingNonWakeupAlarms.size() > 0 && mNextNonWakeupDeliveryTime > nowELAPSED) {
    return false;
  }
  long timeSinceLast=nowELAPSED - mLastAlarmDeliveryTime;
  return timeSinceLast <= currentNonWakeupFuzzLocked(nowELAPSED);
}

Fixed version (ground truth):
boolean checkAllowNonWakeupDelayLocked(long nowELAPSED){
  if (mInteractive) {
    return false;
  }
  if (mLastAlarmDeliveryTime <= 0) {
    return false;
  }
  if (mPendingNonWakeupAlarms.size() > 0 && mNextNonWakeupDeliveryTime < nowELAPSED) {
    return false;
  }
  long timeSinceLast=nowELAPSED - mLastAlarmDeliveryTime;
  return timeSinceLast <= currentNonWakeupFuzzLocked(nowELAPSED);
}
Program: 195719
Project: 195719
Buggy source:
boolean checkAllowNonWakeupDelayLocked(long nowELAPSED){
  if (mInteractive) {
    return false;
  }
  if (mLastAlarmDeliveryTime <= 0) {
    return false;
  }
  if (mPendingNonWakeupAlarms.size() > 0 && mNextNonWakeupDeliveryTime > nowELAPSED) {
    return false;
  }
  long timeSinceLast=nowELAPSED - mLastAlarmDeliveryTime;
  return timeSinceLast <= currentNonWakeupFuzzLocked(nowELAPSED);
}

Fixed version (ground truth):
boolean checkAllowNonWakeupDelayLocked(long nowELAPSED){
  if (mInteractive) {
    return false;
  }
  if (mLastAlarmDeliveryTime <= 0) {
    return false;
  }
  if (mPendingNonWakeupAlarms.size() > 0 && mNextNonWakeupDeliveryTime < nowELAPSED) {
    return false;
  }
  long timeSinceLast=nowELAPSED - mLastAlarmDeliveryTime;
  return timeSinceLast <= currentNonWakeupFuzzLocked(nowELAPSED);
}
Program: 195720
Project: 195720
Buggy source:
boolean checkAllowNonWakeupDelayLocked(long nowELAPSED){
  if (mInteractive) {
    return false;
  }
  if (mLastAlarmDeliveryTime <= 0) {
    return false;
  }
  if (mPendingNonWakeupAlarms.size() > 0 && mNextNonWakeupDeliveryTime > nowELAPSED) {
    return false;
  }
  long timeSinceLast=nowELAPSED - mLastAlarmDeliveryTime;
  return timeSinceLast <= currentNonWakeupFuzzLocked(nowELAPSED);
}

Fixed version (ground truth):
boolean checkAllowNonWakeupDelayLocked(long nowELAPSED){
  if (mInteractive) {
    return false;
  }
  if (mLastAlarmDeliveryTime <= 0) {
    return false;
  }
  if (mPendingNonWakeupAlarms.size() > 0 && mNextNonWakeupDeliveryTime < nowELAPSED) {
    return false;
  }
  long timeSinceLast=nowELAPSED - mLastAlarmDeliveryTime;
  return timeSinceLast <= currentNonWakeupFuzzLocked(nowELAPSED);
}
Program: 195721
Project: 195721
Buggy source:
private static final View createScrim(Context context){
  View view=new View(context);
  int flags=WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR | WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN| WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
  final int stretch=ViewGroup.LayoutParams.MATCH_PARENT;
  final int type=WindowManager.LayoutParams.TYPE_KEYGUARD_SCRIM;
  WindowManager.LayoutParams lp=new WindowManager.LayoutParams(stretch,stretch,type,flags,PixelFormat.TRANSLUCENT);
  lp.softInputMode=WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
  lp.screenOrientation=ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;
  lp.privateFlags|=WindowManager.LayoutParams.PRIVATE_FLAG_FAKE_HARDWARE_ACCELERATED;
  lp.setTitle("String_Node_Str");
  WindowManager wm=(WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
  wm.addView(view,lp);
  view.setSystemUiVisibility(View.STATUS_BAR_DISABLE_HOME | View.STATUS_BAR_DISABLE_BACK | View.STATUS_BAR_DISABLE_RECENT| View.STATUS_BAR_DISABLE_EXPAND| View.STATUS_BAR_DISABLE_SEARCH);
  return view;
}

Fixed version (ground truth):
private static final View createScrim(Context context){
  View view=new View(context);
  int flags=WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_LAYOUT_INSET_DECOR | WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN| WindowManager.LayoutParams.FLAG_SHOW_WALLPAPER;
  final int stretch=ViewGroup.LayoutParams.MATCH_PARENT;
  final int type=WindowManager.LayoutParams.TYPE_KEYGUARD_SCRIM;
  WindowManager.LayoutParams lp=new WindowManager.LayoutParams(stretch,stretch,type,flags,PixelFormat.TRANSLUCENT);
  lp.softInputMode=WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
  lp.screenOrientation=ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;
  lp.privateFlags|=WindowManager.LayoutParams.PRIVATE_FLAG_FAKE_HARDWARE_ACCELERATED;
  lp.setTitle("String_Node_Str");
  WindowManager wm=(WindowManager)context.getSystemService(Context.WINDOW_SERVICE);
  wm.addView(view,lp);
  view.setVisibility(View.GONE);
  view.setSystemUiVisibility(View.STATUS_BAR_DISABLE_HOME | View.STATUS_BAR_DISABLE_BACK | View.STATUS_BAR_DISABLE_RECENT| View.STATUS_BAR_DISABLE_EXPAND| View.STATUS_BAR_DISABLE_SEARCH);
  return view;
}
Program: 195722
Project: 195722
Buggy source:
public void onScreenTurnedOn(final ShowListener showListener){
  if (mKeyguardService != null) {
    if (DEBUG)     Log.v(TAG,"String_Node_Str" + showListener + "String_Node_Str");
    mKeyguardService.onScreenTurnedOn(new KeyguardShowDelegate(showListener));
  }
 else {
    Slog.w(TAG,"String_Node_Str");
    mShowListenerWhenConnect=showListener;
    showScrim();
  }
  mKeyguardState.screenIsOn=true;
}

Fixed version (ground truth):
public void onScreenTurnedOn(final ShowListener showListener){
  if (mKeyguardService != null) {
    if (DEBUG)     Log.v(TAG,"String_Node_Str" + showListener + "String_Node_Str");
    mKeyguardService.onScreenTurnedOn(new KeyguardShowDelegate(showListener));
  }
 else {
    Slog.w(TAG,"String_Node_Str");
    showListener.onShown(null);
  }
  mKeyguardState.screenIsOn=true;
}
Program: 195723
Project: 195723
Buggy source:
@Override public void onServiceConnected(ComponentName name,IBinder service){
  if (DEBUG)   Log.v(TAG,"String_Node_Str");
  mKeyguardService=new KeyguardServiceWrapper(mContext,IKeyguardService.Stub.asInterface(service));
  if (mKeyguardState.systemIsReady) {
    mKeyguardService.onSystemReady();
    mKeyguardService.onScreenTurnedOn(new KeyguardShowDelegate(mShowListenerWhenConnect));
    if (mShowListenerWhenConnect != null) {
      Log.v(TAG,"String_Node_Str");
      mShowListenerWhenConnect=null;
      hideScrim();
    }
  }
  if (mKeyguardState.bootCompleted) {
    mKeyguardService.onBootCompleted();
  }
}

Fixed version (ground truth):
@Override public void onServiceConnected(ComponentName name,IBinder service){
  if (DEBUG)   Log.v(TAG,"String_Node_Str");
  mKeyguardService=new KeyguardServiceWrapper(mContext,IKeyguardService.Stub.asInterface(service));
  if (mKeyguardState.systemIsReady) {
    mKeyguardService.onSystemReady();
    mKeyguardService.onScreenTurnedOn(new KeyguardShowDelegate(null));
  }
  if (mKeyguardState.bootCompleted) {
    mKeyguardService.onBootCompleted();
  }
}