nus-yam/ex-repair huggingface dataset:
Program: 191455
Project: 191455
Buggy source:
private void updateScrimColor(View scrim){
  float alpha1=getCurrentScrimAlpha(scrim);
  if (scrim instanceof ScrimView) {
    float alpha2=getDozeAlpha(scrim);
    float alpha=1 - (1 - alpha1) * (1 - alpha2);
    ((ScrimView)scrim).setScrimColor(Color.argb((int)(alpha * 255),0,0,0));
  }
 else {
    scrim.setAlpha(alpha1);
  }
}

Fixed version (ground truth):
private void updateScrimColor(View scrim){
  float alpha1=getCurrentScrimAlpha(scrim);
  if (scrim instanceof ScrimView) {
    float alpha2=getDozeAlpha(scrim);
    float alpha=1 - (1 - alpha1) * (1 - alpha2);
    alpha=Math.max(0,Math.min(1.0f,alpha));
    ((ScrimView)scrim).setScrimColor(Color.argb((int)(alpha * 255),0,0,0));
  }
 else {
    scrim.setAlpha(alpha1);
  }
}
Program: 191456
Project: 191456
Buggy source:
/** 
 * @return true if the notification will show the time or the chronometer; falseotherwise
 * @hide
 */
public boolean showsTimeOrChronometer(){
  return when != 0 && extras.getBoolean(EXTRA_SHOW_WHEN);
}

Fixed version (ground truth):
/** 
 * @return true if the built notification will show the time or the chronometer; falseotherwise
 */
private boolean showsTimeOrChronometer(){
  return mN.showsTime() || mN.showsChronometer();
}
Program: 191457
Project: 191457
Buggy source:
private void sanitizeHeader(NotificationHeaderView rowHeader){
  if (rowHeader == null) {
    return;
  }
  final int childCount=rowHeader.getChildCount();
  View time=rowHeader.findViewById(com.android.internal.R.id.time);
  boolean hasVisibleText=false;
  for (int i=1; i < childCount - 1; i++) {
    View child=rowHeader.getChildAt(i);
    if (child instanceof TextView && child.getVisibility() != View.GONE && !mDividers.contains(Integer.valueOf(child.getId())) && child != time) {
      hasVisibleText=true;
      break;
    }
  }
  int timeVisibility=!hasVisibleText || mRow.getStatusBarNotification().getNotification().showsTimeOrChronometer() ? View.VISIBLE : View.GONE;
  time.setVisibility(timeVisibility);
  View left=null;
  View right;
  for (int i=1; i < childCount - 1; i++) {
    View child=rowHeader.getChildAt(i);
    if (mDividers.contains(Integer.valueOf(child.getId()))) {
      boolean visible=false;
      for (i++; i < childCount - 1; i++) {
        right=rowHeader.getChildAt(i);
        if (mDividers.contains(Integer.valueOf(right.getId()))) {
          i--;
          break;
        }
 else         if (right.getVisibility() != View.GONE && right instanceof TextView) {
          visible=left != null;
          left=right;
          break;
        }
      }
      child.setVisibility(visible ? View.VISIBLE : View.GONE);
    }
 else     if (child.getVisibility() != View.GONE && child instanceof TextView) {
      left=child;
    }
  }
}

Fixed version (ground truth):
private void sanitizeHeader(NotificationHeaderView rowHeader){
  if (rowHeader == null) {
    return;
  }
  final int childCount=rowHeader.getChildCount();
  View time=rowHeader.findViewById(com.android.internal.R.id.time);
  boolean hasVisibleText=false;
  for (int i=1; i < childCount - 1; i++) {
    View child=rowHeader.getChildAt(i);
    if (child instanceof TextView && child.getVisibility() != View.GONE && !mDividers.contains(Integer.valueOf(child.getId())) && child != time) {
      hasVisibleText=true;
      break;
    }
  }
  int timeVisibility=!hasVisibleText || mRow.getStatusBarNotification().getNotification().showsTime() ? View.VISIBLE : View.GONE;
  time.setVisibility(timeVisibility);
  View left=null;
  View right;
  for (int i=1; i < childCount - 1; i++) {
    View child=rowHeader.getChildAt(i);
    if (mDividers.contains(Integer.valueOf(child.getId()))) {
      boolean visible=false;
      for (i++; i < childCount - 1; i++) {
        right=rowHeader.getChildAt(i);
        if (mDividers.contains(Integer.valueOf(right.getId()))) {
          i--;
          break;
        }
 else         if (right.getVisibility() != View.GONE && right instanceof TextView) {
          visible=left != null;
          left=right;
          break;
        }
      }
      child.setVisibility(visible ? View.VISIBLE : View.GONE);
    }
 else     if (child.getVisibility() != View.GONE && child instanceof TextView) {
      left=child;
    }
  }
}
Program: 191458
Project: 191458
Buggy source:
private String generateDeleteMessage(final List<DocumentInfo> docs){
  String message;
  int dirsCount=0;
  for (  DocumentInfo doc : docs) {
    if (doc.isDirectory()) {
      ++dirsCount;
    }
  }
  if (docs.size() == 1) {
    message=dirsCount == 0 ? getActivity().getString(R.string.delete_filename_confirmation_message,docs.get(0).displayName) : getActivity().getString(R.string.delete_foldername_confirmation_message,docs.get(0).displayName);
  }
 else   if (dirsCount == 0) {
    message=Shared.getQuantityString(getActivity(),R.plurals.delete_files_confirmation_message,docs.size());
  }
 else   if (dirsCount == docs.size()) {
    message=Shared.getQuantityString(getActivity(),R.plurals.delete_folders_confirmation_message,docs.size());
  }
 else {
    message=Shared.getQuantityString(getActivity(),R.plurals.delete_items_confirmation_message,docs.size());
  }
  return message;
}

Fixed version (ground truth):
private String generateDeleteMessage(final List<DocumentInfo> docs){
  String message;
  int dirsCount=0;
  for (  DocumentInfo doc : docs) {
    if (doc.isDirectory()) {
      ++dirsCount;
    }
  }
  if (docs.size() == 1) {
    String displayName=BidiFormatter.getInstance().unicodeWrap(docs.get(0).displayName);
    message=dirsCount == 0 ? getActivity().getString(R.string.delete_filename_confirmation_message,displayName) : getActivity().getString(R.string.delete_foldername_confirmation_message,displayName);
  }
 else   if (dirsCount == 0) {
    message=Shared.getQuantityString(getActivity(),R.plurals.delete_files_confirmation_message,docs.size());
  }
 else   if (dirsCount == docs.size()) {
    message=Shared.getQuantityString(getActivity(),R.plurals.delete_folders_confirmation_message,docs.size());
  }
 else {
    message=Shared.getQuantityString(getActivity(),R.plurals.delete_items_confirmation_message,docs.size());
  }
  return message;
}
Program: 191459
Project: 191459
Buggy source:
/** 
 * @return true if the notification will show the time or the chronometer; falseotherwise
 * @hide
 */
