nus-yam/ex-repair huggingface dataset:
Program: 192477
Project: 192477
Buggy source:
/** 
 * Add a new content: URI that will be monitored with a  {@link android.database.ContentObserver}, and will cause the job to execute if changed. If you have any trigger content URIs associated with a job, it will not execute until there has been a change report for one or more of them. <p>Note that trigger URIs can not be used in combination with  {@link #setPeriodic(long)} or {@link #setPersisted(boolean)}.  To continually monitor for content changes, you need to schedule a new JobInfo observing the same URIs before you finish execution of the JobService handling the most recent changes.</p>
 * @param uri The content: URI to monitor.
 */
public Builder addTriggerContentUri(@NonNull TriggerContentUri uri){
  if (mTriggerContentUris == null) {
    mTriggerContentUris=new ArrayList<>();
  }
  mTriggerContentUris.add(uri);
  return this;
}

Fixed version (ground truth):
/** 
 * Add a new content: URI that will be monitored with a  {@link android.database.ContentObserver}, and will cause the job to execute if changed. If you have any trigger content URIs associated with a job, it will not execute until there has been a change report for one or more of them. <p>Note that trigger URIs can not be used in combination with  {@link #setPeriodic(long)} or {@link #setPersisted(boolean)}.  To continually monitor for content changes, you need to schedule a new JobInfo observing the same URIs before you finish execution of the JobService handling the most recent changes.</p> <p>Because because setting this property is not compatible with periodic or persisted jobs, doing so will throw an   {@link java.lang.IllegalArgumentException} when{@link android.app.job.JobInfo.Builder#build()} is called.</p>
 * @param uri The content: URI to monitor.
 */
public Builder addTriggerContentUri(@NonNull TriggerContentUri uri){
  if (mTriggerContentUris == null) {
    mTriggerContentUris=new ArrayList<>();
  }
  mTriggerContentUris.add(uri);
  return this;
}
Program: 192478
Project: 192478
Buggy source:
@Override public boolean onDoubleTap(MotionEvent event){
  mDoubleTapDetected=true;
  return mListener.onDoubleTapStarted();
}

Fixed version (ground truth):
@Override public boolean onDoubleTap(MotionEvent event){
  mDoubleTapDetected=true;
  return false;
}
Program: 192482
Project: 192482
Buggy source:
public final void onBusEvent(final RecentsActivityStartingEvent event){
  int processUser=sSystemServicesProxy.getProcessUser();
  if (!sSystemServicesProxy.isSystemUser(processUser)) {
    postToSystemUser(new Runnable(){
      @Override public void run(){
        try {
          mUserToSystemCallbacks.sendLaunchRecentsEvent();
        }
 catch (        RemoteException e) {
          Log.e(TAG,"String_Node_Str",e);
        }
      }
    }
);
  }
}

Fixed version (ground truth):
public final void onBusEvent(ConfigurationChangedEvent event){
  mImpl.onConfigurationChanged();
}
Program: 192484
Project: 192484
Buggy source:
/** 
 * Returns the transition rect for the given task id.
 */
private TaskViewTransform getThumbnailTransitionTransform(TaskStackView stackView,Task runningTaskOut){
  TaskStack stack=stackView.getStack();
  Task launchTask=stack.getLaunchTarget();
  if (launchTask != null) {
    runningTaskOut.copyFrom(launchTask);
  }
 else {
    launchTask=stack.getStackFrontMostTask(true);
    runningTaskOut.copyFrom(launchTask);
  }
  stackView.updateToInitialState();
  mTmpTransform=stackView.getStackAlgorithm().getStackTransformScreenCoordinates(launchTask,stackView.getScroller().getStackScroll(),mTmpTransform,null);
  return mTmpTransform;
}

Fixed version (ground truth):
/** 
 * Returns the transition rect for the given task id.
 */
private TaskViewTransform getThumbnailTransitionTransform(TaskStackView stackView,Task runningTaskOut){
  TaskStack stack=stackView.getStack();
  Task launchTask=stack.getLaunchTarget();
  if (launchTask != null) {
    runningTaskOut.copyFrom(launchTask);
  }
 else {
    launchTask=stack.getStackFrontMostTask(true);
    runningTaskOut.copyFrom(launchTask);
  }
  stackView.updateLayoutAlgorithm(true);
  stackView.updateToInitialState();
  mTmpTransform=stackView.getStackAlgorithm().getStackTransformScreenCoordinates(launchTask,stackView.getScroller().getStackScroll(),mTmpTransform,null);
  return mTmpTransform;
}
Program: 192485
Project: 192485
Buggy source:
/** 
 * Updates the min and max virtual scroll bounds.
 * @param ignoreTasksSet the set of tasks to ignore in the relayout
 */
void updateLayoutAlgorithm(boolean boundScrollToNewMinMax,ArraySet<Task.TaskKey> ignoreTasksSet){
  mLayoutAlgorithm.update(mStack,ignoreTasksSet);
  SystemServicesProxy ssp=Recents.getSystemServices();
  if (ssp.hasFreeformWorkspaceSupport()) {
    mTmpRect.set(mLayoutAlgorithm.mFreeformRect);
    mFreeformWorkspaceBackground.setBounds(mTmpRect);
  }
  if (boundScrollToNewMinMax) {
    mStackScroller.boundScroll();
  }
}

Fixed version (ground truth):
/** 
 * Updates the min and max virtual scroll bounds.
 * @param ignoreTasksSet the set of tasks to ignore in the relayout
 */
public void updateLayoutAlgorithm(boolean boundScrollToNewMinMax,ArraySet<Task.TaskKey> ignoreTasksSet){
  mLayoutAlgorithm.update(mStack,ignoreTasksSet);
  SystemServicesProxy ssp=Recents.getSystemServices();
  if (ssp.hasFreeformWorkspaceSupport()) {
    mTmpRect.set(mLayoutAlgorithm.mFreeformRect);
    mFreeformWorkspaceBackground.setBounds(mTmpRect);
  }
  if (boundScrollToNewMinMax) {
    mStackScroller.boundScroll();
  }
}
Program: 192486
Project: 192486
Buggy source:
private void updateScrollPositionOnExpandInBottom(ExpandableView view){
  if (view instanceof ExpandableNotificationRow) {
    ExpandableNotificationRow row=(ExpandableNotificationRow)view;
    if (row.isUserLocked() && row != getFirstChildNotGone()) {
      float endPosition;
      if (row.isChildInGroup()) {
        ExpandableNotificationRow parent=row.getNotificationParent();
        endPosition=parent.getTranslationY() + parent.getActualHeight();
      }
 else {
        endPosition=row.getTranslationY() + row.getActualHeight();
      }
      int stackEnd=mMaxLayoutHeight - mBottomStackPeekSize - mBottomStackSlowDownHeight + (int)mStackTranslation;
      if (endPosition > stackEnd) {
        mOwnScrollY+=endPosition - stackEnd;
        mDisallowScrollingInThisMotion=true;
      }
    }
  }
}

