nus-yam/ex-repair huggingface dataset:
Program: 191501
Project: 191501
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: 191502
Project: 191502
Buggy source:
public void addPostCollapseAction(Runnable r){
  mPostCollapseRunnables.add(r);
}

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

Fixed version (ground truth):
@Override public boolean isCollapsing(){
  return mNotificationPanel.isCollapsing();
}
Program: 191504
Project: 191504
Buggy source:
@Override public int send(int code,Intent intent,String resolvedType,IIntentReceiver finishedReceiver,String requiredPermission,Bundle options){
  try {
    mResult.offer(intent,5,TimeUnit.SECONDS);
  }
 catch (  InterruptedException e) {
    throw new RuntimeException(e);
  }
  return 0;
}

Fixed version (ground truth):
@Override public void send(int code,Intent intent,String resolvedType,IIntentReceiver finishedReceiver,String requiredPermission,Bundle options){
  try {
    mResult.offer(intent,5,TimeUnit.SECONDS);
  }
 catch (  InterruptedException e) {
    throw new RuntimeException(e);
  }
}
Program: 191508
Project: 191508
Buggy source:
@Override public int send(int code,Intent intent,String resolvedType,IIntentReceiver finishedReceiver,String requiredPermission,Bundle options){
  try {
    mResult.offer(intent,5,TimeUnit.SECONDS);
  }
 catch (  InterruptedException e) {
    throw new RuntimeException(e);
  }
  return 0;
}

Fixed version (ground truth):
@Override public void send(int code,Intent intent,String resolvedType,IIntentReceiver finishedReceiver,String requiredPermission,Bundle options){
  try {
    mResult.offer(intent,5,TimeUnit.SECONDS);
  }
 catch (  InterruptedException e) {
    throw new RuntimeException(e);
  }
}
Program: 191513
Project: 191513
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: 191515
Project: 191515
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: 191517
Project: 191517
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: 191518
Project: 191518
Buggy source:
public void addPostCollapseAction(Runnable r){
  mPostCollapseRunnables.add(r);
}

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

Fixed version (ground truth):
@Override public boolean isCollapsing(){
  return mNotificationPanel.isCollapsing();
}
Program: 191524
Project: 191524
Buggy source:
@Override public int send(int code,Intent intent,String resolvedType,IIntentReceiver finishedReceiver,String requiredPermission,Bundle options){
  try {
    mResult.offer(intent,5,TimeUnit.SECONDS);
  }
 catch (  InterruptedException e) {
    throw new RuntimeException(e);
  }
  return 0;
}

Fixed version (ground truth):
@Override public void send(int code,Intent intent,String resolvedType,IIntentReceiver finishedReceiver,String requiredPermission,Bundle options){
  try {
    mResult.offer(intent,5,TimeUnit.SECONDS);
  }
 catch (  InterruptedException e) {
    throw new RuntimeException(e);
  }
}
Program: 191527
Project: 191527
Buggy source:
final void trimApplications(){
synchronized (this) {
    int i;
    for (i=mRemovedProcesses.size() - 1; i >= 0; i--) {
      final ProcessRecord app=mRemovedProcesses.get(i);
      if (app.activities.size() == 0 && app.curReceiver == null && app.services.size() == 0) {
        Slog.i(TAG,"String_Node_Str" + app.processName + "String_Node_Str"+ (app.thread != null ? app.thread.asBinder() : null)+ "String_Node_Str");
        if (app.pid > 0 && app.pid != MY_PID) {
          app.kill("String_Node_Str",false);
        }
 else {
          try {
            app.thread.scheduleExit();
          }
 catch (          Exception e) {
          }
        }
        cleanUpApplicationRecordLocked(app,false,true,-1);
        mRemovedProcesses.remove(i);
        if (app.persistent) {
          addAppLocked(app.info,false,null);
        }
      }
    }
    updateOomAdjLocked();
  }
}

Fixed version (ground truth):
final void trimApplications(){
synchronized (this) {
    int i;
    for (i=mRemovedProcesses.size() - 1; i >= 0; i--) {
      final ProcessRecord app=mRemovedProcesses.get(i);
      if (app.activities.size() == 0 && app.curReceiver == null && app.services.size() == 0) {
        Slog.i(TAG,"String_Node_Str" + app.toShortString() + "String_Node_Str"+ (app.thread != null ? app.thread.asBinder() : null)+ "String_Node_Str");
        if (app.pid > 0 && app.pid != MY_PID) {
          app.kill("String_Node_Str",false);
        }
 else {
          try {
            app.thread.scheduleExit();
          }
 catch (          Exception e) {
          }
        }
        cleanUpApplicationRecordLocked(app,false,true,-1);
        mRemovedProcesses.remove(i);
        if (app.persistent) {
          addAppLocked(app.info,false,null);
        }
      }
    }
    updateOomAdjLocked();
  }
}
Program: 191528
Project: 191528
Buggy source:
boolean removeProcessLocked(ProcessRecord app,boolean callerWillRestart,boolean allowRestart,String reason){
  final String name=app.processName;
  final int uid=app.uid;
  if (DEBUG_PROCESSES)   Slog.d(TAG_PROCESSES,"String_Node_Str" + app.toShortString() + "String_Node_Str"+ name+ "String_Node_Str"+ uid+ "String_Node_Str");
  removeProcessNameLocked(name,uid);
  if (mHeavyWeightProcess == app) {
    mHandler.sendMessage(mHandler.obtainMessage(CANCEL_HEAVY_NOTIFICATION_MSG,mHeavyWeightProcess.userId,0));
    mHeavyWeightProcess=null;
  }
  boolean needRestart=false;
  if (app.pid > 0 && app.pid != MY_PID) {
    int pid=app.pid;
synchronized (mPidsSelfLocked) {
      mPidsSelfLocked.remove(pid);
      mHandler.removeMessages(PROC_START_TIMEOUT_MSG,app);
    }
    mBatteryStatsService.noteProcessFinish(app.processName,app.info.uid);
    if (app.isolated) {
      mBatteryStatsService.removeIsolatedUid(app.uid,app.info.uid);
    }
    boolean willRestart=false;
    if (app.persistent && !app.isolated) {
      if (!callerWillRestart) {
        willRestart=true;
      }
 else {
        needRestart=true;
      }
    }
    app.kill(reason,true);
    handleAppDiedLocked(app,willRestart,allowRestart);
    if (willRestart) {
      removeLruProcessLocked(app);
      addAppLocked(app.info,false,null);
    }
  }
 else {
    mRemovedProcesses.add(app);
  }
  return needRestart;
}