public boolean showsTimeOrChronometer(){
  return when != 0 && extras.getBoolean(EXTRA_SHOW_WHEN);
}

Fixed version (ground truth):
/** 
 * @return true if the built notification will show the time or the chronometer; falseotherwise
 */
private boolean showsTimeOrChronometer(){
  return mN.showsTime() || mN.showsChronometer();
}
Program: 191460
Project: 191460
Buggy source:
private void sanitizeHeader(NotificationHeaderView rowHeader){
  if (rowHeader == null) {
    return;
  }
  final int childCount=rowHeader.getChildCount();
  View time=rowHeader.findViewById(com.android.internal.R.id.time);
  boolean hasVisibleText=false;
  for (int i=1; i < childCount - 1; i++) {
    View child=rowHeader.getChildAt(i);
    if (child instanceof TextView && child.getVisibility() != View.GONE && !mDividers.contains(Integer.valueOf(child.getId())) && child != time) {
      hasVisibleText=true;
      break;
    }
  }
  int timeVisibility=!hasVisibleText || mRow.getStatusBarNotification().getNotification().showsTimeOrChronometer() ? View.VISIBLE : View.GONE;
  time.setVisibility(timeVisibility);
  View left=null;
  View right;
  for (int i=1; i < childCount - 1; i++) {
    View child=rowHeader.getChildAt(i);
    if (mDividers.contains(Integer.valueOf(child.getId()))) {
      boolean visible=false;
      for (i++; i < childCount - 1; i++) {
        right=rowHeader.getChildAt(i);
        if (mDividers.contains(Integer.valueOf(right.getId()))) {
          i--;
          break;
        }
 else         if (right.getVisibility() != View.GONE && right instanceof TextView) {
          visible=left != null;
          left=right;
          break;
        }
      }
      child.setVisibility(visible ? View.VISIBLE : View.GONE);
    }
 else     if (child.getVisibility() != View.GONE && child instanceof TextView) {
      left=child;
    }
  }
}

Fixed version (ground truth):
private void sanitizeHeader(NotificationHeaderView rowHeader){
  if (rowHeader == null) {
    return;
  }
  final int childCount=rowHeader.getChildCount();
  View time=rowHeader.findViewById(com.android.internal.R.id.time);
  boolean hasVisibleText=false;
  for (int i=1; i < childCount - 1; i++) {
    View child=rowHeader.getChildAt(i);
    if (child instanceof TextView && child.getVisibility() != View.GONE && !mDividers.contains(Integer.valueOf(child.getId())) && child != time) {
      hasVisibleText=true;
      break;
    }
  }
  int timeVisibility=!hasVisibleText || mRow.getStatusBarNotification().getNotification().showsTime() ? View.VISIBLE : View.GONE;
  time.setVisibility(timeVisibility);
  View left=null;
  View right;
  for (int i=1; i < childCount - 1; i++) {
    View child=rowHeader.getChildAt(i);
    if (mDividers.contains(Integer.valueOf(child.getId()))) {
      boolean visible=false;
      for (i++; i < childCount - 1; i++) {
        right=rowHeader.getChildAt(i);
        if (mDividers.contains(Integer.valueOf(right.getId()))) {
          i--;
          break;
        }
 else         if (right.getVisibility() != View.GONE && right instanceof TextView) {
          visible=left != null;
          left=right;
          break;
        }
      }
      child.setVisibility(visible ? View.VISIBLE : View.GONE);
    }
 else     if (child.getVisibility() != View.GONE && child instanceof TextView) {
      left=child;
    }
  }
}
Program: 191461
Project: 191461
Buggy source:
/** 
 * Set this view to count down to the base instead of counting up from it.
 * @param countDown whether this view should count down
 * @see #setBase(long)
 */
@android.view.RemotableViewMethod public void setCountDown(boolean countDown){
  mCountDown=countDown;
}

Fixed version (ground truth):
/** 
 * Set this view to count down to the base instead of counting up from it.
 * @param countDown whether this view should count down
 * @see #setBase(long)
 */
@android.view.RemotableViewMethod public void setCountDown(boolean countDown){
  mCountDown=countDown;
  updateText(SystemClock.elapsedRealtime());
}
Program: 191462
Project: 191462
Buggy source:
private String generateDeleteMessage(final List<DocumentInfo> docs){
  String message;
  int dirsCount=0;
  for (  DocumentInfo doc : docs) {
    if (doc.isDirectory()) {
      ++dirsCount;
    }
  }
  if (docs.size() == 1) {
    message=dirsCount == 0 ? getActivity().getString(R.string.delete_filename_confirmation_message,docs.get(0).displayName) : getActivity().getString(R.string.delete_foldername_confirmation_message,docs.get(0).displayName);
  }
 else   if (dirsCount == 0) {
    message=Shared.getQuantityString(getActivity(),R.plurals.delete_files_confirmation_message,docs.size());
  }
 else   if (dirsCount == docs.size()) {
    message=Shared.getQuantityString(getActivity(),R.plurals.delete_folders_confirmation_message,docs.size());
  }
 else {
    message=Shared.getQuantityString(getActivity(),R.plurals.delete_items_confirmation_message,docs.size());
  }
  return message;
}

Fixed version (ground truth):
private String generateDeleteMessage(final List<DocumentInfo> docs){
  String message;
  int dirsCount=0;
  for (  DocumentInfo doc : docs) {
    if (doc.isDirectory()) {
      ++dirsCount;
    }
  }
  if (docs.size() == 1) {
    String displayName=BidiFormatter.getInstance().unicodeWrap(docs.get(0).displayName);
    message=dirsCount == 0 ? getActivity().getString(R.string.delete_filename_confirmation_message,displayName) : getActivity().getString(R.string.delete_foldername_confirmation_message,displayName);
  }
 else   if (dirsCount == 0) {
    message=Shared.getQuantityString(getActivity(),R.plurals.delete_files_confirmation_message,docs.size());
  }
 else   if (dirsCount == docs.size()) {
    message=Shared.getQuantityString(getActivity(),R.plurals.delete_folders_confirmation_message,docs.size());
  }
 else {
    message=Shared.getQuantityString(getActivity(),R.plurals.delete_items_confirmation_message,docs.size());
  }
  return message;
}
Program: 191463
Project: 191463
Buggy source:
private String generateDeleteMessage(final List<DocumentInfo> docs){
  String message;
  int dirsCount=0;
  for (  DocumentInfo doc : docs) {
    if (doc.isDirectory()) {
      ++dirsCount;
    }
  }
  if (docs.size() == 1) {
    message=dirsCount == 0 ? getActivity().getString(R.string.delete_filename_confirmation_message,docs.get(0).displayName) : getActivity().getString(R.string.delete_foldername_confirmation_message,docs.get(0).displayName);
  }
 else   if (dirsCount == 0) {
    message=Shared.getQuantityString(getActivity(),R.plurals.delete_files_confirmation_message,docs.size());
  }
 else   if (dirsCount == docs.size()) {
    message=Shared.getQuantityString(getActivity(),R.plurals.delete_folders_confirmation_message,docs.size());
  }
 else {
    message=Shared.getQuantityString(getActivity(),R.plurals.delete_items_confirmation_message,docs.size());
  }
  return message;
}