Fixed version (ground truth):
private void updateScrollPositionOnExpandInBottom(ExpandableView view){
  if (view instanceof ExpandableNotificationRow) {
    ExpandableNotificationRow row=(ExpandableNotificationRow)view;
    if (row.isUserLocked() && row != getFirstChildNotGone()) {
      if (row.isSummaryWithChildren()) {
        return;
      }
      float endPosition=row.getTranslationY() + row.getActualHeight();
      if (row.isChildInGroup()) {
        endPosition+=row.getNotificationParent().getTranslationY();
      }
      int stackEnd=mMaxLayoutHeight - mBottomStackPeekSize - mBottomStackSlowDownHeight + (int)mStackTranslation;
      if (endPosition > stackEnd) {
        mOwnScrollY+=endPosition - stackEnd;
        mDisallowScrollingInThisMotion=true;
      }
    }
  }
}
Program: 192489
Project: 192489
Buggy source:
@Override public void setVisible(boolean visible){
  for (  Integer viewType : mTransformedViews.keySet()) {
    TransformState ownState=getCurrentState(viewType);
    if (ownState != null) {
      ownState.setVisible(visible);
      ownState.recycle();
    }
  }
}

Fixed version (ground truth):
@Override public void setVisible(boolean visible){
  if (mViewTransformationAnimation != null) {
    mViewTransformationAnimation.cancel();
  }
  for (  Integer viewType : mTransformedViews.keySet()) {
    TransformState ownState=getCurrentState(viewType);
    if (ownState != null) {
      ownState.setVisible(visible);
      ownState.recycle();
    }
  }
}
Program: 192490
Project: 192490
Buggy source:
public final void onBusEvent(final RecentsActivityStartingEvent event){
  int processUser=sSystemServicesProxy.getProcessUser();
  if (!sSystemServicesProxy.isSystemUser(processUser)) {
    postToSystemUser(new Runnable(){
      @Override public void run(){
        try {
          mUserToSystemCallbacks.sendLaunchRecentsEvent();
        }
 catch (        RemoteException e) {
          Log.e(TAG,"String_Node_Str",e);
        }
      }
    }
);
  }
}

Fixed version (ground truth):
public final void onBusEvent(ConfigurationChangedEvent event){
  mImpl.onConfigurationChanged();
}
Program: 192492
Project: 192492
Buggy source:
/** 
 * Returns the transition rect for the given task id.
 */
private TaskViewTransform getThumbnailTransitionTransform(TaskStackView stackView,Task runningTaskOut){
  TaskStack stack=stackView.getStack();
  Task launchTask=stack.getLaunchTarget();
  if (launchTask != null) {
    runningTaskOut.copyFrom(launchTask);
  }
 else {
    launchTask=stack.getStackFrontMostTask(true);
    runningTaskOut.copyFrom(launchTask);
  }
  stackView.updateToInitialState();
  mTmpTransform=stackView.getStackAlgorithm().getStackTransformScreenCoordinates(launchTask,stackView.getScroller().getStackScroll(),mTmpTransform,null);
  return mTmpTransform;
}

Fixed version (ground truth):
/** 
 * Returns the transition rect for the given task id.
 */
private TaskViewTransform getThumbnailTransitionTransform(TaskStackView stackView,Task runningTaskOut){
  TaskStack stack=stackView.getStack();
  Task launchTask=stack.getLaunchTarget();
  if (launchTask != null) {
    runningTaskOut.copyFrom(launchTask);
  }
 else {
    launchTask=stack.getStackFrontMostTask(true);
    runningTaskOut.copyFrom(launchTask);
  }
  stackView.updateLayoutAlgorithm(true);
  stackView.updateToInitialState();
  mTmpTransform=stackView.getStackAlgorithm().getStackTransformScreenCoordinates(launchTask,stackView.getScroller().getStackScroll(),mTmpTransform,null);
  return mTmpTransform;
}
Program: 192493
Project: 192493
Buggy source:
/** 
 * Updates the min and max virtual scroll bounds.
 * @param ignoreTasksSet the set of tasks to ignore in the relayout
 */
void updateLayoutAlgorithm(boolean boundScrollToNewMinMax,ArraySet<Task.TaskKey> ignoreTasksSet){
  mLayoutAlgorithm.update(mStack,ignoreTasksSet);
  SystemServicesProxy ssp=Recents.getSystemServices();
  if (ssp.hasFreeformWorkspaceSupport()) {
    mTmpRect.set(mLayoutAlgorithm.mFreeformRect);
    mFreeformWorkspaceBackground.setBounds(mTmpRect);
  }
  if (boundScrollToNewMinMax) {
    mStackScroller.boundScroll();
  }
}

Fixed version (ground truth):
/** 
 * Updates the min and max virtual scroll bounds.
 * @param ignoreTasksSet the set of tasks to ignore in the relayout
 */
public void updateLayoutAlgorithm(boolean boundScrollToNewMinMax,ArraySet<Task.TaskKey> ignoreTasksSet){
  mLayoutAlgorithm.update(mStack,ignoreTasksSet);
  SystemServicesProxy ssp=Recents.getSystemServices();
  if (ssp.hasFreeformWorkspaceSupport()) {
    mTmpRect.set(mLayoutAlgorithm.mFreeformRect);
    mFreeformWorkspaceBackground.setBounds(mTmpRect);
  }
  if (boundScrollToNewMinMax) {
    mStackScroller.boundScroll();
  }
}
Program: 192494
Project: 192494
Buggy source:
private void updateScrollPositionOnExpandInBottom(ExpandableView view){
  if (view instanceof ExpandableNotificationRow) {
    ExpandableNotificationRow row=(ExpandableNotificationRow)view;
    if (row.isUserLocked() && row != getFirstChildNotGone()) {
      float endPosition;
      if (row.isChildInGroup()) {
        ExpandableNotificationRow parent=row.getNotificationParent();
        endPosition=parent.getTranslationY() + parent.getActualHeight();
      }
 else {
        endPosition=row.getTranslationY() + row.getActualHeight();
      }
      int stackEnd=mMaxLayoutHeight - mBottomStackPeekSize - mBottomStackSlowDownHeight + (int)mStackTranslation;
      if (endPosition > stackEnd) {
        mOwnScrollY+=endPosition - stackEnd;
        mDisallowScrollingInThisMotion=true;
      }
    }
  }
}