Fixed version (ground truth):
boolean removeProcessLocked(ProcessRecord app,boolean callerWillRestart,boolean allowRestart,String reason){
  final String name=app.processName;
  final int uid=app.uid;
  if (DEBUG_PROCESSES)   Slog.d(TAG_PROCESSES,"String_Node_Str" + app.toShortString() + "String_Node_Str"+ name+ "String_Node_Str"+ uid+ "String_Node_Str");
  ProcessRecord old=mProcessNames.get(name,uid);
  if (old != app) {
    Slog.w(TAG,"String_Node_Str" + app);
    return false;
  }
  removeProcessNameLocked(name,uid);
  if (mHeavyWeightProcess == app) {
    mHandler.sendMessage(mHandler.obtainMessage(CANCEL_HEAVY_NOTIFICATION_MSG,mHeavyWeightProcess.userId,0));
    mHeavyWeightProcess=null;
  }
  boolean needRestart=false;
  if (app.pid > 0 && app.pid != MY_PID) {
    int pid=app.pid;
synchronized (mPidsSelfLocked) {
      mPidsSelfLocked.remove(pid);
      mHandler.removeMessages(PROC_START_TIMEOUT_MSG,app);
    }
    mBatteryStatsService.noteProcessFinish(app.processName,app.info.uid);
    if (app.isolated) {
      mBatteryStatsService.removeIsolatedUid(app.uid,app.info.uid);
    }
    boolean willRestart=false;
    if (app.persistent && !app.isolated) {
      if (!callerWillRestart) {
        willRestart=true;
      }
 else {
        needRestart=true;
      }
    }
    app.kill(reason,true);
    handleAppDiedLocked(app,willRestart,allowRestart);
    if (willRestart) {
      removeLruProcessLocked(app);
      addAppLocked(app.info,false,null);
    }
  }
 else {
    mRemovedProcesses.add(app);
  }
  return needRestart;
}
Program: 191529
Project: 191529
Buggy source:
final void trimApplications(){
synchronized (this) {
    int i;
    for (i=mRemovedProcesses.size() - 1; i >= 0; i--) {
      final ProcessRecord app=mRemovedProcesses.get(i);
      if (app.activities.size() == 0 && app.curReceiver == null && app.services.size() == 0) {
        Slog.i(TAG,"String_Node_Str" + app.processName + "String_Node_Str"+ (app.thread != null ? app.thread.asBinder() : null)+ "String_Node_Str");
        if (app.pid > 0 && app.pid != MY_PID) {
          app.kill("String_Node_Str",false);
        }
 else {
          try {
            app.thread.scheduleExit();
          }
 catch (          Exception e) {
          }
        }
        cleanUpApplicationRecordLocked(app,false,true,-1);
        mRemovedProcesses.remove(i);
        if (app.persistent) {
          addAppLocked(app.info,false,null);
        }
      }
    }
    updateOomAdjLocked();
  }
}

Fixed version (ground truth):
final void trimApplications(){
synchronized (this) {
    int i;
    for (i=mRemovedProcesses.size() - 1; i >= 0; i--) {
      final ProcessRecord app=mRemovedProcesses.get(i);
      if (app.activities.size() == 0 && app.curReceiver == null && app.services.size() == 0) {
        Slog.i(TAG,"String_Node_Str" + app.toShortString() + "String_Node_Str"+ (app.thread != null ? app.thread.asBinder() : null)+ "String_Node_Str");
        if (app.pid > 0 && app.pid != MY_PID) {
          app.kill("String_Node_Str",false);
        }
 else {
          try {
            app.thread.scheduleExit();
          }
 catch (          Exception e) {
          }
        }
        cleanUpApplicationRecordLocked(app,false,true,-1);
        mRemovedProcesses.remove(i);
        if (app.persistent) {
          addAppLocked(app.info,false,null);
        }
      }
    }
    updateOomAdjLocked();
  }
}
Program: 191530
Project: 191530
Buggy source:
boolean removeProcessLocked(ProcessRecord app,boolean callerWillRestart,boolean allowRestart,String reason){
  final String name=app.processName;
  final int uid=app.uid;
  if (DEBUG_PROCESSES)   Slog.d(TAG_PROCESSES,"String_Node_Str" + app.toShortString() + "String_Node_Str"+ name+ "String_Node_Str"+ uid+ "String_Node_Str");
  removeProcessNameLocked(name,uid);
  if (mHeavyWeightProcess == app) {
    mHandler.sendMessage(mHandler.obtainMessage(CANCEL_HEAVY_NOTIFICATION_MSG,mHeavyWeightProcess.userId,0));
    mHeavyWeightProcess=null;
  }
  boolean needRestart=false;
  if (app.pid > 0 && app.pid != MY_PID) {
    int pid=app.pid;
synchronized (mPidsSelfLocked) {
      mPidsSelfLocked.remove(pid);
      mHandler.removeMessages(PROC_START_TIMEOUT_MSG,app);
    }
    mBatteryStatsService.noteProcessFinish(app.processName,app.info.uid);
    if (app.isolated) {
      mBatteryStatsService.removeIsolatedUid(app.uid,app.info.uid);
    }
    boolean willRestart=false;
    if (app.persistent && !app.isolated) {
      if (!callerWillRestart) {
        willRestart=true;
      }
 else {
        needRestart=true;
      }
    }
    app.kill(reason,true);
    handleAppDiedLocked(app,willRestart,allowRestart);
    if (willRestart) {
      removeLruProcessLocked(app);
      addAppLocked(app.info,false,null);
    }
  }
 else {
    mRemovedProcesses.add(app);
  }
  return needRestart;
}