Fixed version (ground truth):
private String generateDeleteMessage(final List<DocumentInfo> docs){
  String message;
  int dirsCount=0;
  for (  DocumentInfo doc : docs) {
    if (doc.isDirectory()) {
      ++dirsCount;
    }
  }
  if (docs.size() == 1) {
    String displayName=BidiFormatter.getInstance().unicodeWrap(docs.get(0).displayName);
    message=dirsCount == 0 ? getActivity().getString(R.string.delete_filename_confirmation_message,displayName) : getActivity().getString(R.string.delete_foldername_confirmation_message,displayName);
  }
 else   if (dirsCount == 0) {
    message=Shared.getQuantityString(getActivity(),R.plurals.delete_files_confirmation_message,docs.size());
  }
 else   if (dirsCount == docs.size()) {
    message=Shared.getQuantityString(getActivity(),R.plurals.delete_folders_confirmation_message,docs.size());
  }
 else {
    message=Shared.getQuantityString(getActivity(),R.plurals.delete_items_confirmation_message,docs.size());
  }
  return message;
}
Program: 191464
Project: 191464
Buggy source:
/** 
 * Ensures that grouped notification receive their special treatment. <p>Cancels group children if the new notification causes a group to lose its summary.</p> <p>Updates mSummaryByGroupKey.</p>
 */
private void handleGroupedNotificationLocked(NotificationRecord r,NotificationRecord old,int callingUid,int callingPid){
  StatusBarNotification sbn=r.sbn;
  Notification n=sbn.getNotification();
  String group=sbn.getGroupKey();
  boolean isSummary=n.isGroupSummary();
  Notification oldN=old != null ? old.sbn.getNotification() : null;
  String oldGroup=old != null ? old.sbn.getGroupKey() : null;
  boolean oldIsSummary=old != null && oldN.isGroupSummary();
  if (oldIsSummary) {
    NotificationRecord removedSummary=mSummaryByGroupKey.remove(oldGroup);
    if (removedSummary != old) {
      String removedKey=removedSummary != null ? removedSummary.getKey() : "String_Node_Str";
      Slog.w(TAG,"String_Node_Str" + old.getKey() + "String_Node_Str"+ removedKey);
    }
  }
  if (isSummary) {
    mSummaryByGroupKey.put(group,r);
  }
  if (oldIsSummary && (!isSummary || !oldGroup.equals(group))) {
    cancelGroupChildrenLocked(old,callingUid,callingPid,null,REASON_GROUP_SUMMARY_CANCELED);
  }
}

Fixed version (ground truth):
/** 
 * Ensures that grouped notification receive their special treatment. <p>Cancels group children if the new notification causes a group to lose its summary.</p> <p>Updates mSummaryByGroupKey.</p>
 */
private void handleGroupedNotificationLocked(NotificationRecord r,NotificationRecord old,int callingUid,int callingPid){
  StatusBarNotification sbn=r.sbn;
  Notification n=sbn.getNotification();
  if (n.isGroupSummary() && !sbn.isAppGroup()) {
    n.flags&=~Notification.FLAG_GROUP_SUMMARY;
  }
  String group=sbn.getGroupKey();
  boolean isSummary=n.isGroupSummary();
  Notification oldN=old != null ? old.sbn.getNotification() : null;
  String oldGroup=old != null ? old.sbn.getGroupKey() : null;
  boolean oldIsSummary=old != null && oldN.isGroupSummary();
  if (oldIsSummary) {
    NotificationRecord removedSummary=mSummaryByGroupKey.remove(oldGroup);
    if (removedSummary != old) {
      String removedKey=removedSummary != null ? removedSummary.getKey() : "String_Node_Str";
      Slog.w(TAG,"String_Node_Str" + old.getKey() + "String_Node_Str"+ removedKey);
    }
  }
  if (isSummary) {
    mSummaryByGroupKey.put(group,r);
  }
  if (oldIsSummary && (!isSummary || !oldGroup.equals(group))) {
    cancelGroupChildrenLocked(old,callingUid,callingPid,null,REASON_GROUP_SUMMARY_CANCELED);
  }
}
Program: 191466
Project: 191466
Buggy source:
public void copyRankingInformation(NotificationRecord previous){
  mContactAffinity=previous.mContactAffinity;
  mRecentlyIntrusive=previous.mRecentlyIntrusive;
  mPackagePriority=previous.mPackagePriority;
  mPackageVisibility=previous.mPackageVisibility;
  mIntercept=previous.mIntercept;
  mRankingTimeMs=calculateRankingTimeMs(previous.getRankingTimeMs());
  mCreationTimeMs=previous.mCreationTimeMs;
  mVisibleSinceMs=previous.mVisibleSinceMs;
  if (previous.sbn.getOverrideGroupKey() != null) {
    sbn.setOverrideGroupKey(previous.sbn.getOverrideGroupKey());
  }
}

Fixed version (ground truth):
public void copyRankingInformation(NotificationRecord previous){
  mContactAffinity=previous.mContactAffinity;
  mRecentlyIntrusive=previous.mRecentlyIntrusive;
  mPackagePriority=previous.mPackagePriority;
  mPackageVisibility=previous.mPackageVisibility;
  mIntercept=previous.mIntercept;
  mRankingTimeMs=calculateRankingTimeMs(previous.getRankingTimeMs());
  mCreationTimeMs=previous.mCreationTimeMs;
  mVisibleSinceMs=previous.mVisibleSinceMs;
  if (previous.sbn.getOverrideGroupKey() != null && !sbn.isAppGroup()) {
    sbn.setOverrideGroupKey(previous.sbn.getOverrideGroupKey());
  }
}
Program: 191467
Project: 191467
Buggy source:
/** 
 * @return true if the notification will show the time or the chronometer; falseotherwise
 * @hide
 */
public boolean showsTimeOrChronometer(){
  return when != 0 && extras.getBoolean(EXTRA_SHOW_WHEN);
}

Fixed version (ground truth):
/** 
 * @return true if the built notification will show the time or the chronometer; falseotherwise
 */