Fixed version (ground truth):
private void updateScrollPositionOnExpandInBottom(ExpandableView view){
  if (view instanceof ExpandableNotificationRow) {
    ExpandableNotificationRow row=(ExpandableNotificationRow)view;
    if (row.isUserLocked() && row != getFirstChildNotGone()) {
      if (row.isSummaryWithChildren()) {
        return;
      }
      float endPosition=row.getTranslationY() + row.getActualHeight();
      if (row.isChildInGroup()) {
        endPosition+=row.getNotificationParent().getTranslationY();
      }
      int stackEnd=mMaxLayoutHeight - mBottomStackPeekSize - mBottomStackSlowDownHeight + (int)mStackTranslation;
      if (endPosition > stackEnd) {
        mOwnScrollY+=endPosition - stackEnd;
        mDisallowScrollingInThisMotion=true;
      }
    }
  }
}
Program: 192495
Project: 192495
Buggy source:
private void updateLimits(){
  boolean customView=getPrivateLayout().getContractedChild().getId() != com.android.internal.R.id.status_bar_latest_event_content;
  boolean beforeN=mEntry.targetSdk < Build.VERSION_CODES.N;
  int minHeight=customView && beforeN && !mIsSummaryWithChildren ? mNotificationMinHeightLegacy : mNotificationMinHeight;
  boolean headsUpCustom=getPrivateLayout().getHeadsUpChild() != null && getPrivateLayout().getHeadsUpChild().getId() != com.android.internal.R.id.status_bar_latest_event_content;
  int headsUpheight=headsUpCustom && beforeN ? mMaxHeadsUpHeightLegacy : mMaxHeadsUpHeight;
  mPrivateLayout.setHeights(minHeight,headsUpheight,mNotificationMaxHeight);
  mPublicLayout.setHeights(minHeight,headsUpheight,mNotificationMaxHeight);
}

Fixed version (ground truth):
private void updateLimits(){
  updateLimitsForView(mPrivateLayout);
  updateLimitsForView(mPublicLayout);
}
Program: 192496
Project: 192496
Buggy source:
@Override public void setVisible(boolean visible){
  for (  Integer viewType : mTransformedViews.keySet()) {
    TransformState ownState=getCurrentState(viewType);
    if (ownState != null) {
      ownState.setVisible(visible);
      ownState.recycle();
    }
  }
}

Fixed version (ground truth):
@Override public void setVisible(boolean visible){
  if (mViewTransformationAnimation != null) {
    mViewTransformationAnimation.cancel();
  }
  for (  Integer viewType : mTransformedViews.keySet()) {
    TransformState ownState=getCurrentState(viewType);
    if (ownState != null) {
      ownState.setVisible(visible);
      ownState.recycle();
    }
  }
}
Program: 192497
Project: 192497
Buggy source:
@Override protected boolean sameAs(TransformState otherState){
  if (otherState instanceof TextViewTransformState) {
    TextViewTransformState otherTvs=(TextViewTransformState)otherState;
    if (TextUtils.equals(otherTvs.mText.getText(),mText.getText())) {
      int ownEllipsized=getEllipsisCount();
      int otherEllipsized=otherTvs.getEllipsisCount();
      return ownEllipsized == otherEllipsized;
    }
  }
  return super.sameAs(otherState);
}

Fixed version (ground truth):
@Override protected boolean sameAs(TransformState otherState){
  if (otherState instanceof TextViewTransformState) {
    TextViewTransformState otherTvs=(TextViewTransformState)otherState;
    if (TextUtils.equals(otherTvs.mText.getText(),mText.getText())) {
      int ownEllipsized=getEllipsisCount();
      int otherEllipsized=otherTvs.getEllipsisCount();
      return ownEllipsized == otherEllipsized && mText.getHeight() == otherTvs.mText.getHeight();
    }
  }
  return super.sameAs(otherState);
}
Program: 192498
Project: 192498
Buggy source:
public void updateResources(){
  int panelWidth=getResources().getDimensionPixelSize(R.dimen.notification_panel_width);
  int panelGravity=getResources().getInteger(R.integer.notification_panel_layout_gravity);
  FrameLayout.LayoutParams lp=(FrameLayout.LayoutParams)mQsContainer.getLayoutParams();
  if (lp.width != panelWidth) {
    lp.width=panelWidth;
    lp.gravity=panelGravity;
    mQsDensityContainer.setLayoutParams(lp);
    mQsContainer.post(mUpdateHeader);
  }
  lp=(FrameLayout.LayoutParams)mNotificationStackScroller.getLayoutParams();
  if (lp.width != panelWidth) {
    lp.width=panelWidth;
    lp.gravity=panelGravity;
    mNotificationStackScroller.setLayoutParams(lp);
  }
}

Fixed version (ground truth):
public void updateResources(){
  int panelWidth=getResources().getDimensionPixelSize(R.dimen.notification_panel_width);
  int panelGravity=getResources().getInteger(R.integer.notification_panel_layout_gravity);
  FrameLayout.LayoutParams lp=(FrameLayout.LayoutParams)mQsDensityContainer.getLayoutParams();
  if (lp.width != panelWidth) {
    lp.width=panelWidth;
    lp.gravity=panelGravity;
    mQsDensityContainer.setLayoutParams(lp);
    mQsContainer.post(mUpdateHeader);
  }
  lp=(FrameLayout.LayoutParams)mNotificationStackScroller.getLayoutParams();
  if (lp.width != panelWidth) {
    lp.width=panelWidth;
    lp.gravity=panelGravity;
    mNotificationStackScroller.setLayoutParams(lp);
  }
}
Program: 192499
Project: 192499
Buggy source:
public void updateResources(){
  int panelWidth=getResources().getDimensionPixelSize(R.dimen.notification_panel_width);
  int panelGravity=getResources().getInteger(R.integer.notification_panel_layout_gravity);
  FrameLayout.LayoutParams lp=(FrameLayout.LayoutParams)mQsContainer.getLayoutParams();
  if (lp.width != panelWidth) {
    lp.width=panelWidth;
    lp.gravity=panelGravity;
    mQsDensityContainer.setLayoutParams(lp);
    mQsContainer.post(mUpdateHeader);
  }
  lp=(FrameLayout.LayoutParams)mNotificationStackScroller.getLayoutParams();
  if (lp.width != panelWidth) {
    lp.width=panelWidth;
    lp.gravity=panelGravity;
    mNotificationStackScroller.setLayoutParams(lp);
  }
}