Fixed version (ground truth):
boolean removeProcessLocked(ProcessRecord app,boolean callerWillRestart,boolean allowRestart,String reason){
  final String name=app.processName;
  final int uid=app.uid;
  if (DEBUG_PROCESSES)   Slog.d(TAG_PROCESSES,"String_Node_Str" + app.toShortString() + "String_Node_Str"+ name+ "String_Node_Str"+ uid+ "String_Node_Str");
  ProcessRecord old=mProcessNames.get(name,uid);
  if (old != app) {
    Slog.w(TAG,"String_Node_Str" + app);
    return false;
  }
  removeProcessNameLocked(name,uid);
  if (mHeavyWeightProcess == app) {
    mHandler.sendMessage(mHandler.obtainMessage(CANCEL_HEAVY_NOTIFICATION_MSG,mHeavyWeightProcess.userId,0));
    mHeavyWeightProcess=null;
  }
  boolean needRestart=false;
  if (app.pid > 0 && app.pid != MY_PID) {
    int pid=app.pid;
synchronized (mPidsSelfLocked) {
      mPidsSelfLocked.remove(pid);
      mHandler.removeMessages(PROC_START_TIMEOUT_MSG,app);
    }
    mBatteryStatsService.noteProcessFinish(app.processName,app.info.uid);
    if (app.isolated) {
      mBatteryStatsService.removeIsolatedUid(app.uid,app.info.uid);
    }
    boolean willRestart=false;
    if (app.persistent && !app.isolated) {
      if (!callerWillRestart) {
        willRestart=true;
      }
 else {
        needRestart=true;
      }
    }
    app.kill(reason,true);
    handleAppDiedLocked(app,willRestart,allowRestart);
    if (willRestart) {
      removeLruProcessLocked(app);
      addAppLocked(app.info,false,null);
    }
  }
 else {
    mRemovedProcesses.add(app);
  }
  return needRestart;
}
Program: 191531
Project: 191531
Buggy source:
final void trimApplications(){
synchronized (this) {
    int i;
    for (i=mRemovedProcesses.size() - 1; i >= 0; i--) {
      final ProcessRecord app=mRemovedProcesses.get(i);
      if (app.activities.size() == 0 && app.curReceiver == null && app.services.size() == 0) {
        Slog.i(TAG,"String_Node_Str" + app.processName + "String_Node_Str"+ (app.thread != null ? app.thread.asBinder() : null)+ "String_Node_Str");
        if (app.pid > 0 && app.pid != MY_PID) {
          app.kill("String_Node_Str",false);
        }
 else {
          try {
            app.thread.scheduleExit();
          }
 catch (          Exception e) {
          }
        }
        cleanUpApplicationRecordLocked(app,false,true,-1);
        mRemovedProcesses.remove(i);
        if (app.persistent) {
          addAppLocked(app.info,false,null);
        }
      }
    }
    updateOomAdjLocked();
  }
}

Fixed version (ground truth):
final void trimApplications(){
synchronized (this) {
    int i;
    for (i=mRemovedProcesses.size() - 1; i >= 0; i--) {
      final ProcessRecord app=mRemovedProcesses.get(i);
      if (app.activities.size() == 0 && app.curReceiver == null && app.services.size() == 0) {
        Slog.i(TAG,"String_Node_Str" + app.toShortString() + "String_Node_Str"+ (app.thread != null ? app.thread.asBinder() : null)+ "String_Node_Str");
        if (app.pid > 0 && app.pid != MY_PID) {
          app.kill("String_Node_Str",false);
        }
 else {
          try {
            app.thread.scheduleExit();
          }
 catch (          Exception e) {
          }
        }
        cleanUpApplicationRecordLocked(app,false,true,-1);
        mRemovedProcesses.remove(i);
        if (app.persistent) {
          addAppLocked(app.info,false,null);
        }
      }
    }
    updateOomAdjLocked();
  }
}
Program: 191532
Project: 191532
Buggy source:
boolean removeProcessLocked(ProcessRecord app,boolean callerWillRestart,boolean allowRestart,String reason){
  final String name=app.processName;
  final int uid=app.uid;
  if (DEBUG_PROCESSES)   Slog.d(TAG_PROCESSES,"String_Node_Str" + app.toShortString() + "String_Node_Str"+ name+ "String_Node_Str"+ uid+ "String_Node_Str");
  removeProcessNameLocked(name,uid);
  if (mHeavyWeightProcess == app) {
    mHandler.sendMessage(mHandler.obtainMessage(CANCEL_HEAVY_NOTIFICATION_MSG,mHeavyWeightProcess.userId,0));
    mHeavyWeightProcess=null;
  }
  boolean needRestart=false;
  if (app.pid > 0 && app.pid != MY_PID) {
    int pid=app.pid;
synchronized (mPidsSelfLocked) {
      mPidsSelfLocked.remove(pid);
      mHandler.removeMessages(PROC_START_TIMEOUT_MSG,app);
    }
    mBatteryStatsService.noteProcessFinish(app.processName,app.info.uid);
    if (app.isolated) {
      mBatteryStatsService.removeIsolatedUid(app.uid,app.info.uid);
    }
    boolean willRestart=false;
    if (app.persistent && !app.isolated) {
      if (!callerWillRestart) {
        willRestart=true;
      }
 else {
        needRestart=true;
      }
    }
    app.kill(reason,true);
    handleAppDiedLocked(app,willRestart,allowRestart);
    if (willRestart) {
      removeLruProcessLocked(app);
      addAppLocked(app.info,false,null);
    }
  }
 else {
    mRemovedProcesses.add(app);
  }
  return needRestart;
}

Fixed version (ground truth):
boolean removeProcessLocked(ProcessRecord app,boolean callerWillRestart,boolean allowRestart,String reason){
  final String name=app.processName;
  final int uid=app.uid;
  if (DEBUG_PROCESSES)   Slog.d(TAG_PROCESSES,"String_Node_Str" + app.toShortString() + "String_Node_Str"+ name+ "String_Node_Str"+ uid+ "String_Node_Str");
  ProcessRecord old=mProcessNames.get(name,uid);
  if (old != app) {
    Slog.w(TAG,"String_Node_Str" + app);
    return false;
  }
  removeProcessNameLocked(name,uid);
  if (mHeavyWeightProcess == app) {
    mHandler.sendMessage(mHandler.obtainMessage(CANCEL_HEAVY_NOTIFICATION_MSG,mHeavyWeightProcess.userId,0));
    mHeavyWeightProcess=null;
  }
  boolean needRestart=false;
  if (app.pid > 0 && app.pid != MY_PID) {
    int pid=app.pid;
synchronized (mPidsSelfLocked) {
      mPidsSelfLocked.remove(pid);
      mHandler.removeMessages(PROC_START_TIMEOUT_MSG,app);
    }
    mBatteryStatsService.noteProcessFinish(app.processName,app.info.uid);
    if (app.isolated) {
      mBatteryStatsService.removeIsolatedUid(app.uid,app.info.uid);
    }
    boolean willRestart=false;
    if (app.persistent && !app.isolated) {
      if (!callerWillRestart) {
        willRestart=true;
      }
 else {
        needRestart=true;
      }
    }
    app.kill(reason,true);
    handleAppDiedLocked(app,willRestart,allowRestart);
    if (willRestart) {
      removeLruProcessLocked(app);
      addAppLocked(app.info,false,null);
    }
  }
 else {
    mRemovedProcesses.add(app);
  }
  return needRestart;
}
Program: 191533
Project: 191533
Buggy source:
/** 
 * NOTE: Must be called with Surface transaction open.
 */
private void adjustBounds(){
  final int dw, dh;
  final float xPos, yPos;
  if (!mUser.isFullscreen()) {
    dw=mBounds.width();
    dh=mBounds.height();
    xPos=mBounds.left;
    yPos=mBounds.top;
  }
 else {
    final DisplayInfo info=mUser.getDisplayInfo();
    dw=(int)(info.logicalWidth * 1.5);
    dh=(int)(info.logicalHeight * 1.5);
    xPos=-1 * dw / 6;
    yPos=-1 * dh / 6;
  }
  if (mDimSurface != null) {
    mDimSurface.setPosition(xPos,yPos);
    mDimSurface.setSize(dw,dh);
  }
  mLastBounds.set(mBounds);
}