private boolean showsTimeOrChronometer(){
  return mN.showsTime() || mN.showsChronometer();
}
Program: 191468
Project: 191468
Buggy source:
private void sanitizeHeader(NotificationHeaderView rowHeader){
  if (rowHeader == null) {
    return;
  }
  final int childCount=rowHeader.getChildCount();
  View time=rowHeader.findViewById(com.android.internal.R.id.time);
  boolean hasVisibleText=false;
  for (int i=1; i < childCount - 1; i++) {
    View child=rowHeader.getChildAt(i);
    if (child instanceof TextView && child.getVisibility() != View.GONE && !mDividers.contains(Integer.valueOf(child.getId())) && child != time) {
      hasVisibleText=true;
      break;
    }
  }
  int timeVisibility=!hasVisibleText || mRow.getStatusBarNotification().getNotification().showsTimeOrChronometer() ? View.VISIBLE : View.GONE;
  time.setVisibility(timeVisibility);
  View left=null;
  View right;
  for (int i=1; i < childCount - 1; i++) {
    View child=rowHeader.getChildAt(i);
    if (mDividers.contains(Integer.valueOf(child.getId()))) {
      boolean visible=false;
      for (i++; i < childCount - 1; i++) {
        right=rowHeader.getChildAt(i);
        if (mDividers.contains(Integer.valueOf(right.getId()))) {
          i--;
          break;
        }
 else         if (right.getVisibility() != View.GONE && right instanceof TextView) {
          visible=left != null;
          left=right;
          break;
        }
      }
      child.setVisibility(visible ? View.VISIBLE : View.GONE);
    }
 else     if (child.getVisibility() != View.GONE && child instanceof TextView) {
      left=child;
    }
  }
}

Fixed version (ground truth):
private void sanitizeHeader(NotificationHeaderView rowHeader){
  if (rowHeader == null) {
    return;
  }
  final int childCount=rowHeader.getChildCount();
  View time=rowHeader.findViewById(com.android.internal.R.id.time);
  boolean hasVisibleText=false;
  for (int i=1; i < childCount - 1; i++) {
    View child=rowHeader.getChildAt(i);
    if (child instanceof TextView && child.getVisibility() != View.GONE && !mDividers.contains(Integer.valueOf(child.getId())) && child != time) {
      hasVisibleText=true;
      break;
    }
  }
  int timeVisibility=!hasVisibleText || mRow.getStatusBarNotification().getNotification().showsTime() ? View.VISIBLE : View.GONE;
  time.setVisibility(timeVisibility);
  View left=null;
  View right;
  for (int i=1; i < childCount - 1; i++) {
    View child=rowHeader.getChildAt(i);
    if (mDividers.contains(Integer.valueOf(child.getId()))) {
      boolean visible=false;
      for (i++; i < childCount - 1; i++) {
        right=rowHeader.getChildAt(i);
        if (mDividers.contains(Integer.valueOf(right.getId()))) {
          i--;
          break;
        }
 else         if (right.getVisibility() != View.GONE && right instanceof TextView) {
          visible=left != null;
          left=right;
          break;
        }
      }
      child.setVisibility(visible ? View.VISIBLE : View.GONE);
    }
 else     if (child.getVisibility() != View.GONE && child instanceof TextView) {
      left=child;
    }
  }
}
Program: 191469
Project: 191469
Buggy source:
/** 
 * Set this view to count down to the base instead of counting up from it.
 * @param countDown whether this view should count down
 * @see #setBase(long)
 */
@android.view.RemotableViewMethod public void setCountDown(boolean countDown){
  mCountDown=countDown;
}

Fixed version (ground truth):
/** 
 * Set this view to count down to the base instead of counting up from it.
 * @param countDown whether this view should count down
 * @see #setBase(long)
 */
@android.view.RemotableViewMethod public void setCountDown(boolean countDown){
  mCountDown=countDown;
  updateText(SystemClock.elapsedRealtime());
}
Program: 191470
Project: 191470
Buggy source:
/** 
 * Ensures that grouped notification receive their special treatment. <p>Cancels group children if the new notification causes a group to lose its summary.</p> <p>Updates mSummaryByGroupKey.</p>
 */
private void handleGroupedNotificationLocked(NotificationRecord r,NotificationRecord old,int callingUid,int callingPid){
  StatusBarNotification sbn=r.sbn;
  Notification n=sbn.getNotification();
  String group=sbn.getGroupKey();
  boolean isSummary=n.isGroupSummary();
  Notification oldN=old != null ? old.sbn.getNotification() : null;
  String oldGroup=old != null ? old.sbn.getGroupKey() : null;
  boolean oldIsSummary=old != null && oldN.isGroupSummary();
  if (oldIsSummary) {
    NotificationRecord removedSummary=mSummaryByGroupKey.remove(oldGroup);
    if (removedSummary != old) {
      String removedKey=removedSummary != null ? removedSummary.getKey() : "String_Node_Str";
      Slog.w(TAG,"String_Node_Str" + old.getKey() + "String_Node_Str"+ removedKey);
    }
  }
  if (isSummary) {
    mSummaryByGroupKey.put(group,r);
  }
  if (oldIsSummary && (!isSummary || !oldGroup.equals(group))) {
    cancelGroupChildrenLocked(old,callingUid,callingPid,null,REASON_GROUP_SUMMARY_CANCELED);
  }
}

Fixed version (ground truth):
/** 
 * Ensures that grouped notification receive their special treatment. <p>Cancels group children if the new notification causes a group to lose its summary.</p> <p>Updates mSummaryByGroupKey.</p>
 */
private void handleGroupedNotificationLocked(NotificationRecord r,NotificationRecord old,int callingUid,int callingPid){
  StatusBarNotification sbn=r.sbn;
  Notification n=sbn.getNotification();
  if (n.isGroupSummary() && !sbn.isAppGroup()) {
    n.flags&=~Notification.FLAG_GROUP_SUMMARY;
  }
  String group=sbn.getGroupKey();
  boolean isSummary=n.isGroupSummary();
  Notification oldN=old != null ? old.sbn.getNotification() : null;
  String oldGroup=old != null ? old.sbn.getGroupKey() : null;
  boolean oldIsSummary=old != null && oldN.isGroupSummary();
  if (oldIsSummary) {
    NotificationRecord removedSummary=mSummaryByGroupKey.remove(oldGroup);
    if (removedSummary != old) {
      String removedKey=removedSummary != null ? removedSummary.getKey() : "String_Node_Str";
      Slog.w(TAG,"String_Node_Str" + old.getKey() + "String_Node_Str"+ removedKey);
    }
  }
  if (isSummary) {
    mSummaryByGroupKey.put(group,r);
  }
  if (oldIsSummary && (!isSummary || !oldGroup.equals(group))) {
    cancelGroupChildrenLocked(old,callingUid,callingPid,null,REASON_GROUP_SUMMARY_CANCELED);
  }
}
Program: 191472
Project: 191472
Buggy source:
public void copyRankingInformation(NotificationRecord previous){
  mContactAffinity=previous.mContactAffinity;
  mRecentlyIntrusive=previous.mRecentlyIntrusive;
  mPackagePriority=previous.mPackagePriority;
  mPackageVisibility=previous.mPackageVisibility;
  mIntercept=previous.mIntercept;
  mRankingTimeMs=calculateRankingTimeMs(previous.getRankingTimeMs());
  mCreationTimeMs=previous.mCreationTimeMs;
  mVisibleSinceMs=previous.mVisibleSinceMs;
  if (previous.sbn.getOverrideGroupKey() != null) {
    sbn.setOverrideGroupKey(previous.sbn.getOverrideGroupKey());
  }
}