Fixed version (ground truth):
public void updateResources(){
  int panelWidth=getResources().getDimensionPixelSize(R.dimen.notification_panel_width);
  int panelGravity=getResources().getInteger(R.integer.notification_panel_layout_gravity);
  FrameLayout.LayoutParams lp=(FrameLayout.LayoutParams)mQsDensityContainer.getLayoutParams();
  if (lp.width != panelWidth) {
    lp.width=panelWidth;
    lp.gravity=panelGravity;
    mQsDensityContainer.setLayoutParams(lp);
    mQsContainer.post(mUpdateHeader);
  }
  lp=(FrameLayout.LayoutParams)mNotificationStackScroller.getLayoutParams();
  if (lp.width != panelWidth) {
    lp.width=panelWidth;
    lp.gravity=panelGravity;
    mNotificationStackScroller.setLayoutParams(lp);
  }
}
Program: 192500
Project: 192500
Buggy source:
public void updateResources(){
  int panelWidth=getResources().getDimensionPixelSize(R.dimen.notification_panel_width);
  int panelGravity=getResources().getInteger(R.integer.notification_panel_layout_gravity);
  FrameLayout.LayoutParams lp=(FrameLayout.LayoutParams)mQsContainer.getLayoutParams();
  if (lp.width != panelWidth) {
    lp.width=panelWidth;
    lp.gravity=panelGravity;
    mQsDensityContainer.setLayoutParams(lp);
    mQsContainer.post(mUpdateHeader);
  }
  lp=(FrameLayout.LayoutParams)mNotificationStackScroller.getLayoutParams();
  if (lp.width != panelWidth) {
    lp.width=panelWidth;
    lp.gravity=panelGravity;
    mNotificationStackScroller.setLayoutParams(lp);
  }
}

Fixed version (ground truth):
public void updateResources(){
  int panelWidth=getResources().getDimensionPixelSize(R.dimen.notification_panel_width);
  int panelGravity=getResources().getInteger(R.integer.notification_panel_layout_gravity);
  FrameLayout.LayoutParams lp=(FrameLayout.LayoutParams)mQsDensityContainer.getLayoutParams();
  if (lp.width != panelWidth) {
    lp.width=panelWidth;
    lp.gravity=panelGravity;
    mQsDensityContainer.setLayoutParams(lp);
    mQsContainer.post(mUpdateHeader);
  }
  lp=(FrameLayout.LayoutParams)mNotificationStackScroller.getLayoutParams();
  if (lp.width != panelWidth) {
    lp.width=panelWidth;
    lp.gravity=panelGravity;
    mNotificationStackScroller.setLayoutParams(lp);
  }
}
Program: 192501
Project: 192501
Buggy source:
/** 
 * Hook to low-levels:  Reporting the current status of encryption.
 * @return A value such as {@link DevicePolicyManager#ENCRYPTION_STATUS_UNSUPPORTED},  {@link DevicePolicyManager#ENCRYPTION_STATUS_INACTIVE},  {@link DevicePolicyManager#ENCRYPTION_STATUS_ACTIVE_DEFAULT_KEY}, or  {@link DevicePolicyManager#ENCRYPTION_STATUS_ACTIVE}.
 */
private int getEncryptionStatus(){
  if (!StorageManager.isNonDefaultBlockEncrypted()) {
    return DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE_DEFAULT_KEY;
  }
 else   if (StorageManager.isEncrypted()) {
    return DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE;
  }
 else   if (StorageManager.isEncryptable()) {
    return DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE;
  }
 else {
    return DevicePolicyManager.ENCRYPTION_STATUS_UNSUPPORTED;
  }
}

Fixed version (ground truth):
/** 
 * Hook to low-levels:  Reporting the current status of encryption.
 * @return A value such as {@link DevicePolicyManager#ENCRYPTION_STATUS_UNSUPPORTED},  {@link DevicePolicyManager#ENCRYPTION_STATUS_INACTIVE},  {@link DevicePolicyManager#ENCRYPTION_STATUS_ACTIVE_DEFAULT_KEY}, or  {@link DevicePolicyManager#ENCRYPTION_STATUS_ACTIVE}.
 */
private int getEncryptionStatus(){
  if (StorageManager.isEncrypted()) {
    return StorageManager.isNonDefaultBlockEncrypted() ? DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE : DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE_DEFAULT_KEY;
  }
 else   if (StorageManager.isEncryptable()) {
    return DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE;
  }
 else {
    return DevicePolicyManager.ENCRYPTION_STATUS_UNSUPPORTED;
  }
}
Program: 192502
Project: 192502
Buggy source:
/** 
 * Hook to low-levels:  Reporting the current status of encryption.
 * @return A value such as {@link DevicePolicyManager#ENCRYPTION_STATUS_UNSUPPORTED},  {@link DevicePolicyManager#ENCRYPTION_STATUS_INACTIVE},  {@link DevicePolicyManager#ENCRYPTION_STATUS_ACTIVE_DEFAULT_KEY}, or  {@link DevicePolicyManager#ENCRYPTION_STATUS_ACTIVE}.
 */
private int getEncryptionStatus(){
  if (!StorageManager.isNonDefaultBlockEncrypted()) {
    return DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE_DEFAULT_KEY;
  }
 else   if (StorageManager.isEncrypted()) {
    return DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE;
  }
 else   if (StorageManager.isEncryptable()) {
    return DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE;
  }
 else {
    return DevicePolicyManager.ENCRYPTION_STATUS_UNSUPPORTED;
  }
}

Fixed version (ground truth):
/** 
 * Hook to low-levels:  Reporting the current status of encryption.
 * @return A value such as {@link DevicePolicyManager#ENCRYPTION_STATUS_UNSUPPORTED},  {@link DevicePolicyManager#ENCRYPTION_STATUS_INACTIVE},  {@link DevicePolicyManager#ENCRYPTION_STATUS_ACTIVE_DEFAULT_KEY}, or  {@link DevicePolicyManager#ENCRYPTION_STATUS_ACTIVE}.
 */
private int getEncryptionStatus(){
  if (StorageManager.isEncrypted()) {
    return StorageManager.isNonDefaultBlockEncrypted() ? DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE : DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE_DEFAULT_KEY;
  }
 else   if (StorageManager.isEncryptable()) {
    return DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE;
  }
 else {
    return DevicePolicyManager.ENCRYPTION_STATUS_UNSUPPORTED;
  }
}
Program: 192503
Project: 192503
Buggy source:
/** 
 * Add a new content: URI that will be monitored with a  {@link android.database.ContentObserver}, and will cause the job to execute if changed. If you have any trigger content URIs associated with a job, it will not execute until there has been a change report for one or more of them. <p>Note that trigger URIs can not be used in combination with  {@link #setPeriodic(long)} or {@link #setPersisted(boolean)}.  To continually monitor for content changes, you need to schedule a new JobInfo observing the same URIs before you finish execution of the JobService handling the most recent changes.</p>
 * @param uri The content: URI to monitor.
 */
public Builder addTriggerContentUri(@NonNull TriggerContentUri uri){
  if (mTriggerContentUris == null) {
    mTriggerContentUris=new ArrayList<>();
  }
  mTriggerContentUris.add(uri);
  return this;
}

Fixed version (ground truth):
/** 
 * Add a new content: URI that will be monitored with a  {@link android.database.ContentObserver}, and will cause the job to execute if changed. If you have any trigger content URIs associated with a job, it will not execute until there has been a change report for one or more of them. <p>Note that trigger URIs can not be used in combination with  {@link #setPeriodic(long)} or {@link #setPersisted(boolean)}.  To continually monitor for content changes, you need to schedule a new JobInfo observing the same URIs before you finish execution of the JobService handling the most recent changes.</p> <p>Because because setting this property is not compatible with periodic or persisted jobs, doing so will throw an   {@link java.lang.IllegalArgumentException} when{@link android.app.job.JobInfo.Builder#build()} is called.</p>
 * @param uri The content: URI to monitor.
 */