Fixed version (ground truth):
/** 
 * NOTE: Must be called with Surface transaction open.
 */
private void adjustBounds(){
  if (mUser.dimFullscreen()) {
    getBoundsForFullscreen(mBounds);
  }
  if (mDimSurface != null) {
    mDimSurface.setPosition(mBounds.left,mBounds.top);
    mDimSurface.setSize(mBounds.width(),mBounds.height());
    if (DEBUG_DIM_LAYER)     Slog.v(TAG,"String_Node_Str" + mUser.toShortString() + "String_Node_Str"+ mBounds);
  }
  mLastBounds.set(mBounds);
}
Program: 191534
Project: 191534
Buggy source:
void startDimmingIfNeeded(DimLayer.DimLayerUser dimLayerUser,WindowStateAnimator newWinAnimator,boolean aboveApp){
  DimLayerState state=getOrCreateDimLayerState(dimLayerUser);
  state.dimAbove=aboveApp;
  if (DEBUG_DIM_LAYER)   Slog.v(TAG,"String_Node_Str" + "String_Node_Str" + dimLayerUser.toShortString() + "String_Node_Str"+ newWinAnimator+ "String_Node_Str"+ state.animator);
  if (newWinAnimator.getShown() && (state.animator == null || !state.animator.getShown() || state.animator.mAnimLayer <= newWinAnimator.mAnimLayer)) {
    state.animator=newWinAnimator;
    if (state.animator.mWin.mAppToken == null && !dimLayerUser.isFullscreen()) {
      mDisplayContent.getLogicalDisplayRect(mTmpBounds);
    }
 else {
      dimLayerUser.getDimBounds(mTmpBounds);
    }
    state.dimLayer.setBounds(mTmpBounds);
  }
}

Fixed version (ground truth):
void startDimmingIfNeeded(DimLayer.DimLayerUser dimLayerUser,WindowStateAnimator newWinAnimator,boolean aboveApp){
  DimLayerState state=getOrCreateDimLayerState(dimLayerUser);
  state.dimAbove=aboveApp;
  if (DEBUG_DIM_LAYER)   Slog.v(TAG,"String_Node_Str" + "String_Node_Str" + dimLayerUser.toShortString() + "String_Node_Str"+ newWinAnimator+ "String_Node_Str"+ state.animator);
  if (newWinAnimator.getShown() && (state.animator == null || !state.animator.getShown() || state.animator.mAnimLayer <= newWinAnimator.mAnimLayer)) {
    state.animator=newWinAnimator;
    if (state.animator.mWin.mAppToken == null && !dimLayerUser.dimFullscreen()) {
      mDisplayContent.getLogicalDisplayRect(mTmpBounds);
    }
 else {
      dimLayerUser.getDimBounds(mTmpBounds);
    }
    state.dimLayer.setBounds(mTmpBounds);
  }
}
Program: 191535
Project: 191535
Buggy source:
/** 
 * Updates the dim layer bounds, recreating it if needed. 
 */
void updateDimLayer(DimLayer.DimLayerUser dimLayerUser){
  DimLayerState state=getOrCreateDimLayerState(dimLayerUser);
  final boolean previousFullscreen=state.dimLayer != null && state.dimLayer == mSharedFullScreenDimLayer;
  DimLayer newDimLayer;
  final int displayId=mDisplayContent.getDisplayId();
  if (dimLayerUser.isFullscreen()) {
    if (previousFullscreen) {
      return;
    }
    newDimLayer=mSharedFullScreenDimLayer;
    if (newDimLayer == null) {
      if (state.dimLayer != null) {
        newDimLayer=state.dimLayer;
      }
 else {
        newDimLayer=new DimLayer(mDisplayContent.mService,dimLayerUser,displayId,getDimLayerTag(dimLayerUser));
      }
      dimLayerUser.getDimBounds(mTmpBounds);
      newDimLayer.setBounds(mTmpBounds);
      mSharedFullScreenDimLayer=newDimLayer;
    }
 else     if (state.dimLayer != null) {
      state.dimLayer.destroySurface();
    }
  }
 else {
    newDimLayer=(state.dimLayer == null || previousFullscreen) ? new DimLayer(mDisplayContent.mService,dimLayerUser,displayId,getDimLayerTag(dimLayerUser)) : state.dimLayer;
    dimLayerUser.getDimBounds(mTmpBounds);
    newDimLayer.setBounds(mTmpBounds);
  }
  state.dimLayer=newDimLayer;
}

Fixed version (ground truth):
/** 
 * Updates the dim layer bounds, recreating it if needed. 
 */
void updateDimLayer(DimLayer.DimLayerUser dimLayerUser){
  final DimLayerState state=getOrCreateDimLayerState(dimLayerUser);
  final boolean previousFullscreen=state.dimLayer != null && state.dimLayer == mSharedFullScreenDimLayer;
  DimLayer newDimLayer;
  final int displayId=mDisplayContent.getDisplayId();
  if (dimLayerUser.dimFullscreen()) {
    if (previousFullscreen && mSharedFullScreenDimLayer != null) {
      mSharedFullScreenDimLayer.setBoundsForFullscreen();
      return;
    }
    newDimLayer=mSharedFullScreenDimLayer;
    if (newDimLayer == null) {
      if (state.dimLayer != null) {
        newDimLayer=state.dimLayer;
      }
 else {
        newDimLayer=new DimLayer(mDisplayContent.mService,dimLayerUser,displayId,getDimLayerTag(dimLayerUser));
      }
      dimLayerUser.getDimBounds(mTmpBounds);
      newDimLayer.setBounds(mTmpBounds);
      mSharedFullScreenDimLayer=newDimLayer;
    }
 else     if (state.dimLayer != null) {
      state.dimLayer.destroySurface();
    }
  }
 else {
    newDimLayer=(state.dimLayer == null || previousFullscreen) ? new DimLayer(mDisplayContent.mService,dimLayerUser,displayId,getDimLayerTag(dimLayerUser)) : state.dimLayer;
    dimLayerUser.getDimBounds(mTmpBounds);
    newDimLayer.setBounds(mTmpBounds);
  }
  state.dimLayer=newDimLayer;
}
Program: 191536
Project: 191536
Buggy source:
void dump(String prefix,PrintWriter pw){
  pw.println(prefix + "String_Node_Str");
  for (int i=0, n=mState.size(); i < n; i++) {
    pw.println(prefix + "String_Node_Str" + mState.keyAt(i).toShortString());
    pw.print(prefix + "String_Node_Str");
    DimLayerState state=mState.valueAt(i);
    pw.print("String_Node_Str" + (state.dimLayer == mSharedFullScreenDimLayer ? "String_Node_Str" : state.dimLayer));
    pw.print("String_Node_Str" + state.animator);
    pw.println("String_Node_Str" + state.continueDimming + "String_Node_Str");
  }
}