Fixed version (ground truth):
public void copyRankingInformation(NotificationRecord previous){
  mContactAffinity=previous.mContactAffinity;
  mRecentlyIntrusive=previous.mRecentlyIntrusive;
  mPackagePriority=previous.mPackagePriority;
  mPackageVisibility=previous.mPackageVisibility;
  mIntercept=previous.mIntercept;
  mRankingTimeMs=calculateRankingTimeMs(previous.getRankingTimeMs());
  mCreationTimeMs=previous.mCreationTimeMs;
  mVisibleSinceMs=previous.mVisibleSinceMs;
  if (previous.sbn.getOverrideGroupKey() != null && !sbn.isAppGroup()) {
    sbn.setOverrideGroupKey(previous.sbn.getOverrideGroupKey());
  }
}
Program: 191473
Project: 191473
Buggy source:
/** 
 * Ensures that grouped notification receive their special treatment. <p>Cancels group children if the new notification causes a group to lose its summary.</p> <p>Updates mSummaryByGroupKey.</p>
 */
private void handleGroupedNotificationLocked(NotificationRecord r,NotificationRecord old,int callingUid,int callingPid){
  StatusBarNotification sbn=r.sbn;
  Notification n=sbn.getNotification();
  String group=sbn.getGroupKey();
  boolean isSummary=n.isGroupSummary();
  Notification oldN=old != null ? old.sbn.getNotification() : null;
  String oldGroup=old != null ? old.sbn.getGroupKey() : null;
  boolean oldIsSummary=old != null && oldN.isGroupSummary();
  if (oldIsSummary) {
    NotificationRecord removedSummary=mSummaryByGroupKey.remove(oldGroup);
    if (removedSummary != old) {
      String removedKey=removedSummary != null ? removedSummary.getKey() : "String_Node_Str";
      Slog.w(TAG,"String_Node_Str" + old.getKey() + "String_Node_Str"+ removedKey);
    }
  }
  if (isSummary) {
    mSummaryByGroupKey.put(group,r);
  }
  if (oldIsSummary && (!isSummary || !oldGroup.equals(group))) {
    cancelGroupChildrenLocked(old,callingUid,callingPid,null,REASON_GROUP_SUMMARY_CANCELED);
  }
}

Fixed version (ground truth):
/** 
 * Ensures that grouped notification receive their special treatment. <p>Cancels group children if the new notification causes a group to lose its summary.</p> <p>Updates mSummaryByGroupKey.</p>
 */
private void handleGroupedNotificationLocked(NotificationRecord r,NotificationRecord old,int callingUid,int callingPid){
  StatusBarNotification sbn=r.sbn;
  Notification n=sbn.getNotification();
  if (n.isGroupSummary() && !sbn.isAppGroup()) {
    n.flags&=~Notification.FLAG_GROUP_SUMMARY;
  }
  String group=sbn.getGroupKey();
  boolean isSummary=n.isGroupSummary();
  Notification oldN=old != null ? old.sbn.getNotification() : null;
  String oldGroup=old != null ? old.sbn.getGroupKey() : null;
  boolean oldIsSummary=old != null && oldN.isGroupSummary();
  if (oldIsSummary) {
    NotificationRecord removedSummary=mSummaryByGroupKey.remove(oldGroup);
    if (removedSummary != old) {
      String removedKey=removedSummary != null ? removedSummary.getKey() : "String_Node_Str";
      Slog.w(TAG,"String_Node_Str" + old.getKey() + "String_Node_Str"+ removedKey);
    }
  }
  if (isSummary) {
    mSummaryByGroupKey.put(group,r);
  }
  if (oldIsSummary && (!isSummary || !oldGroup.equals(group))) {
    cancelGroupChildrenLocked(old,callingUid,callingPid,null,REASON_GROUP_SUMMARY_CANCELED);
  }
}
Program: 191475
Project: 191475
Buggy source:
public void copyRankingInformation(NotificationRecord previous){
  mContactAffinity=previous.mContactAffinity;
  mRecentlyIntrusive=previous.mRecentlyIntrusive;
  mPackagePriority=previous.mPackagePriority;
  mPackageVisibility=previous.mPackageVisibility;
  mIntercept=previous.mIntercept;
  mRankingTimeMs=calculateRankingTimeMs(previous.getRankingTimeMs());
  mCreationTimeMs=previous.mCreationTimeMs;
  mVisibleSinceMs=previous.mVisibleSinceMs;
  if (previous.sbn.getOverrideGroupKey() != null) {
    sbn.setOverrideGroupKey(previous.sbn.getOverrideGroupKey());
  }
}

Fixed version (ground truth):
public void copyRankingInformation(NotificationRecord previous){
  mContactAffinity=previous.mContactAffinity;
  mRecentlyIntrusive=previous.mRecentlyIntrusive;
  mPackagePriority=previous.mPackagePriority;
  mPackageVisibility=previous.mPackageVisibility;
  mIntercept=previous.mIntercept;
  mRankingTimeMs=calculateRankingTimeMs(previous.getRankingTimeMs());
  mCreationTimeMs=previous.mCreationTimeMs;
  mVisibleSinceMs=previous.mVisibleSinceMs;
  if (previous.sbn.getOverrideGroupKey() != null && !sbn.isAppGroup()) {
    sbn.setOverrideGroupKey(previous.sbn.getOverrideGroupKey());
  }
}
Program: 191476
Project: 191476
Buggy source:
@Override public void onAdjustedForImeChanged(boolean adjustedForIme,long animDuration) throws RemoteException {
  mView.post(() -> {
    if (mAdjustedForIme != adjustedForIme) {
      mAdjustedForIme=adjustedForIme;
      updateTouchable();
      if (animDuration > 0) {
        mView.setAdjustedForIme(adjustedForIme,animDuration);
      }
 else {
        mView.setAdjustedForIme(adjustedForIme);
      }
    }
  }
);
}