public Builder addTriggerContentUri(@NonNull TriggerContentUri uri){
  if (mTriggerContentUris == null) {
    mTriggerContentUris=new ArrayList<>();
  }
  mTriggerContentUris.add(uri);
  return this;
}
Program: 192505
Project: 192505
Buggy source:
public Bitmap peekWallpaperBitmap(Context context,boolean returnDefault,int userId){
synchronized (this) {
    if (mService != null) {
      try {
        if (!mService.isWallpaperSupported(context.getOpPackageName())) {
          return null;
        }
      }
 catch (      RemoteException e) {
        throw e.rethrowFromSystemServer();
      }
    }
    if (mWallpaper != null) {
      return mWallpaper;
    }
    if (mDefaultWallpaper != null) {
      return mDefaultWallpaper;
    }
    mWallpaper=null;
    try {
      mWallpaper=getCurrentWallpaperLocked(userId);
    }
 catch (    OutOfMemoryError e) {
      Log.w(TAG,"String_Node_Str",e);
    }
    if (returnDefault) {
      if (mWallpaper == null) {
        mDefaultWallpaper=getDefaultWallpaperLocked(context);
        return mDefaultWallpaper;
      }
 else {
        mDefaultWallpaper=null;
      }
    }
    return mWallpaper;
  }
}

Fixed version (ground truth):
public Bitmap peekWallpaperBitmap(Context context,boolean returnDefault,int userId){
synchronized (this) {
    if (mService != null) {
      try {
        if (!mService.isWallpaperSupported(context.getOpPackageName())) {
          return null;
        }
      }
 catch (      RemoteException e) {
        throw e.rethrowFromSystemServer();
      }
    }
    if (mCachedWallpaper != null && mCachedWallpaperUserId == userId) {
      return mCachedWallpaper;
    }
    mCachedWallpaper=null;
    mCachedWallpaperUserId=0;
    try {
      mCachedWallpaper=getCurrentWallpaperLocked(userId);
      mCachedWallpaperUserId=userId;
    }
 catch (    OutOfMemoryError e) {
      Log.w(TAG,"String_Node_Str",e);
    }
    if (mCachedWallpaper != null) {
      return mCachedWallpaper;
    }
    if (returnDefault) {
      if (mDefaultWallpaper == null) {
        mDefaultWallpaper=getDefaultWallpaperLocked(context);
      }
      return mDefaultWallpaper;
    }
    return null;
  }
}
Program: 192506
Project: 192506
Buggy source:
void finishInstrumentationLocked(ProcessRecord app,int resultCode,Bundle results){
  if (app.instrumentationWatcher != null) {
    try {
      app.instrumentationWatcher.instrumentationFinished(app.instrumentationClass,resultCode,results);
    }
 catch (    RemoteException e) {
    }
  }
  if (app.instrumentationUiAutomationConnection != null) {
    mHandler.obtainMessage(SHUTDOWN_UI_AUTOMATION_CONNECTION_MSG,app.instrumentationUiAutomationConnection).sendToTarget();
  }
  app.instrumentationWatcher=null;
  app.instrumentationUiAutomationConnection=null;
  app.instrumentationClass=null;
  app.instrumentationInfo=null;
  app.instrumentationProfileFile=null;
  app.instrumentationArguments=null;
  forceStopPackageLocked(app.info.packageName,-1,false,false,true,true,false,app.userId,"String_Node_Str");
}

Fixed version (ground truth):
void finishInstrumentationLocked(ProcessRecord app,int resultCode,Bundle results){
  if (app.instrumentationWatcher != null) {
    mInstrumentationReporter.reportFinished(app.instrumentationWatcher,app.instrumentationClass,resultCode,results);
  }
  if (app.instrumentationUiAutomationConnection != null) {
    mHandler.obtainMessage(SHUTDOWN_UI_AUTOMATION_CONNECTION_MSG,app.instrumentationUiAutomationConnection).sendToTarget();
  }
  app.instrumentationWatcher=null;
  app.instrumentationUiAutomationConnection=null;
  app.instrumentationClass=null;
  app.instrumentationInfo=null;
  app.instrumentationProfileFile=null;
  app.instrumentationArguments=null;
  forceStopPackageLocked(app.info.packageName,-1,false,false,true,true,false,app.userId,"String_Node_Str");
}
Program: 192508
Project: 192508
Buggy source:
private void onFacetClicked(int index){
  Intent intent=mIntents.get(index);
  String packageName=intent.getPackage();
  if (packageName == null) {
    return;
  }
  if (packageName.equals(mCurrentPackageName) && index == mCurrentFacetIndex) {
    return;
  }
  intent.putExtra(EXTRA_FACET_CATEGORIES,mFacetCategories.get(index));
  intent.putExtra(EXTRA_FACET_PACKAGES,mFacetPackages.get(index));
  intent.putExtra(EXTRA_FACET_ID,Integer.toString(index));
  intent.putExtra(EXTRA_FACET_LAUNCH_PICKER,index == mCurrentFacetIndex);
  setCurrentFacet(index);
  startActivity(intent);
}

Fixed version (ground truth):
private void onFacetClicked(int index){
  Intent intent=mIntents.get(index);
  String packageName=intent.getPackage();
  if (packageName == null) {
    return;
  }
  intent.putExtra(EXTRA_FACET_CATEGORIES,mFacetCategories.get(index));
  intent.putExtra(EXTRA_FACET_PACKAGES,mFacetPackages.get(index));
  intent.putExtra(EXTRA_FACET_ID,Integer.toString(index));
  intent.putExtra(EXTRA_FACET_LAUNCH_PICKER,index == mCurrentFacetIndex);
  setCurrentFacet(index);
  startActivity(intent);
}
Program: 192509
Project: 192509
Buggy source:
public void taskChanged(String packageName){
  mCurrentPackageName=packageName;
  if (mFacetPackageMap.containsKey(packageName)) {
    setCurrentFacet(mFacetPackageMap.get(packageName));
  }
  String category=getPackageCategory(packageName);
  if (category != null) {
    setCurrentFacet(mFacetCategoryMap.get(category));
  }
}