Fixed version (ground truth):
void dump(String prefix,PrintWriter pw){
  pw.println(prefix + "String_Node_Str");
  final String doubleSpace="String_Node_Str";
  final String prefixPlusDoubleSpace=prefix + doubleSpace;
  for (int i=0, n=mState.size(); i < n; i++) {
    pw.println(prefixPlusDoubleSpace + mState.keyAt(i).toShortString());
    DimLayerState state=mState.valueAt(i);
    pw.println(prefixPlusDoubleSpace + doubleSpace + "String_Node_Str"+ (state.dimLayer == mSharedFullScreenDimLayer ? "String_Node_Str" : state.dimLayer)+ "String_Node_Str"+ state.animator+ "String_Node_Str"+ state.continueDimming);
    if (state.dimLayer != null) {
      state.dimLayer.printTo(prefixPlusDoubleSpace + doubleSpace,pw);
    }
  }
}
Program: 191537
Project: 191537
Buggy source:
@Override public boolean isFullscreen(){
  if (useCurrentBounds()) {
    return mFullscreen;
  }
  return true;
}

Fixed version (ground truth):
boolean isFullscreen(){
  if (useCurrentBounds()) {
    return mFullscreen;
  }
  return true;
}
Program: 191538
Project: 191538
Buggy source:
@Override public boolean isFullscreen(){
  return false;
}

Fixed version (ground truth):
boolean isFullscreen(){
  return false;
}
Program: 191539
Project: 191539
Buggy source:
@Override public boolean isFullscreen(){
  if (useCurrentBounds()) {
    return mFullscreen;
  }
  return true;
}

Fixed version (ground truth):
boolean isFullscreen(){
  if (useCurrentBounds()) {
    return mFullscreen;
  }
  return true;
}
Program: 191540
Project: 191540
Buggy source:
/** 
 * NOTE: Must be called with Surface transaction open.
 */
private void adjustBounds(){
  final int dw, dh;
  final float xPos, yPos;
  if (!mUser.isFullscreen()) {
    dw=mBounds.width();
    dh=mBounds.height();
    xPos=mBounds.left;
    yPos=mBounds.top;
  }
 else {
    final DisplayInfo info=mUser.getDisplayInfo();
    dw=(int)(info.logicalWidth * 1.5);
    dh=(int)(info.logicalHeight * 1.5);
    xPos=-1 * dw / 6;
    yPos=-1 * dh / 6;
  }
  if (mDimSurface != null) {
    mDimSurface.setPosition(xPos,yPos);
    mDimSurface.setSize(dw,dh);
  }
  mLastBounds.set(mBounds);
}

Fixed version (ground truth):
/** 
 * NOTE: Must be called with Surface transaction open.
 */
private void adjustBounds(){
  if (mUser.dimFullscreen()) {
    getBoundsForFullscreen(mBounds);
  }
  if (mDimSurface != null) {
    mDimSurface.setPosition(mBounds.left,mBounds.top);
    mDimSurface.setSize(mBounds.width(),mBounds.height());
    if (DEBUG_DIM_LAYER)     Slog.v(TAG,"String_Node_Str" + mUser.toShortString() + "String_Node_Str"+ mBounds);
  }
  mLastBounds.set(mBounds);
}
Program: 191541
Project: 191541
Buggy source:
void startDimmingIfNeeded(DimLayer.DimLayerUser dimLayerUser,WindowStateAnimator newWinAnimator,boolean aboveApp){
  DimLayerState state=getOrCreateDimLayerState(dimLayerUser);
  state.dimAbove=aboveApp;
  if (DEBUG_DIM_LAYER)   Slog.v(TAG,"String_Node_Str" + "String_Node_Str" + dimLayerUser.toShortString() + "String_Node_Str"+ newWinAnimator+ "String_Node_Str"+ state.animator);
  if (newWinAnimator.getShown() && (state.animator == null || !state.animator.getShown() || state.animator.mAnimLayer <= newWinAnimator.mAnimLayer)) {
    state.animator=newWinAnimator;
    if (state.animator.mWin.mAppToken == null && !dimLayerUser.isFullscreen()) {
      mDisplayContent.getLogicalDisplayRect(mTmpBounds);
    }
 else {
      dimLayerUser.getDimBounds(mTmpBounds);
    }
    state.dimLayer.setBounds(mTmpBounds);
  }
}

Fixed version (ground truth):
void startDimmingIfNeeded(DimLayer.DimLayerUser dimLayerUser,WindowStateAnimator newWinAnimator,boolean aboveApp){
  DimLayerState state=getOrCreateDimLayerState(dimLayerUser);
  state.dimAbove=aboveApp;
  if (DEBUG_DIM_LAYER)   Slog.v(TAG,"String_Node_Str" + "String_Node_Str" + dimLayerUser.toShortString() + "String_Node_Str"+ newWinAnimator+ "String_Node_Str"+ state.animator);
  if (newWinAnimator.getShown() && (state.animator == null || !state.animator.getShown() || state.animator.mAnimLayer <= newWinAnimator.mAnimLayer)) {
    state.animator=newWinAnimator;
    if (state.animator.mWin.mAppToken == null && !dimLayerUser.dimFullscreen()) {
      mDisplayContent.getLogicalDisplayRect(mTmpBounds);
    }
 else {
      dimLayerUser.getDimBounds(mTmpBounds);
    }
    state.dimLayer.setBounds(mTmpBounds);
  }
}
Program: 191542
Project: 191542
Buggy source:
/** 
 * Updates the dim layer bounds, recreating it if needed. 
 */
void updateDimLayer(DimLayer.DimLayerUser dimLayerUser){
  DimLayerState state=getOrCreateDimLayerState(dimLayerUser);
  final boolean previousFullscreen=state.dimLayer != null && state.dimLayer == mSharedFullScreenDimLayer;
  DimLayer newDimLayer;
  final int displayId=mDisplayContent.getDisplayId();
  if (dimLayerUser.isFullscreen()) {
    if (previousFullscreen) {
      return;
    }
    newDimLayer=mSharedFullScreenDimLayer;
    if (newDimLayer == null) {
      if (state.dimLayer != null) {
        newDimLayer=state.dimLayer;
      }
 else {
        newDimLayer=new DimLayer(mDisplayContent.mService,dimLayerUser,displayId,getDimLayerTag(dimLayerUser));
      }
      dimLayerUser.getDimBounds(mTmpBounds);
      newDimLayer.setBounds(mTmpBounds);
      mSharedFullScreenDimLayer=newDimLayer;
    }
 else     if (state.dimLayer != null) {
      state.dimLayer.destroySurface();
    }
  }
 else {
    newDimLayer=(state.dimLayer == null || previousFullscreen) ? new DimLayer(mDisplayContent.mService,dimLayerUser,displayId,getDimLayerTag(dimLayerUser)) : state.dimLayer;
    dimLayerUser.getDimBounds(mTmpBounds);
    newDimLayer.setBounds(mTmpBounds);
  }
  state.dimLayer=newDimLayer;
}