Fixed version (ground truth):
@Override public void onAdjustedForImeChanged(boolean adjustedForIme,long animDuration) throws RemoteException {
  mView.post(() -> {
    if (mAdjustedForIme != adjustedForIme) {
      mAdjustedForIme=adjustedForIme;
      updateTouchable();
      if (!mMinimized) {
        if (animDuration > 0) {
          mView.setAdjustedForIme(adjustedForIme,animDuration);
        }
 else {
          mView.setAdjustedForIme(adjustedForIme);
        }
      }
    }
  }
);
}
Program: 191477
Project: 191477
Buggy source:
void setAdjustedForIme(boolean adjustedForIme,boolean adjustedForDivider,boolean animate,WindowState imeWin,int imeHeight){
  if (mAdjustedForIme != adjustedForIme || (adjustedForIme && mImeHeight != imeHeight) || mAdjustedForDivider != adjustedForDivider) {
    if (animate) {
      startImeAdjustAnimation(adjustedForIme,adjustedForDivider,imeWin);
    }
 else {
      notifyAdjustedForImeChanged(adjustedForIme || adjustedForDivider,0);
    }
    mAdjustedForIme=adjustedForIme;
    mImeHeight=imeHeight;
    mAdjustedForDivider=adjustedForDivider;
  }
}

Fixed version (ground truth):
void setAdjustedForIme(boolean adjustedForIme,boolean adjustedForDivider,boolean animate,WindowState imeWin,int imeHeight){
  if (mAdjustedForIme != adjustedForIme || (adjustedForIme && mImeHeight != imeHeight) || mAdjustedForDivider != adjustedForDivider) {
    if (animate && !mAnimatingForMinimizedDockedStack) {
      startImeAdjustAnimation(adjustedForIme,adjustedForDivider,imeWin);
    }
 else {
      notifyAdjustedForImeChanged(adjustedForIme || adjustedForDivider,0);
    }
    mAdjustedForIme=adjustedForIme;
    mImeHeight=imeHeight;
    mAdjustedForDivider=adjustedForDivider;
  }
}
Program: 191479
Project: 191479
Buggy source:
@Override public void onAdjustedForImeChanged(boolean adjustedForIme,long animDuration) throws RemoteException {
  mView.post(() -> {
    if (mAdjustedForIme != adjustedForIme) {
      mAdjustedForIme=adjustedForIme;
      updateTouchable();
      if (animDuration > 0) {
        mView.setAdjustedForIme(adjustedForIme,animDuration);
      }
 else {
        mView.setAdjustedForIme(adjustedForIme);
      }
    }
  }
);
}

Fixed version (ground truth):
@Override public void onAdjustedForImeChanged(boolean adjustedForIme,long animDuration) throws RemoteException {
  mView.post(() -> {
    if (mAdjustedForIme != adjustedForIme) {
      mAdjustedForIme=adjustedForIme;
      updateTouchable();
      if (!mMinimized) {
        if (animDuration > 0) {
          mView.setAdjustedForIme(adjustedForIme,animDuration);
        }
 else {
          mView.setAdjustedForIme(adjustedForIme);
        }
      }
    }
  }
);
}
Program: 191480
Project: 191480
Buggy source:
void setAdjustedForIme(boolean adjustedForIme,boolean adjustedForDivider,boolean animate,WindowState imeWin,int imeHeight){
  if (mAdjustedForIme != adjustedForIme || (adjustedForIme && mImeHeight != imeHeight) || mAdjustedForDivider != adjustedForDivider) {
    if (animate) {
      startImeAdjustAnimation(adjustedForIme,adjustedForDivider,imeWin);
    }
 else {
      notifyAdjustedForImeChanged(adjustedForIme || adjustedForDivider,0);
    }
    mAdjustedForIme=adjustedForIme;
    mImeHeight=imeHeight;
    mAdjustedForDivider=adjustedForDivider;
  }
}

Fixed version (ground truth):
void setAdjustedForIme(boolean adjustedForIme,boolean adjustedForDivider,boolean animate,WindowState imeWin,int imeHeight){
  if (mAdjustedForIme != adjustedForIme || (adjustedForIme && mImeHeight != imeHeight) || mAdjustedForDivider != adjustedForDivider) {
    if (animate && !mAnimatingForMinimizedDockedStack) {
      startImeAdjustAnimation(adjustedForIme,adjustedForDivider,imeWin);
    }
 else {
      notifyAdjustedForImeChanged(adjustedForIme || adjustedForDivider,0);
    }
    mAdjustedForIme=adjustedForIme;
    mImeHeight=imeHeight;
    mAdjustedForDivider=adjustedForDivider;
  }
}
Program: 191482
Project: 191482
Buggy source:
@Override public void onAdjustedForImeChanged(boolean adjustedForIme,long animDuration) throws RemoteException {
  mView.post(() -> {
    if (mAdjustedForIme != adjustedForIme) {
      mAdjustedForIme=adjustedForIme;
      updateTouchable();
      if (animDuration > 0) {
        mView.setAdjustedForIme(adjustedForIme,animDuration);
      }
 else {
        mView.setAdjustedForIme(adjustedForIme);
      }
    }
  }
);
}

Fixed version (ground truth):
@Override public void onAdjustedForImeChanged(boolean adjustedForIme,long animDuration) throws RemoteException {
  mView.post(() -> {
    if (mAdjustedForIme != adjustedForIme) {
      mAdjustedForIme=adjustedForIme;
      updateTouchable();
      if (!mMinimized) {
        if (animDuration > 0) {
          mView.setAdjustedForIme(adjustedForIme,animDuration);
        }
 else {
          mView.setAdjustedForIme(adjustedForIme);
        }
      }
    }
  }
);
}
Program: 191483
Project: 191483
Buggy source:
void setAdjustedForIme(boolean adjustedForIme,boolean adjustedForDivider,boolean animate,WindowState imeWin,int imeHeight){
  if (mAdjustedForIme != adjustedForIme || (adjustedForIme && mImeHeight != imeHeight) || mAdjustedForDivider != adjustedForDivider) {
    if (animate) {
      startImeAdjustAnimation(adjustedForIme,adjustedForDivider,imeWin);
    }
 else {
      notifyAdjustedForImeChanged(adjustedForIme || adjustedForDivider,0);
    }
    mAdjustedForIme=adjustedForIme;
    mImeHeight=imeHeight;
    mAdjustedForDivider=adjustedForDivider;
  }
}

Fixed version (ground truth):
void setAdjustedForIme(boolean adjustedForIme,boolean adjustedForDivider,boolean animate,WindowState imeWin,int imeHeight){
  if (mAdjustedForIme != adjustedForIme || (adjustedForIme && mImeHeight != imeHeight) || mAdjustedForDivider != adjustedForDivider) {
    if (animate && !mAnimatingForMinimizedDockedStack) {
      startImeAdjustAnimation(adjustedForIme,adjustedForDivider,imeWin);
    }
 else {
      notifyAdjustedForImeChanged(adjustedForIme || adjustedForDivider,0);
    }
    mAdjustedForIme=adjustedForIme;
    mImeHeight=imeHeight;
    mAdjustedForDivider=adjustedForDivider;
  }
}
Program: 191487
Project: 191487
Buggy source:
void onResourcesLoaded(DecorView decorView,Drawable resizingBackgroundDrawable,Drawable captionBackgroundDrawableDrawable,Drawable userCaptionBackgroundDrawable,int statusBarColor,int navigationBarColor){
  mDecorView=decorView;
  mResizingBackgroundDrawable=resizingBackgroundDrawable;
  mCaptionBackgroundDrawable=captionBackgroundDrawableDrawable;
  mUserCaptionBackgroundDrawable=userCaptionBackgroundDrawable;
  if (mCaptionBackgroundDrawable == null) {
    mCaptionBackgroundDrawable=mResizingBackgroundDrawable;
  }
  if (statusBarColor != 0) {
    mStatusBarColor=new ColorDrawable(statusBarColor);
    addSystemBarNodeIfNeeded();
  }
 else {
    mStatusBarColor=null;
  }
  if (navigationBarColor != 0) {
    mNavigationBarColor=new ColorDrawable(navigationBarColor);
    addSystemBarNodeIfNeeded();
  }
 else {
    mNavigationBarColor=null;
  }
}