Fixed version (ground truth):
public void taskChanged(String packageName){
  if (mFacetPackageMap.containsKey(packageName)) {
    setCurrentFacet(mFacetPackageMap.get(packageName));
  }
  String category=getPackageCategory(packageName);
  if (category != null) {
    setCurrentFacet(mFacetCategoryMap.get(category));
  }
}
Program: 192511
Project: 192511
Buggy source:
public void setDark(boolean dark,boolean fade,long delay){
  super.setDark(dark,fade,delay);
  if (mDark == dark) {
    return;
  }
  mDark=dark;
  if (!dark && fade && !shouldHideBackground()) {
    if (mActivated) {
      mBackgroundDimmed.setVisibility(View.VISIBLE);
      mBackgroundNormal.setVisibility(View.VISIBLE);
    }
 else     if (mDimmed) {
      mBackgroundDimmed.setVisibility(View.VISIBLE);
      mBackgroundNormal.setVisibility(View.INVISIBLE);
    }
 else {
      mBackgroundDimmed.setVisibility(View.INVISIBLE);
      mBackgroundNormal.setVisibility(View.VISIBLE);
    }
    fadeInFromDark(delay);
  }
 else {
    updateBackground();
  }
  updateOutlineAlpha();
}

Fixed version (ground truth):
public void setDark(boolean dark,boolean fade,long delay){
  super.setDark(dark,fade,delay);
  if (mDark == dark) {
    return;
  }
  mDark=dark;
  updateBackground();
  if (!dark && fade && !shouldHideBackground()) {
    fadeInFromDark(delay);
  }
  updateOutlineAlpha();
}
Program: 192512
Project: 192512
Buggy source:
/** 
 * Cancels the hotspot and makes the notification inactive.
 */
public void makeInactive(boolean animate){
  if (mActivated) {
    if (mDimmed) {
      if (animate) {
        startActivateAnimation(true);
      }
 else {
        mBackgroundNormal.setVisibility(View.INVISIBLE);
      }
    }
    mActivated=false;
  }
  if (mOnActivatedListener != null) {
    mOnActivatedListener.onActivationReset(this);
  }
  removeCallbacks(mTapTimeoutRunnable);
}

Fixed version (ground truth):
/** 
 * Cancels the hotspot and makes the notification inactive.
 */
public void makeInactive(boolean animate){
  if (mActivated) {
    mActivated=false;
    if (mDimmed) {
      if (animate) {
        startActivateAnimation(true);
      }
 else {
        updateBackground();
      }
    }
  }
  if (mOnActivatedListener != null) {
    mOnActivatedListener.onActivationReset(this);
  }
  removeCallbacks(mTapTimeoutRunnable);
}
Program: 192513
Project: 192513
Buggy source:
/** 
 * Fades in the background when exiting dark mode.
 */
private void fadeInFromDark(long delay){
  final View background=mDimmed ? mBackgroundDimmed : mBackgroundNormal;
  background.setAlpha(0f);
  background.setPivotX(mBackgroundDimmed.getWidth() / 2f);
  background.setPivotY(getActualHeight() / 2f);
  background.setScaleX(DARK_EXIT_SCALE_START);
  background.setScaleY(DARK_EXIT_SCALE_START);
  background.animate().alpha(1f).scaleX(1f).scaleY(1f).setDuration(DARK_ANIMATION_LENGTH).setStartDelay(delay).setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN).setListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationCancel(    Animator animation){
      background.setScaleX(1f);
      background.setScaleY(1f);
      background.setAlpha(1f);
    }
  }
).setUpdateListener(mBackgroundVisibilityUpdater).start();
  mFadeInFromDarkAnimator=TimeAnimator.ofFloat(0.0f,1.0f);
  mFadeInFromDarkAnimator.setDuration(DARK_ANIMATION_LENGTH);
  mFadeInFromDarkAnimator.setStartDelay(delay);
  mFadeInFromDarkAnimator.setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN);
  mFadeInFromDarkAnimator.addListener(mFadeInEndListener);
  mFadeInFromDarkAnimator.addUpdateListener(mUpdateOutlineListener);
  mFadeInFromDarkAnimator.start();
}

Fixed version (ground truth):
/** 
 * Fades in the background when exiting dark mode.
 */
private void fadeInFromDark(long delay){
  final View background=mDimmed ? mBackgroundDimmed : mBackgroundNormal;
  background.setAlpha(0f);
  mBackgroundVisibilityUpdater.onAnimationUpdate(null);
  background.setPivotX(mBackgroundDimmed.getWidth() / 2f);
  background.setPivotY(getActualHeight() / 2f);
  background.setScaleX(DARK_EXIT_SCALE_START);
  background.setScaleY(DARK_EXIT_SCALE_START);
  background.animate().alpha(1f).scaleX(1f).scaleY(1f).setDuration(DARK_ANIMATION_LENGTH).setStartDelay(delay).setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN).setListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationCancel(    Animator animation){
      background.setScaleX(1f);
      background.setScaleY(1f);
      background.setAlpha(1f);
    }
  }
).setUpdateListener(mBackgroundVisibilityUpdater).start();
  mFadeInFromDarkAnimator=TimeAnimator.ofFloat(0.0f,1.0f);
  mFadeInFromDarkAnimator.setDuration(DARK_ANIMATION_LENGTH);
  mFadeInFromDarkAnimator.setStartDelay(delay);
  mFadeInFromDarkAnimator.setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN);
  mFadeInFromDarkAnimator.addListener(mFadeInEndListener);
  mFadeInFromDarkAnimator.addUpdateListener(mUpdateOutlineListener);
  mFadeInFromDarkAnimator.start();
}
Program: 192514
Project: 192514
Buggy source:
protected void updateBackground(){
  cancelFadeAnimations();
  if (shouldHideBackground()) {
    mBackgroundDimmed.setVisibility(View.INVISIBLE);
    mBackgroundNormal.setVisibility(View.INVISIBLE);
  }
 else   if (mDimmed) {
    mBackgroundDimmed.setVisibility(View.VISIBLE);
    mBackgroundNormal.setVisibility(View.INVISIBLE);
  }
 else {
    mBackgroundDimmed.setVisibility(View.INVISIBLE);
    mBackgroundNormal.setVisibility(View.VISIBLE);
    mBackgroundNormal.setAlpha(1f);
    removeCallbacks(mTapTimeoutRunnable);
  }
  setNormalBackgroundVisibilityAmount(mBackgroundNormal.getVisibility() == View.VISIBLE ? 1.0f : 0.0f);
}

Fixed version (ground truth):
protected void updateBackground(){
  cancelFadeAnimations();
  if (shouldHideBackground()) {
    mBackgroundDimmed.setVisibility(View.INVISIBLE);
    mBackgroundNormal.setVisibility(View.INVISIBLE);
  }
 else   if (mDimmed) {
    mBackgroundDimmed.setVisibility(View.VISIBLE);
    mBackgroundNormal.setVisibility(mActivated ? View.VISIBLE : View.INVISIBLE);
  }
 else {
    mBackgroundDimmed.setVisibility(View.INVISIBLE);
    mBackgroundNormal.setVisibility(View.VISIBLE);
    mBackgroundNormal.setAlpha(1f);
    removeCallbacks(mTapTimeoutRunnable);
    makeInactive(false);
  }
  setNormalBackgroundVisibilityAmount(mBackgroundNormal.getVisibility() == View.VISIBLE ? 1.0f : 0.0f);
}
Program: 192515
Project: 192515
Buggy source:
/** 
 * Fades the background when the dimmed state changes.
 */