Fixed version (ground truth):
/** 
 * Updates the dim layer bounds, recreating it if needed. 
 */
void updateDimLayer(DimLayer.DimLayerUser dimLayerUser){
  final DimLayerState state=getOrCreateDimLayerState(dimLayerUser);
  final boolean previousFullscreen=state.dimLayer != null && state.dimLayer == mSharedFullScreenDimLayer;
  DimLayer newDimLayer;
  final int displayId=mDisplayContent.getDisplayId();
  if (dimLayerUser.dimFullscreen()) {
    if (previousFullscreen && mSharedFullScreenDimLayer != null) {
      mSharedFullScreenDimLayer.setBoundsForFullscreen();
      return;
    }
    newDimLayer=mSharedFullScreenDimLayer;
    if (newDimLayer == null) {
      if (state.dimLayer != null) {
        newDimLayer=state.dimLayer;
      }
 else {
        newDimLayer=new DimLayer(mDisplayContent.mService,dimLayerUser,displayId,getDimLayerTag(dimLayerUser));
      }
      dimLayerUser.getDimBounds(mTmpBounds);
      newDimLayer.setBounds(mTmpBounds);
      mSharedFullScreenDimLayer=newDimLayer;
    }
 else     if (state.dimLayer != null) {
      state.dimLayer.destroySurface();
    }
  }
 else {
    newDimLayer=(state.dimLayer == null || previousFullscreen) ? new DimLayer(mDisplayContent.mService,dimLayerUser,displayId,getDimLayerTag(dimLayerUser)) : state.dimLayer;
    dimLayerUser.getDimBounds(mTmpBounds);
    newDimLayer.setBounds(mTmpBounds);
  }
  state.dimLayer=newDimLayer;
}
Program: 191543
Project: 191543
Buggy source:
void dump(String prefix,PrintWriter pw){
  pw.println(prefix + "String_Node_Str");
  for (int i=0, n=mState.size(); i < n; i++) {
    pw.println(prefix + "String_Node_Str" + mState.keyAt(i).toShortString());
    pw.print(prefix + "String_Node_Str");
    DimLayerState state=mState.valueAt(i);
    pw.print("String_Node_Str" + (state.dimLayer == mSharedFullScreenDimLayer ? "String_Node_Str" : state.dimLayer));
    pw.print("String_Node_Str" + state.animator);
    pw.println("String_Node_Str" + state.continueDimming + "String_Node_Str");
  }
}

Fixed version (ground truth):
void dump(String prefix,PrintWriter pw){
  pw.println(prefix + "String_Node_Str");
  final String doubleSpace="String_Node_Str";
  final String prefixPlusDoubleSpace=prefix + doubleSpace;
  for (int i=0, n=mState.size(); i < n; i++) {
    pw.println(prefixPlusDoubleSpace + mState.keyAt(i).toShortString());
    DimLayerState state=mState.valueAt(i);
    pw.println(prefixPlusDoubleSpace + doubleSpace + "String_Node_Str"+ (state.dimLayer == mSharedFullScreenDimLayer ? "String_Node_Str" : state.dimLayer)+ "String_Node_Str"+ state.animator+ "String_Node_Str"+ state.continueDimming);
    if (state.dimLayer != null) {
      state.dimLayer.printTo(prefixPlusDoubleSpace + doubleSpace,pw);
    }
  }
}
Program: 191544
Project: 191544
Buggy source:
@Override public boolean isFullscreen(){
  if (useCurrentBounds()) {
    return mFullscreen;
  }
  return true;
}

Fixed version (ground truth):
boolean isFullscreen(){
  if (useCurrentBounds()) {
    return mFullscreen;
  }
  return true;
}
Program: 191545
Project: 191545
Buggy source:
@Override public boolean isFullscreen(){
  return false;
}

Fixed version (ground truth):
boolean isFullscreen(){
  return false;
}
Program: 191546
Project: 191546
Buggy source:
@Override public boolean isFullscreen(){
  if (useCurrentBounds()) {
    return mFullscreen;
  }
  return true;
}

Fixed version (ground truth):
boolean isFullscreen(){
  if (useCurrentBounds()) {
    return mFullscreen;
  }
  return true;
}
Program: 191549
Project: 191549
Buggy source:
/** 
 * NOTE: Must be called with Surface transaction open.
 */
private void adjustBounds(){
  final int dw, dh;
  final float xPos, yPos;
  if (!mUser.isFullscreen()) {
    dw=mBounds.width();
    dh=mBounds.height();
    xPos=mBounds.left;
    yPos=mBounds.top;
  }
 else {
    final DisplayInfo info=mUser.getDisplayInfo();
    dw=(int)(info.logicalWidth * 1.5);
    dh=(int)(info.logicalHeight * 1.5);
    xPos=-1 * dw / 6;
    yPos=-1 * dh / 6;
  }
  if (mDimSurface != null) {
    mDimSurface.setPosition(xPos,yPos);
    mDimSurface.setSize(dw,dh);
  }
  mLastBounds.set(mBounds);
}

Fixed version (ground truth):
/** 
 * NOTE: Must be called with Surface transaction open.
 */
private void adjustBounds(){
  if (mUser.dimFullscreen()) {
    getBoundsForFullscreen(mBounds);
  }
  if (mDimSurface != null) {
    mDimSurface.setPosition(mBounds.left,mBounds.top);
    mDimSurface.setSize(mBounds.width(),mBounds.height());
    if (DEBUG_DIM_LAYER)     Slog.v(TAG,"String_Node_Str" + mUser.toShortString() + "String_Node_Str"+ mBounds);
  }
  mLastBounds.set(mBounds);
}
Program: 191550
Project: 191550
Buggy source:
void startDimmingIfNeeded(DimLayer.DimLayerUser dimLayerUser,WindowStateAnimator newWinAnimator,boolean aboveApp){
  DimLayerState state=getOrCreateDimLayerState(dimLayerUser);
  state.dimAbove=aboveApp;
  if (DEBUG_DIM_LAYER)   Slog.v(TAG,"String_Node_Str" + "String_Node_Str" + dimLayerUser.toShortString() + "String_Node_Str"+ newWinAnimator+ "String_Node_Str"+ state.animator);
  if (newWinAnimator.getShown() && (state.animator == null || !state.animator.getShown() || state.animator.mAnimLayer <= newWinAnimator.mAnimLayer)) {
    state.animator=newWinAnimator;
    if (state.animator.mWin.mAppToken == null && !dimLayerUser.isFullscreen()) {
      mDisplayContent.getLogicalDisplayRect(mTmpBounds);
    }
 else {
      dimLayerUser.getDimBounds(mTmpBounds);
    }
    state.dimLayer.setBounds(mTmpBounds);
  }
}