Fixed version (ground truth):
void onResourcesLoaded(DecorView decorView,Drawable resizingBackgroundDrawable,Drawable captionBackgroundDrawableDrawable,Drawable userCaptionBackgroundDrawable,int statusBarColor,int navigationBarColor){
  mDecorView=decorView;
  mResizingBackgroundDrawable=resizingBackgroundDrawable != null ? resizingBackgroundDrawable.getConstantState().newDrawable() : null;
  mCaptionBackgroundDrawable=captionBackgroundDrawableDrawable != null ? captionBackgroundDrawableDrawable.getConstantState().newDrawable() : null;
  mUserCaptionBackgroundDrawable=userCaptionBackgroundDrawable != null ? userCaptionBackgroundDrawable.getConstantState().newDrawable() : null;
  if (mCaptionBackgroundDrawable == null) {
    mCaptionBackgroundDrawable=mResizingBackgroundDrawable;
  }
  if (statusBarColor != 0) {
    mStatusBarColor=new ColorDrawable(statusBarColor);
    addSystemBarNodeIfNeeded();
  }
 else {
    mStatusBarColor=null;
  }
  if (navigationBarColor != 0) {
    mNavigationBarColor=new ColorDrawable(navigationBarColor);
    addSystemBarNodeIfNeeded();
  }
 else {
    mNavigationBarColor=null;
  }
}
Program: 191488
Project: 191488
Buggy source:
void onResourcesLoaded(DecorView decorView,Drawable resizingBackgroundDrawable,Drawable captionBackgroundDrawableDrawable,Drawable userCaptionBackgroundDrawable,int statusBarColor,int navigationBarColor){
  mDecorView=decorView;
  mResizingBackgroundDrawable=resizingBackgroundDrawable;
  mCaptionBackgroundDrawable=captionBackgroundDrawableDrawable;
  mUserCaptionBackgroundDrawable=userCaptionBackgroundDrawable;
  if (mCaptionBackgroundDrawable == null) {
    mCaptionBackgroundDrawable=mResizingBackgroundDrawable;
  }
  if (statusBarColor != 0) {
    mStatusBarColor=new ColorDrawable(statusBarColor);
    addSystemBarNodeIfNeeded();
  }
 else {
    mStatusBarColor=null;
  }
  if (navigationBarColor != 0) {
    mNavigationBarColor=new ColorDrawable(navigationBarColor);
    addSystemBarNodeIfNeeded();
  }
 else {
    mNavigationBarColor=null;
  }
}

Fixed version (ground truth):
void onResourcesLoaded(DecorView decorView,Drawable resizingBackgroundDrawable,Drawable captionBackgroundDrawableDrawable,Drawable userCaptionBackgroundDrawable,int statusBarColor,int navigationBarColor){
  mDecorView=decorView;
  mResizingBackgroundDrawable=resizingBackgroundDrawable != null ? resizingBackgroundDrawable.getConstantState().newDrawable() : null;
  mCaptionBackgroundDrawable=captionBackgroundDrawableDrawable != null ? captionBackgroundDrawableDrawable.getConstantState().newDrawable() : null;
  mUserCaptionBackgroundDrawable=userCaptionBackgroundDrawable != null ? userCaptionBackgroundDrawable.getConstantState().newDrawable() : null;
  if (mCaptionBackgroundDrawable == null) {
    mCaptionBackgroundDrawable=mResizingBackgroundDrawable;
  }
  if (statusBarColor != 0) {
    mStatusBarColor=new ColorDrawable(statusBarColor);
    addSystemBarNodeIfNeeded();
  }
 else {
    mStatusBarColor=null;
  }
  if (navigationBarColor != 0) {
    mNavigationBarColor=new ColorDrawable(navigationBarColor);
    addSystemBarNodeIfNeeded();
  }
 else {
    mNavigationBarColor=null;
  }
}
Program: 191489
Project: 191489
Buggy source:
void onResourcesLoaded(DecorView decorView,Drawable resizingBackgroundDrawable,Drawable captionBackgroundDrawableDrawable,Drawable userCaptionBackgroundDrawable,int statusBarColor,int navigationBarColor){
  mDecorView=decorView;
  mResizingBackgroundDrawable=resizingBackgroundDrawable;
  mCaptionBackgroundDrawable=captionBackgroundDrawableDrawable;
  mUserCaptionBackgroundDrawable=userCaptionBackgroundDrawable;
  if (mCaptionBackgroundDrawable == null) {
    mCaptionBackgroundDrawable=mResizingBackgroundDrawable;
  }
  if (statusBarColor != 0) {
    mStatusBarColor=new ColorDrawable(statusBarColor);
    addSystemBarNodeIfNeeded();
  }
 else {
    mStatusBarColor=null;
  }
  if (navigationBarColor != 0) {
    mNavigationBarColor=new ColorDrawable(navigationBarColor);
    addSystemBarNodeIfNeeded();
  }
 else {
    mNavigationBarColor=null;
  }
}