private void fadeDimmedBackground(){
  mBackgroundDimmed.animate().cancel();
  mBackgroundNormal.animate().cancel();
  if (!shouldHideBackground()) {
    if (mDimmed) {
      mBackgroundDimmed.setVisibility(View.VISIBLE);
    }
 else {
      mBackgroundNormal.setVisibility(View.VISIBLE);
    }
  }
  float startAlpha=mDimmed ? 1f : 0;
  float endAlpha=mDimmed ? 0 : 1f;
  int duration=BACKGROUND_ANIMATION_LENGTH_MS;
  if (mBackgroundAnimator != null) {
    startAlpha=(Float)mBackgroundAnimator.getAnimatedValue();
    duration=(int)mBackgroundAnimator.getCurrentPlayTime();
    mBackgroundAnimator.removeAllListeners();
    mBackgroundAnimator.cancel();
    if (duration <= 0) {
      updateBackground();
      return;
    }
  }
  mBackgroundNormal.setAlpha(startAlpha);
  mBackgroundAnimator=ObjectAnimator.ofFloat(mBackgroundNormal,View.ALPHA,startAlpha,endAlpha);
  mBackgroundAnimator.setInterpolator(Interpolators.FAST_OUT_SLOW_IN);
  mBackgroundAnimator.setDuration(duration);
  mBackgroundAnimator.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationEnd(    Animator animation){
      if (mDimmed) {
        mBackgroundNormal.setVisibility(View.INVISIBLE);
      }
 else {
        mBackgroundDimmed.setVisibility(View.INVISIBLE);
      }
      mBackgroundAnimator=null;
    }
  }
);
  mBackgroundAnimator.addUpdateListener(mBackgroundVisibilityUpdater);
  mBackgroundAnimator.start();
}

Fixed version (ground truth):
/** 
 * Fades the background when the dimmed state changes.
 */
private void fadeDimmedBackground(){
  mBackgroundDimmed.animate().cancel();
  mBackgroundNormal.animate().cancel();
  if (mActivated) {
    updateBackground();
    return;
  }
  if (!shouldHideBackground()) {
    if (mDimmed) {
      mBackgroundDimmed.setVisibility(View.VISIBLE);
    }
 else {
      mBackgroundNormal.setVisibility(View.VISIBLE);
    }
  }
  float startAlpha=mDimmed ? 1f : 0;
  float endAlpha=mDimmed ? 0 : 1f;
  int duration=BACKGROUND_ANIMATION_LENGTH_MS;
  if (mBackgroundAnimator != null) {
    startAlpha=(Float)mBackgroundAnimator.getAnimatedValue();
    duration=(int)mBackgroundAnimator.getCurrentPlayTime();
    mBackgroundAnimator.removeAllListeners();
    mBackgroundAnimator.cancel();
    if (duration <= 0) {
      updateBackground();
      return;
    }
  }
  mBackgroundNormal.setAlpha(startAlpha);
  mBackgroundAnimator=ObjectAnimator.ofFloat(mBackgroundNormal,View.ALPHA,startAlpha,endAlpha);
  mBackgroundAnimator.setInterpolator(Interpolators.FAST_OUT_SLOW_IN);
  mBackgroundAnimator.setDuration(duration);
  mBackgroundAnimator.addListener(new AnimatorListenerAdapter(){
    @Override public void onAnimationEnd(    Animator animation){
      updateBackground();
      mBackgroundAnimator=null;
    }
  }
);
  mBackgroundAnimator.addUpdateListener(mBackgroundVisibilityUpdater);
  mBackgroundAnimator.start();
}
Program: 192516
Project: 192516
Buggy source:
void finishInstrumentationLocked(ProcessRecord app,int resultCode,Bundle results){
  if (app.instrumentationWatcher != null) {
    try {
      app.instrumentationWatcher.instrumentationFinished(app.instrumentationClass,resultCode,results);
    }
 catch (    RemoteException e) {
    }
  }
  if (app.instrumentationUiAutomationConnection != null) {
    mHandler.obtainMessage(SHUTDOWN_UI_AUTOMATION_CONNECTION_MSG,app.instrumentationUiAutomationConnection).sendToTarget();
  }
  app.instrumentationWatcher=null;
  app.instrumentationUiAutomationConnection=null;
  app.instrumentationClass=null;
  app.instrumentationInfo=null;
  app.instrumentationProfileFile=null;
  app.instrumentationArguments=null;
  forceStopPackageLocked(app.info.packageName,-1,false,false,true,true,false,app.userId,"String_Node_Str");
}

Fixed version (ground truth):
void finishInstrumentationLocked(ProcessRecord app,int resultCode,Bundle results){
  if (app.instrumentationWatcher != null) {
    mInstrumentationReporter.reportFinished(app.instrumentationWatcher,app.instrumentationClass,resultCode,results);
  }
  if (app.instrumentationUiAutomationConnection != null) {
    mHandler.obtainMessage(SHUTDOWN_UI_AUTOMATION_CONNECTION_MSG,app.instrumentationUiAutomationConnection).sendToTarget();
  }
  app.instrumentationWatcher=null;
  app.instrumentationUiAutomationConnection=null;
  app.instrumentationClass=null;
  app.instrumentationInfo=null;
  app.instrumentationProfileFile=null;
  app.instrumentationArguments=null;
  forceStopPackageLocked(app.info.packageName,-1,false,false,true,true,false,app.userId,"String_Node_Str");
}
Program: 192518
Project: 192518
Buggy source:
public Bitmap peekWallpaperBitmap(Context context,boolean returnDefault,int userId){
synchronized (this) {
    if (mService != null) {
      try {
        if (!mService.isWallpaperSupported(context.getOpPackageName())) {
          return null;
        }
      }
 catch (      RemoteException e) {
        throw e.rethrowFromSystemServer();
      }
    }
    if (mWallpaper != null) {
      return mWallpaper;
    }
    if (mDefaultWallpaper != null) {
      return mDefaultWallpaper;
    }
    mWallpaper=null;
    try {
      mWallpaper=getCurrentWallpaperLocked(userId);
    }
 catch (    OutOfMemoryError e) {
      Log.w(TAG,"String_Node_Str",e);
    }
    if (returnDefault) {
      if (mWallpaper == null) {
        mDefaultWallpaper=getDefaultWallpaperLocked(context);
        return mDefaultWallpaper;
      }
 else {
        mDefaultWallpaper=null;
      }
    }
    return mWallpaper;
  }
}