Fixed version (ground truth):
void startDimmingIfNeeded(DimLayer.DimLayerUser dimLayerUser,WindowStateAnimator newWinAnimator,boolean aboveApp){
  DimLayerState state=getOrCreateDimLayerState(dimLayerUser);
  state.dimAbove=aboveApp;
  if (DEBUG_DIM_LAYER)   Slog.v(TAG,"String_Node_Str" + "String_Node_Str" + dimLayerUser.toShortString() + "String_Node_Str"+ newWinAnimator+ "String_Node_Str"+ state.animator);
  if (newWinAnimator.getShown() && (state.animator == null || !state.animator.getShown() || state.animator.mAnimLayer <= newWinAnimator.mAnimLayer)) {
    state.animator=newWinAnimator;
    if (state.animator.mWin.mAppToken == null && !dimLayerUser.dimFullscreen()) {
      mDisplayContent.getLogicalDisplayRect(mTmpBounds);
    }
 else {
      dimLayerUser.getDimBounds(mTmpBounds);
    }
    state.dimLayer.setBounds(mTmpBounds);
  }
}
Program: 191551
Project: 191551
Buggy source:
/** 
 * Updates the dim layer bounds, recreating it if needed. 
 */
void updateDimLayer(DimLayer.DimLayerUser dimLayerUser){
  DimLayerState state=getOrCreateDimLayerState(dimLayerUser);
  final boolean previousFullscreen=state.dimLayer != null && state.dimLayer == mSharedFullScreenDimLayer;
  DimLayer newDimLayer;
  final int displayId=mDisplayContent.getDisplayId();
  if (dimLayerUser.isFullscreen()) {
    if (previousFullscreen) {
      return;
    }
    newDimLayer=mSharedFullScreenDimLayer;
    if (newDimLayer == null) {
      if (state.dimLayer != null) {
        newDimLayer=state.dimLayer;
      }
 else {
        newDimLayer=new DimLayer(mDisplayContent.mService,dimLayerUser,displayId,getDimLayerTag(dimLayerUser));
      }
      dimLayerUser.getDimBounds(mTmpBounds);
      newDimLayer.setBounds(mTmpBounds);
      mSharedFullScreenDimLayer=newDimLayer;
    }
 else     if (state.dimLayer != null) {
      state.dimLayer.destroySurface();
    }
  }
 else {
    newDimLayer=(state.dimLayer == null || previousFullscreen) ? new DimLayer(mDisplayContent.mService,dimLayerUser,displayId,getDimLayerTag(dimLayerUser)) : state.dimLayer;
    dimLayerUser.getDimBounds(mTmpBounds);
    newDimLayer.setBounds(mTmpBounds);
  }
  state.dimLayer=newDimLayer;
}

Fixed version (ground truth):
/** 
 * Updates the dim layer bounds, recreating it if needed. 
 */
void updateDimLayer(DimLayer.DimLayerUser dimLayerUser){
  final DimLayerState state=getOrCreateDimLayerState(dimLayerUser);
  final boolean previousFullscreen=state.dimLayer != null && state.dimLayer == mSharedFullScreenDimLayer;
  DimLayer newDimLayer;
  final int displayId=mDisplayContent.getDisplayId();
  if (dimLayerUser.dimFullscreen()) {
    if (previousFullscreen && mSharedFullScreenDimLayer != null) {
      mSharedFullScreenDimLayer.setBoundsForFullscreen();
      return;
    }
    newDimLayer=mSharedFullScreenDimLayer;
    if (newDimLayer == null) {
      if (state.dimLayer != null) {
        newDimLayer=state.dimLayer;
      }
 else {
        newDimLayer=new DimLayer(mDisplayContent.mService,dimLayerUser,displayId,getDimLayerTag(dimLayerUser));
      }
      dimLayerUser.getDimBounds(mTmpBounds);
      newDimLayer.setBounds(mTmpBounds);
      mSharedFullScreenDimLayer=newDimLayer;
    }
 else     if (state.dimLayer != null) {
      state.dimLayer.destroySurface();
    }
  }
 else {
    newDimLayer=(state.dimLayer == null || previousFullscreen) ? new DimLayer(mDisplayContent.mService,dimLayerUser,displayId,getDimLayerTag(dimLayerUser)) : state.dimLayer;
    dimLayerUser.getDimBounds(mTmpBounds);
    newDimLayer.setBounds(mTmpBounds);
  }
  state.dimLayer=newDimLayer;
}
Program: 191552
Project: 191552
Buggy source:
void dump(String prefix,PrintWriter pw){
  pw.println(prefix + "String_Node_Str");
  for (int i=0, n=mState.size(); i < n; i++) {
    pw.println(prefix + "String_Node_Str" + mState.keyAt(i).toShortString());
    pw.print(prefix + "String_Node_Str");
    DimLayerState state=mState.valueAt(i);
    pw.print("String_Node_Str" + (state.dimLayer == mSharedFullScreenDimLayer ? "String_Node_Str" : state.dimLayer));
    pw.print("String_Node_Str" + state.animator);
    pw.println("String_Node_Str" + state.continueDimming + "String_Node_Str");
  }
}

Fixed version (ground truth):
void dump(String prefix,PrintWriter pw){
  pw.println(prefix + "String_Node_Str");
  final String doubleSpace="String_Node_Str";
  final String prefixPlusDoubleSpace=prefix + doubleSpace;
  for (int i=0, n=mState.size(); i < n; i++) {
    pw.println(prefixPlusDoubleSpace + mState.keyAt(i).toShortString());
    DimLayerState state=mState.valueAt(i);
    pw.println(prefixPlusDoubleSpace + doubleSpace + "String_Node_Str"+ (state.dimLayer == mSharedFullScreenDimLayer ? "String_Node_Str" : state.dimLayer)+ "String_Node_Str"+ state.animator+ "String_Node_Str"+ state.continueDimming);
    if (state.dimLayer != null) {
      state.dimLayer.printTo(prefixPlusDoubleSpace + doubleSpace,pw);
    }
  }
}
Program: 191553
Project: 191553
Buggy source:
@Override public boolean isFullscreen(){
  if (useCurrentBounds()) {
    return mFullscreen;
  }
  return true;
}

Fixed version (ground truth):
boolean isFullscreen(){
  if (useCurrentBounds()) {
    return mFullscreen;
  }
  return true;
}
Program: 191554
Project: 191554
Buggy source:
@Override public boolean isFullscreen(){
  return false;
}