Fixed version (ground truth):
void onResourcesLoaded(DecorView decorView,Drawable resizingBackgroundDrawable,Drawable captionBackgroundDrawableDrawable,Drawable userCaptionBackgroundDrawable,int statusBarColor,int navigationBarColor){
  mDecorView=decorView;
  mResizingBackgroundDrawable=resizingBackgroundDrawable != null ? resizingBackgroundDrawable.getConstantState().newDrawable() : null;
  mCaptionBackgroundDrawable=captionBackgroundDrawableDrawable != null ? captionBackgroundDrawableDrawable.getConstantState().newDrawable() : null;
  mUserCaptionBackgroundDrawable=userCaptionBackgroundDrawable != null ? userCaptionBackgroundDrawable.getConstantState().newDrawable() : null;
  if (mCaptionBackgroundDrawable == null) {
    mCaptionBackgroundDrawable=mResizingBackgroundDrawable;
  }
  if (statusBarColor != 0) {
    mStatusBarColor=new ColorDrawable(statusBarColor);
    addSystemBarNodeIfNeeded();
  }
 else {
    mStatusBarColor=null;
  }
  if (navigationBarColor != 0) {
    mNavigationBarColor=new ColorDrawable(navigationBarColor);
    addSystemBarNodeIfNeeded();
  }
 else {
    mNavigationBarColor=null;
  }
}
Program: 191490
Project: 191490
Buggy source:
protected View bindVetoButtonClickListener(View row,final StatusBarNotification n){
  View vetoButton=row.findViewById(R.id.veto);
  final String _pkg=n.getPackageName();
  final String _tag=n.getTag();
  final int _id=n.getId();
  final int _userId=n.getUserId();
  vetoButton.setOnClickListener(new View.OnClickListener(){
    public void onClick(    View v){
      v.announceForAccessibility(mContext.getString(R.string.accessibility_notification_dismissed));
      try {
        mBarService.onNotificationClear(_pkg,_tag,_id,_userId);
        if (FORCE_REMOTE_INPUT_HISTORY && mKeysKeptForRemoteInput.contains(n.getKey())) {
          removeNotification(n.getKey(),null);
          mKeysKeptForRemoteInput.remove(n.getKey());
        }
      }
 catch (      RemoteException ex) {
      }
    }
  }
);
  vetoButton.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
  return vetoButton;
}

Fixed version (ground truth):
protected View bindVetoButtonClickListener(View row,final StatusBarNotification n){
  View vetoButton=row.findViewById(R.id.veto);
  vetoButton.setOnClickListener(new View.OnClickListener(){
    public void onClick(    View v){
      v.announceForAccessibility(mContext.getString(R.string.accessibility_notification_dismissed));
      performRemoveNotification(n,false);
    }
  }
);
  vetoButton.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
  return vetoButton;
}
Program: 191492
Project: 191492
Buggy source:
@Override public void run(){
  try {
    if (keyguardShowing && !afterKeyguardGone) {
      ActivityManagerNative.getDefault().keyguardWaitingForActivityDrawn();
    }
    ActivityManagerNative.getDefault().resumeAppSwitches();
  }
 catch (  RemoteException e) {
  }
  if (intent != null) {
    if (intent.isActivity()) {
      final int userId=intent.getCreatorUserHandle().getIdentifier();
      if (mLockPatternUtils.isSeparateProfileChallengeEnabled(userId) && mKeyguardManager.isDeviceLocked(userId)) {
        if (startWorkChallengeIfNecessary(userId,intent.getIntentSender(),notificationKey)) {
          return;
        }
      }
    }
    try {
      intent.send(null,0,null,null,null,null,getActivityOptions());
    }
 catch (    PendingIntent.CanceledException e) {
      Log.w(TAG,"String_Node_Str" + e);
    }
    if (intent.isActivity()) {
      mAssistManager.hideAssist();
      overrideActivityPendingAppTransition(keyguardShowing && !afterKeyguardGone);
    }
  }
  try {
    mBarService.onNotificationClick(notificationKey);
  }
 catch (  RemoteException ex) {
  }
}

Fixed version (ground truth):
@Override public void run(){
  performRemoveNotification(parentToCancelFinal,true);
}
Program: 191494
Project: 191494
Buggy source:
public boolean isOnlyChildInSuppressedGroup(StatusBarNotification sbn){
  return isGroupSuppressed(sbn.getGroupKey()) && !sbn.getNotification().isGroupSummary() && getTotalNumberOfChildren(sbn) == 1;
}

Fixed version (ground truth):
public boolean isOnlyChildInSuppressedGroup(StatusBarNotification sbn){
  return isGroupSuppressed(sbn.getGroupKey()) && isOnlyChildInGroup(sbn);
}
Program: 191495
Project: 191495
Buggy source:
public void addPostCollapseAction(Runnable r){
  mPostCollapseRunnables.add(r);
}

Fixed version (ground truth):
@Override public void addPostCollapseAction(Runnable r){
  mPostCollapseRunnables.add(r);
}
Program: 191496
Project: 191496
Buggy source:
public boolean isCollapsing(){
  return mNotificationPanel.isCollapsing();
}

Fixed version (ground truth):
@Override public boolean isCollapsing(){
  return mNotificationPanel.isCollapsing();
}
Program: 191497
Project: 191497
Buggy source:
protected View bindVetoButtonClickListener(View row,final StatusBarNotification n){
  View vetoButton=row.findViewById(R.id.veto);
  final String _pkg=n.getPackageName();
  final String _tag=n.getTag();
  final int _id=n.getId();
  final int _userId=n.getUserId();
  vetoButton.setOnClickListener(new View.OnClickListener(){
    public void onClick(    View v){
      v.announceForAccessibility(mContext.getString(R.string.accessibility_notification_dismissed));
      try {
        mBarService.onNotificationClear(_pkg,_tag,_id,_userId);
        if (FORCE_REMOTE_INPUT_HISTORY && mKeysKeptForRemoteInput.contains(n.getKey())) {
          removeNotification(n.getKey(),null);
          mKeysKeptForRemoteInput.remove(n.getKey());
        }
      }
 catch (      RemoteException ex) {
      }
    }
  }
);
  vetoButton.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
  return vetoButton;
}

Fixed version (ground truth):
protected View bindVetoButtonClickListener(View row,final StatusBarNotification n){
  View vetoButton=row.findViewById(R.id.veto);
  vetoButton.setOnClickListener(new View.OnClickListener(){
    public void onClick(    View v){
      v.announceForAccessibility(mContext.getString(R.string.accessibility_notification_dismissed));
      performRemoveNotification(n,false);
    }
  }
);
  vetoButton.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
  return vetoButton;
}
Program: 191499
Project: 191499
Buggy source:
@Override public void run(){
  try {
    if (keyguardShowing && !afterKeyguardGone) {
      ActivityManagerNative.getDefault().keyguardWaitingForActivityDrawn();
    }
    ActivityManagerNative.getDefault().resumeAppSwitches();
  }
 catch (  RemoteException e) {
  }
  if (intent != null) {
    if (intent.isActivity()) {
      final int userId=intent.getCreatorUserHandle().getIdentifier();
      if (mLockPatternUtils.isSeparateProfileChallengeEnabled(userId) && mKeyguardManager.isDeviceLocked(userId)) {
        if (startWorkChallengeIfNecessary(userId,intent.getIntentSender(),notificationKey)) {
          return;
        }
      }
    }
    try {
      intent.send(null,0,null,null,null,null,getActivityOptions());
    }
 catch (    PendingIntent.CanceledException e) {
      Log.w(TAG,"String_Node_Str" + e);
    }
    if (intent.isActivity()) {
      mAssistManager.hideAssist();
      overrideActivityPendingAppTransition(keyguardShowing && !afterKeyguardGone);
    }
  }
  try {
    mBarService.onNotificationClick(notificationKey);
  }
 catch (  RemoteException ex) {
  }
}

Fixed version (ground truth):
@Override public void run(){
  performRemoveNotification(parentToCancelFinal,true);
}