Fixed version (ground truth):
public Bitmap peekWallpaperBitmap(Context context,boolean returnDefault,int userId){
synchronized (this) {
    if (mService != null) {
      try {
        if (!mService.isWallpaperSupported(context.getOpPackageName())) {
          return null;
        }
      }
 catch (      RemoteException e) {
        throw e.rethrowFromSystemServer();
      }
    }
    if (mCachedWallpaper != null && mCachedWallpaperUserId == userId) {
      return mCachedWallpaper;
    }
    mCachedWallpaper=null;
    mCachedWallpaperUserId=0;
    try {
      mCachedWallpaper=getCurrentWallpaperLocked(userId);
      mCachedWallpaperUserId=userId;
    }
 catch (    OutOfMemoryError e) {
      Log.w(TAG,"String_Node_Str",e);
    }
    if (mCachedWallpaper != null) {
      return mCachedWallpaper;
    }
    if (returnDefault) {
      if (mDefaultWallpaper == null) {
        mDefaultWallpaper=getDefaultWallpaperLocked(context);
      }
      return mDefaultWallpaper;
    }
    return null;
  }
}
Program: 192519
Project: 192519
Buggy source:
private void handlePulseWhileDozing(@NonNull PulseCallback callback,int reason){
  mDozeScrimController.pulse(callback,reason);
}

Fixed version (ground truth):
private void handlePulseWhileDozing(@NonNull PulseCallback callback,int reason){
  mDozeScrimController.pulse(new PulseCallback(){
    @Override public void onPulseStarted(){
      callback.onPulseStarted();
      mStackScroller.setPulsing(true);
    }
    @Override public void onPulseFinished(){
      callback.onPulseFinished();
      mStackScroller.setPulsing(false);
    }
  }
,reason);
}
Program: 192520
Project: 192520
Buggy source:
private void updateNotificationAnimationStates(){
  boolean running=mAnimationsEnabled;
  int childCount=getChildCount();
  for (int i=0; i < childCount; i++) {
    View child=getChildAt(i);
    running&=mIsExpanded || isPinnedHeadsUp(child);
    updateAnimationState(running,child);
  }
}

Fixed version (ground truth):
private void updateNotificationAnimationStates(){
  boolean running=mAnimationsEnabled || mPulsing;
  int childCount=getChildCount();
  for (int i=0; i < childCount; i++) {
    View child=getChildAt(i);
    running&=mIsExpanded || isPinnedHeadsUp(child);
    updateAnimationState(running,child);
  }
}
Program: 192521
Project: 192521
Buggy source:
private void handlePulseWhileDozing(@NonNull PulseCallback callback,int reason){
  mDozeScrimController.pulse(callback,reason);
}

Fixed version (ground truth):
private void handlePulseWhileDozing(@NonNull PulseCallback callback,int reason){
  mDozeScrimController.pulse(new PulseCallback(){
    @Override public void onPulseStarted(){
      callback.onPulseStarted();
      mStackScroller.setPulsing(true);
    }
    @Override public void onPulseFinished(){
      callback.onPulseFinished();
      mStackScroller.setPulsing(false);
    }
  }
,reason);
}
Program: 192522
Project: 192522
Buggy source:
private void updateNotificationAnimationStates(){
  boolean running=mAnimationsEnabled;
  int childCount=getChildCount();
  for (int i=0; i < childCount; i++) {
    View child=getChildAt(i);
    running&=mIsExpanded || isPinnedHeadsUp(child);
    updateAnimationState(running,child);
  }
}

Fixed version (ground truth):
private void updateNotificationAnimationStates(){
  boolean running=mAnimationsEnabled || mPulsing;
  int childCount=getChildCount();
  for (int i=0; i < childCount; i++) {
    View child=getChildAt(i);
    running&=mIsExpanded || isPinnedHeadsUp(child);
    updateAnimationState(running,child);
  }
}
Program: 192524
Project: 192524
Buggy source:
void finishInstrumentationLocked(ProcessRecord app,int resultCode,Bundle results){
  if (app.instrumentationWatcher != null) {
    try {
      app.instrumentationWatcher.instrumentationFinished(app.instrumentationClass,resultCode,results);
    }
 catch (    RemoteException e) {
    }
  }
  if (app.instrumentationUiAutomationConnection != null) {
    mHandler.obtainMessage(SHUTDOWN_UI_AUTOMATION_CONNECTION_MSG,app.instrumentationUiAutomationConnection).sendToTarget();
  }
  app.instrumentationWatcher=null;
  app.instrumentationUiAutomationConnection=null;
  app.instrumentationClass=null;
  app.instrumentationInfo=null;
  app.instrumentationProfileFile=null;
  app.instrumentationArguments=null;
  forceStopPackageLocked(app.info.packageName,-1,false,false,true,true,false,app.userId,"String_Node_Str");
}

Fixed version (ground truth):
void finishInstrumentationLocked(ProcessRecord app,int resultCode,Bundle results){
  if (app.instrumentationWatcher != null) {
    mInstrumentationReporter.reportFinished(app.instrumentationWatcher,app.instrumentationClass,resultCode,results);
  }
  if (app.instrumentationUiAutomationConnection != null) {
    mHandler.obtainMessage(SHUTDOWN_UI_AUTOMATION_CONNECTION_MSG,app.instrumentationUiAutomationConnection).sendToTarget();
  }
  app.instrumentationWatcher=null;
  app.instrumentationUiAutomationConnection=null;
  app.instrumentationClass=null;
  app.instrumentationInfo=null;
  app.instrumentationProfileFile=null;
  app.instrumentationArguments=null;
  forceStopPackageLocked(app.info.packageName,-1,false,false,true,true,false,app.userId,"String_Node_Str");
}
Program: 192526
Project: 192526
Buggy source:
private void onFacetClicked(int index){
  Intent intent=mIntents.get(index);
  String packageName=intent.getPackage();
  if (packageName == null) {
    return;
  }
  if (packageName.equals(mCurrentPackageName) && index == mCurrentFacetIndex) {
    return;
  }
  intent.putExtra(EXTRA_FACET_CATEGORIES,mFacetCategories.get(index));
  intent.putExtra(EXTRA_FACET_PACKAGES,mFacetPackages.get(index));
  intent.putExtra(EXTRA_FACET_ID,Integer.toString(index));
  intent.putExtra(EXTRA_FACET_LAUNCH_PICKER,index == mCurrentFacetIndex);
  setCurrentFacet(index);
  startActivity(intent);
}

Fixed version (ground truth):
private void onFacetClicked(int index){
  Intent intent=mIntents.get(index);
  String packageName=intent.getPackage();
  if (packageName == null) {
    return;
  }
  intent.putExtra(EXTRA_FACET_CATEGORIES,mFacetCategories.get(index));
  intent.putExtra(EXTRA_FACET_PACKAGES,mFacetPackages.get(index));
  intent.putExtra(EXTRA_FACET_ID,Integer.toString(index));
  intent.putExtra(EXTRA_FACET_LAUNCH_PICKER,index == mCurrentFacetIndex);
  setCurrentFacet(index);
  startActivity(intent);
}