Fixed version (ground truth):
boolean isFullscreen(){
  return false;
}
Program: 191555
Project: 191555
Buggy source:
@Override public boolean isFullscreen(){
  if (useCurrentBounds()) {
    return mFullscreen;
  }
  return true;
}

Fixed version (ground truth):
boolean isFullscreen(){
  if (useCurrentBounds()) {
    return mFullscreen;
  }
  return true;
}
Program: 191558
Project: 191558
Buggy source:
public void preloadRecents(){
  SystemServicesProxy ssp=Recents.getSystemServices();
  MutableBoolean isHomeStackVisible=new MutableBoolean(true);
  if (!ssp.isRecentsActivityVisible(isHomeStackVisible)) {
    ActivityManager.RunningTaskInfo runningTask=ssp.getRunningTask();
    RecentsTaskLoader loader=Recents.getTaskLoader();
    sInstanceLoadPlan=loader.createLoadPlan(mContext);
    sInstanceLoadPlan.preloadRawTasks(isHomeStackVisible.value);
    loader.preloadTasks(sInstanceLoadPlan,runningTask.id,isHomeStackVisible.value);
    TaskStack stack=sInstanceLoadPlan.getTaskStack();
    if (stack.getTaskCount() > 0) {
      preloadIcon(runningTask);
      updateHeaderBarLayout(stack,null);
    }
  }
}

Fixed version (ground truth):
public void preloadRecents(){
  SystemServicesProxy ssp=Recents.getSystemServices();
  MutableBoolean isHomeStackVisible=new MutableBoolean(true);
  if (!ssp.isRecentsActivityVisible(isHomeStackVisible)) {
    ActivityManager.RunningTaskInfo runningTask=ssp.getRunningTask();
    RecentsTaskLoader loader=Recents.getTaskLoader();
    sInstanceLoadPlan=loader.createLoadPlan(mContext);
    sInstanceLoadPlan.preloadRawTasks(!isHomeStackVisible.value);
    loader.preloadTasks(sInstanceLoadPlan,runningTask.id,!isHomeStackVisible.value);
    TaskStack stack=sInstanceLoadPlan.getTaskStack();
    if (stack.getTaskCount() > 0) {
      preloadIcon(runningTask);
      updateHeaderBarLayout(stack,null);
    }
  }
}
Program: 191559
Project: 191559
Buggy source:
public RecentsImpl(Context context){
  mContext=context;
  mHandler=new Handler();
  ForegroundThread.get();
  mTaskStackListener=new TaskStackListenerImpl();
  SystemServicesProxy ssp=Recents.getSystemServices();
  ssp.registerTaskStackListener(mTaskStackListener);
  LayoutInflater inflater=LayoutInflater.from(mContext);
  mDummyStackView=new TaskStackView(mContext);
  mHeaderBar=(TaskViewHeader)inflater.inflate(R.layout.recents_task_view_header,null,false);
  reloadResources();
  RecentsTaskLoader loader=Recents.getTaskLoader();
  RecentsTaskLoadPlan plan=loader.createLoadPlan(mContext);
  loader.preloadTasks(plan,-1,true);
  RecentsTaskLoadPlan.Options launchOpts=new RecentsTaskLoadPlan.Options();
  launchOpts.numVisibleTasks=loader.getIconCacheSize();
  launchOpts.numVisibleTaskThumbnails=loader.getThumbnailCacheSize();
  launchOpts.onlyLoadForCache=true;
  loader.loadTasks(mContext,plan,launchOpts);
}

Fixed version (ground truth):
public RecentsImpl(Context context){
  mContext=context;
  mHandler=new Handler();
  ForegroundThread.get();
  mTaskStackListener=new TaskStackListenerImpl();
  SystemServicesProxy ssp=Recents.getSystemServices();
  ssp.registerTaskStackListener(mTaskStackListener);
  LayoutInflater inflater=LayoutInflater.from(mContext);
  mDummyStackView=new TaskStackView(mContext);
  mHeaderBar=(TaskViewHeader)inflater.inflate(R.layout.recents_task_view_header,null,false);
  reloadResources();
  RecentsTaskLoader loader=Recents.getTaskLoader();
  RecentsTaskLoadPlan plan=loader.createLoadPlan(mContext);
  loader.preloadTasks(plan,-1,false);
  RecentsTaskLoadPlan.Options launchOpts=new RecentsTaskLoadPlan.Options();
  launchOpts.numVisibleTasks=loader.getIconCacheSize();
  launchOpts.numVisibleTaskThumbnails=loader.getThumbnailCacheSize();
  launchOpts.onlyLoadForCache=true;
  loader.loadTasks(mContext,plan,launchOpts);
}
Program: 191561
Project: 191561
Buggy source:
@Override public void onTaskStackChanged(){
  RecentsConfiguration config=Recents.getConfiguration();
  if (config.svelteLevel == RecentsConfiguration.SVELTE_NONE) {
    RecentsTaskLoader loader=Recents.getTaskLoader();
    SystemServicesProxy ssp=Recents.getSystemServices();
    ActivityManager.RunningTaskInfo runningTaskInfo=ssp.getRunningTask();
    RecentsTaskLoadPlan plan=loader.createLoadPlan(mContext);
    loader.preloadTasks(plan,-1,true);
    RecentsTaskLoadPlan.Options launchOpts=new RecentsTaskLoadPlan.Options();
    if (runningTaskInfo != null) {
      launchOpts.runningTaskId=runningTaskInfo.id;
    }
    launchOpts.numVisibleTasks=2;
    launchOpts.numVisibleTaskThumbnails=2;
    launchOpts.onlyLoadForCache=true;
    launchOpts.onlyLoadPausedActivities=true;
    loader.loadTasks(mContext,plan,launchOpts);
  }
}

Fixed version (ground truth):
@Override public void onTaskStackChanged(){
  RecentsConfiguration config=Recents.getConfiguration();
  if (config.svelteLevel == RecentsConfiguration.SVELTE_NONE) {
    RecentsTaskLoader loader=Recents.getTaskLoader();
    SystemServicesProxy ssp=Recents.getSystemServices();
    ActivityManager.RunningTaskInfo runningTaskInfo=ssp.getRunningTask();
    RecentsTaskLoadPlan plan=loader.createLoadPlan(mContext);
    loader.preloadTasks(plan,-1,false);
    RecentsTaskLoadPlan.Options launchOpts=new RecentsTaskLoadPlan.Options();
    if (runningTaskInfo != null) {
      launchOpts.runningTaskId=runningTaskInfo.id;
    }
    launchOpts.numVisibleTasks=2;
    launchOpts.numVisibleTaskThumbnails=2;
    launchOpts.onlyLoadForCache=true;
    launchOpts.onlyLoadPausedActivities=true;
    loader.loadTasks(mContext,plan,launchOpts);
  }
}