nus-yam/ex-repair huggingface dataset:
Program: 195946
Project: 195946
Buggy source:
@Override public HdmiPortInfo createFromParcel(Parcel source){
  int id=source.readInt();
  int type=source.readInt();
  int address=source.readInt();
  boolean cec=(source.readInt() == 1);
  boolean arc=(source.readInt() == 1);
  boolean mhl=(source.readInt() == 1);
  return new HdmiPortInfo(id,type,address,cec,arc,mhl);
}

Fixed version (ground truth):
@Override public HdmiPortInfo createFromParcel(Parcel source){
  int id=source.readInt();
  int type=source.readInt();
  int address=source.readInt();
  boolean cec=(source.readInt() == 1);
  boolean arc=(source.readInt() == 1);
  boolean mhl=(source.readInt() == 1);
  return new HdmiPortInfo(id,type,address,cec,mhl,arc);
}
Program: 195947
Project: 195947
Buggy source:
@Override public HdmiPortInfo createFromParcel(Parcel source){
  int id=source.readInt();
  int type=source.readInt();
  int address=source.readInt();
  boolean cec=(source.readInt() == 1);
  boolean arc=(source.readInt() == 1);
  boolean mhl=(source.readInt() == 1);
  return new HdmiPortInfo(id,type,address,cec,arc,mhl);
}

Fixed version (ground truth):
@Override public HdmiPortInfo createFromParcel(Parcel source){
  int id=source.readInt();
  int type=source.readInt();
  int address=source.readInt();
  boolean cec=(source.readInt() == 1);
  boolean arc=(source.readInt() == 1);
  boolean mhl=(source.readInt() == 1);
  return new HdmiPortInfo(id,type,address,cec,mhl,arc);
}
Program: 195948
Project: 195948
Buggy source:
/** 
 * Resets this view's properties 
 */
void resetViewProperties(){
  setDim(0);
  setLayerType(View.LAYER_TYPE_NONE,null);
  TaskViewTransform.reset(this);
}

Fixed version (ground truth):
/** 
 * Resets this view's properties 
 */
void resetViewProperties(){
  setDim(0);
  setLayerType(View.LAYER_TYPE_NONE,null);
  TaskViewTransform.reset(this);
  if (mActionButtonView != null) {
    mActionButtonView.setScaleX(1f);
    mActionButtonView.setScaleY(1f);
    mActionButtonView.setAlpha(1f);
    mActionButtonView.setTranslationZ(mActionButtonTranslationZ);
  }
}
Program: 195949
Project: 195949
Buggy source:
@Override protected void onFinishInflate(){
  mContent=findViewById(R.id.task_view_content);
  mHeaderView=(TaskViewHeader)findViewById(R.id.task_view_bar);
  mThumbnailView=(TaskViewThumbnail)findViewById(R.id.task_view_thumbnail);
  mThumbnailView.updateClipToTaskBar(mHeaderView);
  mActionButtonView=findViewById(R.id.lock_to_app_fab);
  mActionButtonView.setOutlineProvider(new ViewOutlineProvider(){
    @Override public void getOutline(    View view,    Outline outline){
      outline.setOval(0,0,mActionButtonView.getWidth(),mActionButtonView.getHeight());
    }
  }
);
}

Fixed version (ground truth):
@Override protected void onFinishInflate(){
  mContent=findViewById(R.id.task_view_content);
  mHeaderView=(TaskViewHeader)findViewById(R.id.task_view_bar);
  mThumbnailView=(TaskViewThumbnail)findViewById(R.id.task_view_thumbnail);
  mThumbnailView.updateClipToTaskBar(mHeaderView);
  mActionButtonView=findViewById(R.id.lock_to_app_fab);
  mActionButtonView.setOutlineProvider(new ViewOutlineProvider(){
    @Override public void getOutline(    View view,    Outline outline){
      outline.setOval(0,0,mActionButtonView.getWidth(),mActionButtonView.getHeight());
    }
  }
);
  mActionButtonTranslationZ=mActionButtonView.getTranslationZ();
}
Program: 195950
Project: 195950
Buggy source:
void moveTaskToFrontLocked(int taskId,int flags,Bundle options){
  if (!checkAppSwitchAllowedLocked(Binder.getCallingPid(),Binder.getCallingUid(),-1,-1,"String_Node_Str")) {
    ActivityOptions.abort(options);
    return;
  }
  final long origId=Binder.clearCallingIdentity();
  try {
    final TaskRecord task=mStackSupervisor.anyTaskForIdLocked(taskId);
    if (task == null) {
      return;
    }
    if (mStackSupervisor.isLockTaskModeViolation(task)) {
      mStackSupervisor.showLockTaskToast();
      Slog.e(TAG,"String_Node_Str");
      return;
    }
    final ActivityRecord prev=mStackSupervisor.topRunningActivityLocked();
    if (prev != null && prev.isRecentsActivity()) {
      task.setTaskToReturnTo(ActivityRecord.RECENTS_ACTIVITY_TYPE);
    }
    mStackSupervisor.findTaskToMoveToFrontLocked(task,flags,options);
  }
  finally {
    Binder.restoreCallingIdentity(origId);
  }
  ActivityOptions.abort(options);
}

Fixed version (ground truth):
void moveTaskToFrontLocked(int taskId,int flags,Bundle options){
  if (!checkAppSwitchAllowedLocked(Binder.getCallingPid(),Binder.getCallingUid(),-1,-1,"String_Node_Str")) {
    ActivityOptions.abort(options);
    return;
  }
  final long origId=Binder.clearCallingIdentity();
  try {
    final TaskRecord task=mStackSupervisor.anyTaskForIdLocked(taskId);
    if (task == null) {
      Slog.d(TAG,"String_Node_Str" + taskId);
      return;
    }
    if (mStackSupervisor.isLockTaskModeViolation(task)) {
      mStackSupervisor.showLockTaskToast();
      Slog.e(TAG,"String_Node_Str");
      return;
    }
    final ActivityRecord prev=mStackSupervisor.topRunningActivityLocked();
    if (prev != null && prev.isRecentsActivity()) {
      task.setTaskToReturnTo(ActivityRecord.RECENTS_ACTIVITY_TYPE);
    }
    mStackSupervisor.findTaskToMoveToFrontLocked(task,flags,options);
  }
  finally {
    Binder.restoreCallingIdentity(origId);
  }
  ActivityOptions.abort(options);
}
Program: 195952
Project: 195952
Buggy source:
public void onStart(){
  TaskStackViewLayoutAlgorithm.initializeCurve();
  reloadHeaderBarLayout();
  if (Constants.DebugFlags.App.EnableSearchLayout) {
    if (mConfig.searchBarAppWidgetId < 0) {
      AppWidgetHost host=new RecentsAppWidgetHost(mContext,Constants.Values.App.AppWidgetHostId);
      Pair<Integer,AppWidgetProviderInfo> widgetInfo=mSystemServicesProxy.bindSearchAppWidget(host);
      if (widgetInfo != null) {
        mConfig.updateSearchBarAppWidgetId(mContext,widgetInfo.first);
      }
    }
  }
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  RecentsTaskLoadPlan plan=loader.createLoadPlan(mContext);
  loader.preloadTasks(plan,true);
  RecentsTaskLoadPlan.Options launchOpts=new RecentsTaskLoadPlan.Options();
  launchOpts.numVisibleTasks=loader.getApplicationIconCacheSize();
  launchOpts.loadThumbnails=false;
  loader.loadTasks(mContext,plan,launchOpts);
}

Fixed version (ground truth):
public void onStart(){
  TaskStackViewLayoutAlgorithm.initializeCurve();
  reloadHeaderBarLayout();
  if (Constants.DebugFlags.App.EnableSearchLayout) {
    if (mConfig.searchBarAppWidgetId < 0) {
      AppWidgetHost host=new RecentsAppWidgetHost(mContext,Constants.Values.App.AppWidgetHostId);
      Pair<Integer,AppWidgetProviderInfo> widgetInfo=mSystemServicesProxy.bindSearchAppWidget(host);
      if (widgetInfo != null) {
        mConfig.updateSearchBarAppWidgetId(mContext,widgetInfo.first);
      }
    }
  }
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  RecentsTaskLoadPlan plan=loader.createLoadPlan(mContext);
  loader.preloadTasks(plan,true);
  RecentsTaskLoadPlan.Options launchOpts=new RecentsTaskLoadPlan.Options();
  launchOpts.numVisibleTasks=loader.getApplicationIconCacheSize();
  launchOpts.numVisibleTaskThumbnails=loader.getThumbnailCacheSize();
  launchOpts.onlyLoadForCache=true;
  loader.loadTasks(mContext,plan,launchOpts);
}
Program: 195954
Project: 195954
Buggy source:
public void loadTasks(Context context,RecentsTaskLoadPlan plan,RecentsTaskLoadPlan.Options opts){
  if (opts == null) {
    throw new RuntimeException("String_Node_Str");
  }
  plan.executePlan(opts,this);
  if (opts.numVisibleTasks > 0) {
    mNumVisibleTasksLoaded=opts.numVisibleTasks;
  }
  mLoader.start(context);
}

Fixed version (ground truth):
/** 
 * Begins loading the heavy task data according to the specified options. 
 */
public void loadTasks(Context context,RecentsTaskLoadPlan plan,RecentsTaskLoadPlan.Options opts){
  if (opts == null) {
    throw new RuntimeException("String_Node_Str");
  }
  plan.executePlan(opts,this);
  if (!opts.onlyLoadForCache) {
    mNumVisibleTasksLoaded=opts.numVisibleTasks;
    mLoader.start(context);
  }
}
Program: 195955
Project: 195955
Buggy source:
public RecentsTaskLoadPlan createLoadPlan(Context context){
  RecentsConfiguration config=RecentsConfiguration.getInstance();
  RecentsTaskLoadPlan plan=new RecentsTaskLoadPlan(context,config,mSystemServicesProxy);
  return plan;
}

Fixed version (ground truth):
/** 
 * Creates a new plan for loading the recent tasks. 
 */
public RecentsTaskLoadPlan createLoadPlan(Context context){
  RecentsConfiguration config=RecentsConfiguration.getInstance();
  RecentsTaskLoadPlan plan=new RecentsTaskLoadPlan(context,config,mSystemServicesProxy);
  return plan;
}
Program: 195956
Project: 195956
Buggy source:
public void preloadTasks(RecentsTaskLoadPlan plan,boolean isTopTaskHome){
  plan.preloadPlan(this,isTopTaskHome);
}

Fixed version (ground truth):
/** 
 * Preloads recents tasks using the specified plan to store the output. 
 */
public void preloadTasks(RecentsTaskLoadPlan plan,boolean isTopTaskHome){
  plan.preloadPlan(this,isTopTaskHome);
}
Program: 195957
Project: 195957
Buggy source:
@Override public HdmiPortInfo createFromParcel(Parcel source){
  int id=source.readInt();
  int type=source.readInt();
  int address=source.readInt();
  boolean cec=(source.readInt() == 1);
  boolean arc=(source.readInt() == 1);
  boolean mhl=(source.readInt() == 1);
  return new HdmiPortInfo(id,type,address,cec,arc,mhl);
}

Fixed version (ground truth):
@Override public HdmiPortInfo createFromParcel(Parcel source){
  int id=source.readInt();
  int type=source.readInt();
  int address=source.readInt();
  boolean cec=(source.readInt() == 1);
  boolean arc=(source.readInt() == 1);
  boolean mhl=(source.readInt() == 1);
  return new HdmiPortInfo(id,type,address,cec,mhl,arc);
}
Program: 195958
Project: 195958
Buggy source:
public void onExpansionStopped(){
  mIsExpansionChanging=false;
  mStackScrollAlgorithm.onExpansionStopped();
  if (!mIsExpanded) {
    mOwnScrollY=0;
  }
}

Fixed version (ground truth):
public void onExpansionStopped(){
  mIsExpansionChanging=false;
  mStackScrollAlgorithm.onExpansionStopped();
  if (!mIsExpanded) {
    mOwnScrollY=0;
    getOverlay().clear();
  }
}
Program: 195961
Project: 195961
Buggy source:
/** 
 * @return Can the underlying notification be cleared?
 */
public boolean isClearable(){
  return mClearable;
}

Fixed version (ground truth):
/** 
 * @return Can the underlying notification be cleared?
 */
public boolean isClearable(){
  return mStatusBarNotification != null && mStatusBarNotification.isClearable();
}
Program: 195962
Project: 195962
Buggy source:
public void setStatusBarNotification(StatusBarNotification statusBarNotification){
  mStatusBarNotification=statusBarNotification;
}

Fixed version (ground truth):
public void setStatusBarNotification(StatusBarNotification statusBarNotification){
  mStatusBarNotification=statusBarNotification;
  updateVetoButton();
}
Program: 195963
Project: 195963
Buggy source:
public void onExpansionStopped(){
  mIsExpansionChanging=false;
  mStackScrollAlgorithm.onExpansionStopped();
  if (!mIsExpanded) {
    mOwnScrollY=0;
  }
}

Fixed version (ground truth):
public void onExpansionStopped(){
  mIsExpansionChanging=false;
  mStackScrollAlgorithm.onExpansionStopped();
  if (!mIsExpanded) {
    mOwnScrollY=0;
    getOverlay().clear();
  }
}
Program: 195966
Project: 195966
Buggy source:
/** 
 * @return Can the underlying notification be cleared?
 */
public boolean isClearable(){
  return mClearable;
}

Fixed version (ground truth):
/** 
 * @return Can the underlying notification be cleared?
 */
public boolean isClearable(){
  return mStatusBarNotification != null && mStatusBarNotification.isClearable();
}
Program: 195967
Project: 195967
Buggy source:
public void setStatusBarNotification(StatusBarNotification statusBarNotification){
  mStatusBarNotification=statusBarNotification;
}

Fixed version (ground truth):
public void setStatusBarNotification(StatusBarNotification statusBarNotification){
  mStatusBarNotification=statusBarNotification;
  updateVetoButton();
}
Program: 195969
Project: 195969
Buggy source:
/** 
 * @return Can the underlying notification be cleared?
 */
public boolean isClearable(){
  return mClearable;
}

Fixed version (ground truth):
/** 
 * @return Can the underlying notification be cleared?
 */
public boolean isClearable(){
  return mStatusBarNotification != null && mStatusBarNotification.isClearable();
}
Program: 195970
Project: 195970
Buggy source:
public void setStatusBarNotification(StatusBarNotification statusBarNotification){
  mStatusBarNotification=statusBarNotification;
}

Fixed version (ground truth):
public void setStatusBarNotification(StatusBarNotification statusBarNotification){
  mStatusBarNotification=statusBarNotification;
  updateVetoButton();
}
Program: 195971
Project: 195971
Buggy source:
public void onExpansionStopped(){
  mIsExpansionChanging=false;
  mStackScrollAlgorithm.onExpansionStopped();
  if (!mIsExpanded) {
    mOwnScrollY=0;
  }
}

Fixed version (ground truth):
public void onExpansionStopped(){
  mIsExpansionChanging=false;
  mStackScrollAlgorithm.onExpansionStopped();
  if (!mIsExpanded) {
    mOwnScrollY=0;
    getOverlay().clear();
  }
}
Program: 195974
Project: 195974
Buggy source:
/** 
 * @return Can the underlying notification be cleared?
 */
public boolean isClearable(){
  return mClearable;
}

Fixed version (ground truth):
/** 
 * @return Can the underlying notification be cleared?
 */
public boolean isClearable(){
  return mStatusBarNotification != null && mStatusBarNotification.isClearable();
}
Program: 195975
Project: 195975
Buggy source:
public void setStatusBarNotification(StatusBarNotification statusBarNotification){
  mStatusBarNotification=statusBarNotification;
}

Fixed version (ground truth):
public void setStatusBarNotification(StatusBarNotification statusBarNotification){
  mStatusBarNotification=statusBarNotification;
  updateVetoButton();
}
Program: 195976
Project: 195976
Buggy source:
public void onExpansionStopped(){
  mIsExpansionChanging=false;
  mStackScrollAlgorithm.onExpansionStopped();
  if (!mIsExpanded) {
    mOwnScrollY=0;
  }
}

Fixed version (ground truth):
public void onExpansionStopped(){
  mIsExpansionChanging=false;
  mStackScrollAlgorithm.onExpansionStopped();
  if (!mIsExpanded) {
    mOwnScrollY=0;
    getOverlay().clear();
  }
}
Program: 195978
Project: 195978
Buggy source:
void removeAllWindows(){
  for (int winNdx=allAppWindows.size() - 1; winNdx >= 0; --winNdx) {
    WindowState win=allAppWindows.get(winNdx);
    if (WindowManagerService.DEBUG_WINDOW_MOVEMENT)     Slog.w(WindowManagerService.TAG,"String_Node_Str" + win);
    win.mService.removeWindowLocked(win.mSession,win);
  }
}

Fixed version (ground truth):
@Override void removeAllWindows(){
  int winNdx;
  while ((winNdx=allAppWindows.size()) > 0) {
    WindowState win=allAppWindows.get(winNdx - 1);
    if (WindowManagerService.DEBUG_WINDOW_MOVEMENT) {
      Slog.w(WindowManagerService.TAG,"String_Node_Str" + win);
    }
    win.mService.removeWindowLocked(win.mSession,win);
  }
}
Program: 195979
Project: 195979
Buggy source:
void removeAllWindows(){
  for (int winNdx=allAppWindows.size() - 1; winNdx >= 0; --winNdx) {
    WindowState win=allAppWindows.get(winNdx);
    if (WindowManagerService.DEBUG_WINDOW_MOVEMENT)     Slog.w(WindowManagerService.TAG,"String_Node_Str" + win);
    win.mService.removeWindowLocked(win.mSession,win);
  }
}

Fixed version (ground truth):
@Override void removeAllWindows(){
  int winNdx;
  while ((winNdx=allAppWindows.size()) > 0) {
    WindowState win=allAppWindows.get(winNdx - 1);
    if (WindowManagerService.DEBUG_WINDOW_MOVEMENT) {
      Slog.w(WindowManagerService.TAG,"String_Node_Str" + win);
    }
    win.mService.removeWindowLocked(win.mSession,win);
  }
}
Program: 195980
Project: 195980
Buggy source:
void removeAllWindows(){
  for (int winNdx=allAppWindows.size() - 1; winNdx >= 0; --winNdx) {
    WindowState win=allAppWindows.get(winNdx);
    if (WindowManagerService.DEBUG_WINDOW_MOVEMENT)     Slog.w(WindowManagerService.TAG,"String_Node_Str" + win);
    win.mService.removeWindowLocked(win.mSession,win);
  }
}

Fixed version (ground truth):
@Override void removeAllWindows(){
  int winNdx;
  while ((winNdx=allAppWindows.size()) > 0) {
    WindowState win=allAppWindows.get(winNdx - 1);
    if (WindowManagerService.DEBUG_WINDOW_MOVEMENT) {
      Slog.w(WindowManagerService.TAG,"String_Node_Str" + win);
    }
    win.mService.removeWindowLocked(win.mSession,win);
  }
}
Program: 195981
Project: 195981
Buggy source:
void removeAllWindows(){
  for (int winNdx=allAppWindows.size() - 1; winNdx >= 0; --winNdx) {
    WindowState win=allAppWindows.get(winNdx);
    if (WindowManagerService.DEBUG_WINDOW_MOVEMENT)     Slog.w(WindowManagerService.TAG,"String_Node_Str" + win);
    win.mService.removeWindowLocked(win.mSession,win);
  }
}

Fixed version (ground truth):
@Override void removeAllWindows(){
  int winNdx;
  while ((winNdx=allAppWindows.size()) > 0) {
    WindowState win=allAppWindows.get(winNdx - 1);
    if (WindowManagerService.DEBUG_WINDOW_MOVEMENT) {
      Slog.w(WindowManagerService.TAG,"String_Node_Str" + win);
    }
    win.mService.removeWindowLocked(win.mSession,win);
  }
}
Program: 195983
Project: 195983
Buggy source:
/** 
 * @return Can the underlying notification be cleared?
 */
public boolean isClearable(){
  return mClearable;
}

Fixed version (ground truth):
/** 
 * @return Can the underlying notification be cleared?
 */
public boolean isClearable(){
  return mStatusBarNotification != null && mStatusBarNotification.isClearable();
}
Program: 195984
Project: 195984
Buggy source:
public void setStatusBarNotification(StatusBarNotification statusBarNotification){
  mStatusBarNotification=statusBarNotification;
}

Fixed version (ground truth):
public void setStatusBarNotification(StatusBarNotification statusBarNotification){
  mStatusBarNotification=statusBarNotification;
  updateVetoButton();
}
Program: 195985
Project: 195985
Buggy source:
void removeAllWindows(){
  for (int winNdx=allAppWindows.size() - 1; winNdx >= 0; --winNdx) {
    WindowState win=allAppWindows.get(winNdx);
    if (WindowManagerService.DEBUG_WINDOW_MOVEMENT)     Slog.w(WindowManagerService.TAG,"String_Node_Str" + win);
    win.mService.removeWindowLocked(win.mSession,win);
  }
}

Fixed version (ground truth):
@Override void removeAllWindows(){
  int winNdx;
  while ((winNdx=allAppWindows.size()) > 0) {
    WindowState win=allAppWindows.get(winNdx - 1);
    if (WindowManagerService.DEBUG_WINDOW_MOVEMENT) {
      Slog.w(WindowManagerService.TAG,"String_Node_Str" + win);
    }
    win.mService.removeWindowLocked(win.mSession,win);
  }
}
Program: 195986
Project: 195986
Buggy source:
@Override protected void finalize() throws Throwable {
  try {
    destroy();
  }
  finally {
    super.finalize();
  }
}

Fixed version (ground truth):
@Override protected void finalize() throws Throwable {
  try {
    if (mCloseGuard != null) {
      mCloseGuard.warnIfOpen();
    }
    release();
  }
  finally {
    super.finalize();
  }
}
Program: 195987
Project: 195987
Buggy source:
@Override protected void finalize() throws Throwable {
  try {
    destroy();
  }
  finally {
    super.finalize();
  }
}

Fixed version (ground truth):
@Override protected void finalize() throws Throwable {
  try {
    if (mCloseGuard != null) {
      mCloseGuard.warnIfOpen();
    }
    release();
  }
  finally {
    super.finalize();
  }
}
Program: 195988
Project: 195988
Buggy source:
@Override protected void finalize() throws Throwable {
  try {
    destroy();
  }
  finally {
    super.finalize();
  }
}

Fixed version (ground truth):
@Override protected void finalize() throws Throwable {
  try {
    if (mCloseGuard != null) {
      mCloseGuard.warnIfOpen();
    }
    release();
  }
  finally {
    super.finalize();
  }
}
Program: 195989
Project: 195989
Buggy source:
@Override protected void finalize() throws Throwable {
  try {
    destroy();
  }
  finally {
    super.finalize();
  }
}

Fixed version (ground truth):
@Override protected void finalize() throws Throwable {
  try {
    if (mCloseGuard != null) {
      mCloseGuard.warnIfOpen();
    }
    release();
  }
  finally {
    super.finalize();
  }
}
Program: 195990
Project: 195990
Buggy source:
void drawHardwareLayer(HardwareLayer layer,float x,float y,Paint paint){
  layer.setLayerPaint(paint);
  nDrawLayer(mRenderer,layer.getLayer(),x,y);
}

Fixed version (ground truth):
void drawHardwareLayer(HardwareLayer layer,float x,float y,Paint paint){
  layer.setLayerPaint(paint);
  nDrawLayer(mRenderer,layer.getLayerHandle(),x,y);
}
Program: 195991
Project: 195991
Buggy source:
void drawHardwareLayer(HardwareLayer layer,float x,float y,Paint paint){
  layer.setLayerPaint(paint);
  nDrawLayer(mRenderer,layer.getLayer(),x,y);
}

Fixed version (ground truth):
void drawHardwareLayer(HardwareLayer layer,float x,float y,Paint paint){
  layer.setLayerPaint(paint);
  nDrawLayer(mRenderer,layer.getLayerHandle(),x,y);
}
Program: 195992
Project: 195992
Buggy source:
void drawHardwareLayer(HardwareLayer layer,float x,float y,Paint paint){
  layer.setLayerPaint(paint);
  nDrawLayer(mRenderer,layer.getLayer(),x,y);
}

Fixed version (ground truth):
void drawHardwareLayer(HardwareLayer layer,float x,float y,Paint paint){
  layer.setLayerPaint(paint);
  nDrawLayer(mRenderer,layer.getLayerHandle(),x,y);
}
Program: 195993
Project: 195993
Buggy source:
void drawHardwareLayer(HardwareLayer layer,float x,float y,Paint paint){
  layer.setLayerPaint(paint);
  nDrawLayer(mRenderer,layer.getLayer(),x,y);
}

Fixed version (ground truth):
void drawHardwareLayer(HardwareLayer layer,float x,float y,Paint paint){
  layer.setLayerPaint(paint);
  nDrawLayer(mRenderer,layer.getLayerHandle(),x,y);
}
Program: 195994
Project: 195994
Buggy source:
@Override public void onRestoreInstanceState(Parcelable state){
  if (!(state instanceof SavedState)) {
    super.onRestoreInstanceState(state);
    return;
  }
  SavedState ss=(SavedState)state;
  super.onRestoreInstanceState(ss.getSuperState());
  if (ss.text != null) {
    setText(ss.text);
  }
  if (ss.selStart >= 0 && ss.selEnd >= 0) {
    if (mText instanceof Spannable) {
      int len=mText.length();
      if (ss.selStart > len || ss.selEnd > len) {
        String restored="String_Node_Str";
        if (ss.text != null) {
          restored="String_Node_Str";
        }
        Log.e(LOG_TAG,"String_Node_Str" + ss.selStart + "String_Node_Str"+ ss.selEnd+ "String_Node_Str"+ restored+ "String_Node_Str"+ mText);
      }
 else {
        Selection.setSelection((Spannable)mText,ss.selStart,ss.selEnd);
        if (ss.frozenWithFocus) {
          createEditorIfNeeded();
          mEditor.mFrozenWithFocus=true;
        }
      }
    }
  }
  if (ss.error != null) {
    final CharSequence error=ss.error;
    post(new Runnable(){
      public void run(){
        setError(error);
      }
    }
);
  }
}

Fixed version (ground truth):
@Override public void onRestoreInstanceState(Parcelable state){
  if (!(state instanceof SavedState)) {
    super.onRestoreInstanceState(state);
    return;
  }
  SavedState ss=(SavedState)state;
  super.onRestoreInstanceState(ss.getSuperState());
  if (ss.text != null) {
    setText(ss.text);
  }
  if (ss.selStart >= 0 && ss.selEnd >= 0) {
    if (mText instanceof Spannable) {
      int len=mText.length();
      if (ss.selStart > len || ss.selEnd > len) {
        String restored="String_Node_Str";
        if (ss.text != null) {
          restored="String_Node_Str";
        }
        Log.e(LOG_TAG,"String_Node_Str" + ss.selStart + "String_Node_Str"+ ss.selEnd+ "String_Node_Str"+ restored+ "String_Node_Str"+ mText);
      }
 else {
        Selection.setSelection((Spannable)mText,ss.selStart,ss.selEnd);
        if (ss.frozenWithFocus) {
          createEditorIfNeeded();
          mEditor.mFrozenWithFocus=true;
        }
      }
    }
  }
  if (ss.error != null) {
    final CharSequence error=ss.error;
    post(new Runnable(){
      public void run(){
        if (mEditor == null || !mEditor.mErrorWasChanged) {
          setError(error);
        }
      }
    }
);
  }
}
Program: 195995
Project: 195995
Buggy source:
public void resetHeight(){
  super.resetHeight();
  mMaxExpandHeight=0;
  mWasReset=true;
  onHeightReset();
  requestLayout();
}

Fixed version (ground truth):
public void resetHeight(){
  if (mIsHeadsUp) {
    resetActualHeight();
  }
  mMaxExpandHeight=0;
  mWasReset=true;
  onHeightReset();
  requestLayout();
}
Program: 195996
Project: 195996
Buggy source:
/** 
 * Resets this view so it can be re-used for an updated notification.
 */
@Override public void reset(){
  super.reset();
  mRowMinHeight=0;
  final boolean wasExpanded=isExpanded();
  mRowMaxHeight=0;
  mExpandable=false;
  mHasUserChangedExpansion=false;
  mUserLocked=false;
  mShowingPublic=false;
  mSensitive=false;
  mShowingPublicInitialized=false;
  mIsSystemExpanded=false;
  mExpansionDisabled=false;
  mPublicLayout.reset();
  mPrivateLayout.reset();
  resetHeight();
  logExpansionEvent(false,wasExpanded);
}

Fixed version (ground truth):
/** 
 * Resets this view so it can be re-used for an updated notification.
 */
@Override public void reset(){
  super.reset();
  mRowMinHeight=0;
  final boolean wasExpanded=isExpanded();
  mRowMaxHeight=0;
  mExpandable=false;
  mHasUserChangedExpansion=false;
  mUserLocked=false;
  mShowingPublic=false;
  mSensitive=false;
  mShowingPublicInitialized=false;
  mIsSystemExpanded=false;
  mExpansionDisabled=false;
  mPublicLayout.reset(mIsHeadsUp);
  mPrivateLayout.reset(mIsHeadsUp);
  resetHeight();
  logExpansionEvent(false,wasExpanded);
}
Program: 195997
Project: 195997
Buggy source:
private boolean filterMotionEvent(MotionEvent event){
  return event.getActionMasked() != MotionEvent.ACTION_DOWN || event.getY() > mClipTopAmount && event.getY() < mActualHeight;
}

Fixed version (ground truth):
protected boolean filterMotionEvent(MotionEvent event){
  return event.getActionMasked() != MotionEvent.ACTION_DOWN || event.getY() > mClipTopAmount && event.getY() < mActualHeight;
}
Program: 195998
Project: 195998
Buggy source:
public NotificationContentView(Context context,AttributeSet attrs){
  super(context,attrs);
  mFadePaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.ADD));
  reset();
}

Fixed version (ground truth):
public NotificationContentView(Context context,AttributeSet attrs){
  super(context,attrs);
  mFadePaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.ADD));
  reset(true);
}
Program: 195999
Project: 195999
Buggy source:
public void reset(){
  if (mContractedChild != null) {
    mContractedChild.animate().cancel();
  }
  if (mExpandedChild != null) {
    mExpandedChild.animate().cancel();
  }
  removeAllViews();
  mContractedChild=null;
  mExpandedChild=null;
  mSmallHeight=getResources().getDimensionPixelSize(R.dimen.notification_min_height);
  mActualHeight=mSmallHeight;
  mContractedVisible=true;
}

Fixed version (ground truth):
public void reset(boolean resetActualHeight){
  if (mContractedChild != null) {
    mContractedChild.animate().cancel();
  }
  if (mExpandedChild != null) {
    mExpandedChild.animate().cancel();
  }
  removeAllViews();
  mContractedChild=null;
  mExpandedChild=null;
  mSmallHeight=getResources().getDimensionPixelSize(R.dimen.notification_min_height);
  mContractedVisible=true;
  if (resetActualHeight) {
    mActualHeight=mSmallHeight;
  }
}
Program: 196000
Project: 196000
Buggy source:
public boolean showNotification(NotificationData.Entry headsUp){
  if (mHeadsUp != null && headsUp != null && !mHeadsUp.key.equals(headsUp.key)) {
    release();
  }
  mHeadsUp=headsUp;
  if (mContentHolder != null) {
    mContentHolder.removeAllViews();
  }
  if (mHeadsUp != null) {
    mHeadsUp.row.setSystemExpanded(true);
    mHeadsUp.row.setSensitive(false);
    mHeadsUp.row.setHideSensitive(false,false,0,0);
    if (mContentHolder == null) {
      return false;
    }
    mContentHolder.setX(0);
    mContentHolder.setVisibility(View.VISIBLE);
    mContentHolder.setAlpha(mMaxAlpha);
    mContentHolder.addView(mHeadsUp.row);
    sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
    mSwipeHelper.snapChild(mContentHolder,1f);
    mStartTouchTime=System.currentTimeMillis() + mTouchSensitivityDelay;
    mHeadsUp.setInterruption();
    mBar.scheduleHeadsUpOpen();
    mBar.resetHeadsUpDecayTimer();
  }
  return true;
}

Fixed version (ground truth):
public boolean showNotification(NotificationData.Entry headsUp){
  if (mHeadsUp != null && headsUp != null && !mHeadsUp.key.equals(headsUp.key)) {
    release();
  }
  mHeadsUp=headsUp;
  if (mContentHolder != null) {
    mContentHolder.removeAllViews();
  }
  if (mHeadsUp != null) {
    mHeadsUp.row.setSystemExpanded(true);
    mHeadsUp.row.setSensitive(false);
    mHeadsUp.row.setHeadsUp(true);
    mHeadsUp.row.setHideSensitive(false,false,0,0);
    if (mContentHolder == null) {
      return false;
    }
    mContentHolder.setX(0);
    mContentHolder.setVisibility(View.VISIBLE);
    mContentHolder.setAlpha(mMaxAlpha);
    mContentHolder.addView(mHeadsUp.row);
    sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
    mSwipeHelper.snapChild(mContentHolder,1f);
    mStartTouchTime=System.currentTimeMillis() + mTouchSensitivityDelay;
    mHeadsUp.setInterruption();
    mBar.scheduleHeadsUpOpen();
    mBar.resetHeadsUpDecayTimer();
  }
  return true;
}
Program: 196001
Project: 196001
Buggy source:
public void resetHeight(){
  super.resetHeight();
  mMaxExpandHeight=0;
  mWasReset=true;
  onHeightReset();
  requestLayout();
}

Fixed version (ground truth):
public void resetHeight(){
  if (mIsHeadsUp) {
    resetActualHeight();
  }
  mMaxExpandHeight=0;
  mWasReset=true;
  onHeightReset();
  requestLayout();
}
Program: 196002
Project: 196002
Buggy source:
/** 
 * Resets this view so it can be re-used for an updated notification.
 */
@Override public void reset(){
  super.reset();
  mRowMinHeight=0;
  final boolean wasExpanded=isExpanded();
  mRowMaxHeight=0;
  mExpandable=false;
  mHasUserChangedExpansion=false;
  mUserLocked=false;
  mShowingPublic=false;
  mSensitive=false;
  mShowingPublicInitialized=false;
  mIsSystemExpanded=false;
  mExpansionDisabled=false;
  mPublicLayout.reset();
  mPrivateLayout.reset();
  resetHeight();
  logExpansionEvent(false,wasExpanded);
}

Fixed version (ground truth):
/** 
 * Resets this view so it can be re-used for an updated notification.
 */
@Override public void reset(){
  super.reset();
  mRowMinHeight=0;
  final boolean wasExpanded=isExpanded();
  mRowMaxHeight=0;
  mExpandable=false;
  mHasUserChangedExpansion=false;
  mUserLocked=false;
  mShowingPublic=false;
  mSensitive=false;
  mShowingPublicInitialized=false;
  mIsSystemExpanded=false;
  mExpansionDisabled=false;
  mPublicLayout.reset(mIsHeadsUp);
  mPrivateLayout.reset(mIsHeadsUp);
  resetHeight();
  logExpansionEvent(false,wasExpanded);
}
Program: 196003
Project: 196003
Buggy source:
private boolean filterMotionEvent(MotionEvent event){
  return event.getActionMasked() != MotionEvent.ACTION_DOWN || event.getY() > mClipTopAmount && event.getY() < mActualHeight;
}

Fixed version (ground truth):
protected boolean filterMotionEvent(MotionEvent event){
  return event.getActionMasked() != MotionEvent.ACTION_DOWN || event.getY() > mClipTopAmount && event.getY() < mActualHeight;
}
Program: 196004
Project: 196004
Buggy source:
public NotificationContentView(Context context,AttributeSet attrs){
  super(context,attrs);
  mFadePaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.ADD));
  reset();
}

Fixed version (ground truth):
public NotificationContentView(Context context,AttributeSet attrs){
  super(context,attrs);
  mFadePaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.ADD));
  reset(true);
}
Program: 196005
Project: 196005
Buggy source:
public void reset(){
  if (mContractedChild != null) {
    mContractedChild.animate().cancel();
  }
  if (mExpandedChild != null) {
    mExpandedChild.animate().cancel();
  }
  removeAllViews();
  mContractedChild=null;
  mExpandedChild=null;
  mSmallHeight=getResources().getDimensionPixelSize(R.dimen.notification_min_height);
  mActualHeight=mSmallHeight;
  mContractedVisible=true;
}

Fixed version (ground truth):
public void reset(boolean resetActualHeight){
  if (mContractedChild != null) {
    mContractedChild.animate().cancel();
  }
  if (mExpandedChild != null) {
    mExpandedChild.animate().cancel();
  }
  removeAllViews();
  mContractedChild=null;
  mExpandedChild=null;
  mSmallHeight=getResources().getDimensionPixelSize(R.dimen.notification_min_height);
  mContractedVisible=true;
  if (resetActualHeight) {
    mActualHeight=mSmallHeight;
  }
}
Program: 196006
Project: 196006
Buggy source:
public boolean showNotification(NotificationData.Entry headsUp){
  if (mHeadsUp != null && headsUp != null && !mHeadsUp.key.equals(headsUp.key)) {
    release();
  }
  mHeadsUp=headsUp;
  if (mContentHolder != null) {
    mContentHolder.removeAllViews();
  }
  if (mHeadsUp != null) {
    mHeadsUp.row.setSystemExpanded(true);
    mHeadsUp.row.setSensitive(false);
    mHeadsUp.row.setHideSensitive(false,false,0,0);
    if (mContentHolder == null) {
      return false;
    }
    mContentHolder.setX(0);
    mContentHolder.setVisibility(View.VISIBLE);
    mContentHolder.setAlpha(mMaxAlpha);
    mContentHolder.addView(mHeadsUp.row);
    sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
    mSwipeHelper.snapChild(mContentHolder,1f);
    mStartTouchTime=System.currentTimeMillis() + mTouchSensitivityDelay;
    mHeadsUp.setInterruption();
    mBar.scheduleHeadsUpOpen();
    mBar.resetHeadsUpDecayTimer();
  }
  return true;
}

Fixed version (ground truth):
public boolean showNotification(NotificationData.Entry headsUp){
  if (mHeadsUp != null && headsUp != null && !mHeadsUp.key.equals(headsUp.key)) {
    release();
  }
  mHeadsUp=headsUp;
  if (mContentHolder != null) {
    mContentHolder.removeAllViews();
  }
  if (mHeadsUp != null) {
    mHeadsUp.row.setSystemExpanded(true);
    mHeadsUp.row.setSensitive(false);
    mHeadsUp.row.setHeadsUp(true);
    mHeadsUp.row.setHideSensitive(false,false,0,0);
    if (mContentHolder == null) {
      return false;
    }
    mContentHolder.setX(0);
    mContentHolder.setVisibility(View.VISIBLE);
    mContentHolder.setAlpha(mMaxAlpha);
    mContentHolder.addView(mHeadsUp.row);
    sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
    mSwipeHelper.snapChild(mContentHolder,1f);
    mStartTouchTime=System.currentTimeMillis() + mTouchSensitivityDelay;
    mHeadsUp.setInterruption();
    mBar.scheduleHeadsUpOpen();
    mBar.resetHeadsUpDecayTimer();
  }
  return true;
}
Program: 196007
Project: 196007
Buggy source:
@Override public boolean onInterceptTouchEvent(MotionEvent ev){
switch (ev.getActionMasked()) {
case MotionEvent.ACTION_DOWN:
    if (DEBUG_EDGE_SWIPE)     Log.d(TAG,"String_Node_Str" + ev.getY());
  mFirstX=ev.getX();
mFirstY=ev.getY();
mConsuming=false;
break;
case MotionEvent.ACTION_MOVE:
if (DEBUG_EDGE_SWIPE) Log.d(TAG,"String_Node_Str" + ev.getY());
final float dY=ev.getY() - mFirstY;
final float daX=Math.abs(ev.getX() - mFirstX);
final float daY=Math.abs(dY);
if (!mConsuming && (4f * daX) < daY && daY > mTouchSlop) {
if (dY > 0) {
if (DEBUG_EDGE_SWIPE) Log.d(TAG,"String_Node_Str");
mBar.animateExpandNotificationsPanel();
}
if (dY < 0) {
if (DEBUG_EDGE_SWIPE) Log.d(TAG,"String_Node_Str");
mBar.onHeadsUpDismissed();
}
mConsuming=true;
}
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
if (DEBUG_EDGE_SWIPE) Log.d(TAG,"String_Node_Str");
mConsuming=false;
break;
}
return mConsuming;
}

Fixed version (ground truth):
@Override public boolean onInterceptTouchEvent(MotionEvent ev){
switch (ev.getActionMasked()) {
case MotionEvent.ACTION_DOWN:
    if (DEBUG_EDGE_SWIPE)     Log.d(TAG,"String_Node_Str" + ev.getY());
  mFirstX=ev.getX();
mFirstY=ev.getY();
mConsuming=false;
break;
case MotionEvent.ACTION_MOVE:
if (DEBUG_EDGE_SWIPE) Log.d(TAG,"String_Node_Str" + ev.getY());
final float dY=ev.getY() - mFirstY;
final float daX=Math.abs(ev.getX() - mFirstX);
final float daY=Math.abs(dY);
if (!mConsuming && daX < daY && daY > mTouchSlop) {
if (dY > 0) {
if (DEBUG_EDGE_SWIPE) Log.d(TAG,"String_Node_Str");
mBar.animateExpandNotificationsPanel();
}
if (dY < 0) {
if (DEBUG_EDGE_SWIPE) Log.d(TAG,"String_Node_Str");
mBar.onHeadsUpDismissed();
}
mConsuming=true;
}
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
if (DEBUG_EDGE_SWIPE) Log.d(TAG,"String_Node_Str");
mConsuming=false;
break;
}
return mConsuming;
}
Program: 196008
Project: 196008
Buggy source:
@Override public void onAttachedToWindow(){
  final ViewConfiguration viewConfiguration=ViewConfiguration.get(getContext());
  float touchSlop=viewConfiguration.getScaledTouchSlop();
  mSwipeHelper=new SwipeHelper(SwipeHelper.X,this,getContext());
  mSwipeHelper.setMaxSwipeProgress(mMaxAlpha);
  mEdgeSwipeHelper=new EdgeSwipeHelper(touchSlop);
  int minHeight=getResources().getDimensionPixelSize(R.dimen.notification_min_height);
  int maxHeight=getResources().getDimensionPixelSize(R.dimen.notification_max_height);
  mExpandHelper=new ExpandHelper(getContext(),this,minHeight,maxHeight);
  mContentHolder=(ViewGroup)findViewById(R.id.content_holder);
  mContentHolder.setOutlineProvider(CONTENT_HOLDER_OUTLINE_PROVIDER);
  if (mHeadsUp != null) {
    showNotification(mHeadsUp);
  }
  getViewTreeObserver().addOnComputeInternalInsetsListener(this);
}

Fixed version (ground truth):
@Override public void onAttachedToWindow(){
  final ViewConfiguration viewConfiguration=ViewConfiguration.get(getContext());
  float touchSlop=viewConfiguration.getScaledTouchSlop();
  mSwipeHelper=new SwipeHelper(SwipeHelper.X,this,getContext());
  mSwipeHelper.setMaxSwipeProgress(mMaxAlpha);
  mEdgeSwipeHelper=new EdgeSwipeHelper(touchSlop);
  int minHeight=getResources().getDimensionPixelSize(R.dimen.notification_min_height);
  int maxHeight=getResources().getDimensionPixelSize(R.dimen.notification_max_height);
  mContentHolder=(ViewGroup)findViewById(R.id.content_holder);
  mContentHolder.setOutlineProvider(CONTENT_HOLDER_OUTLINE_PROVIDER);
  if (mHeadsUp != null) {
    showNotification(mHeadsUp);
  }
  getViewTreeObserver().addOnComputeInternalInsetsListener(this);
}
Program: 196009
Project: 196009
Buggy source:
@Override public boolean onInterceptTouchEvent(MotionEvent ev){
switch (ev.getActionMasked()) {
case MotionEvent.ACTION_DOWN:
    if (DEBUG_EDGE_SWIPE)     Log.d(TAG,"String_Node_Str" + ev.getY());
  mFirstX=ev.getX();
mFirstY=ev.getY();
mConsuming=false;
break;
case MotionEvent.ACTION_MOVE:
if (DEBUG_EDGE_SWIPE) Log.d(TAG,"String_Node_Str" + ev.getY());
final float dY=ev.getY() - mFirstY;
final float daX=Math.abs(ev.getX() - mFirstX);
final float daY=Math.abs(dY);
if (!mConsuming && (4f * daX) < daY && daY > mTouchSlop) {
if (dY > 0) {
if (DEBUG_EDGE_SWIPE) Log.d(TAG,"String_Node_Str");
mBar.animateExpandNotificationsPanel();
}
if (dY < 0) {
if (DEBUG_EDGE_SWIPE) Log.d(TAG,"String_Node_Str");
mBar.onHeadsUpDismissed();
}
mConsuming=true;
}
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
if (DEBUG_EDGE_SWIPE) Log.d(TAG,"String_Node_Str");
mConsuming=false;
break;
}
return mConsuming;
}

Fixed version (ground truth):
@Override public boolean onInterceptTouchEvent(MotionEvent ev){
switch (ev.getActionMasked()) {
case MotionEvent.ACTION_DOWN:
    if (DEBUG_EDGE_SWIPE)     Log.d(TAG,"String_Node_Str" + ev.getY());
  mFirstX=ev.getX();
mFirstY=ev.getY();
mConsuming=false;
break;
case MotionEvent.ACTION_MOVE:
if (DEBUG_EDGE_SWIPE) Log.d(TAG,"String_Node_Str" + ev.getY());
final float dY=ev.getY() - mFirstY;
final float daX=Math.abs(ev.getX() - mFirstX);
final float daY=Math.abs(dY);
if (!mConsuming && daX < daY && daY > mTouchSlop) {
if (dY > 0) {
if (DEBUG_EDGE_SWIPE) Log.d(TAG,"String_Node_Str");
mBar.animateExpandNotificationsPanel();
}
if (dY < 0) {
if (DEBUG_EDGE_SWIPE) Log.d(TAG,"String_Node_Str");
mBar.onHeadsUpDismissed();
}
mConsuming=true;
}
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
if (DEBUG_EDGE_SWIPE) Log.d(TAG,"String_Node_Str");
mConsuming=false;
break;
}
return mConsuming;
}
Program: 196010
Project: 196010
Buggy source:
@Override public void onAttachedToWindow(){
  final ViewConfiguration viewConfiguration=ViewConfiguration.get(getContext());
  float touchSlop=viewConfiguration.getScaledTouchSlop();
  mSwipeHelper=new SwipeHelper(SwipeHelper.X,this,getContext());
  mSwipeHelper.setMaxSwipeProgress(mMaxAlpha);
  mEdgeSwipeHelper=new EdgeSwipeHelper(touchSlop);
  int minHeight=getResources().getDimensionPixelSize(R.dimen.notification_min_height);
  int maxHeight=getResources().getDimensionPixelSize(R.dimen.notification_max_height);
  mExpandHelper=new ExpandHelper(getContext(),this,minHeight,maxHeight);
  mContentHolder=(ViewGroup)findViewById(R.id.content_holder);
  mContentHolder.setOutlineProvider(CONTENT_HOLDER_OUTLINE_PROVIDER);
  if (mHeadsUp != null) {
    showNotification(mHeadsUp);
  }
  getViewTreeObserver().addOnComputeInternalInsetsListener(this);
}

Fixed version (ground truth):
@Override public void onAttachedToWindow(){
  final ViewConfiguration viewConfiguration=ViewConfiguration.get(getContext());
  float touchSlop=viewConfiguration.getScaledTouchSlop();
  mSwipeHelper=new SwipeHelper(SwipeHelper.X,this,getContext());
  mSwipeHelper.setMaxSwipeProgress(mMaxAlpha);
  mEdgeSwipeHelper=new EdgeSwipeHelper(touchSlop);
  int minHeight=getResources().getDimensionPixelSize(R.dimen.notification_min_height);
  int maxHeight=getResources().getDimensionPixelSize(R.dimen.notification_max_height);
  mContentHolder=(ViewGroup)findViewById(R.id.content_holder);
  mContentHolder.setOutlineProvider(CONTENT_HOLDER_OUTLINE_PROVIDER);
  if (mHeadsUp != null) {
    showNotification(mHeadsUp);
  }
  getViewTreeObserver().addOnComputeInternalInsetsListener(this);
}
Program: 196011
Project: 196011
Buggy source:
public void resetHeight(){
  super.resetHeight();
  mMaxExpandHeight=0;
  mWasReset=true;
  onHeightReset();
  requestLayout();
}

Fixed version (ground truth):
public void resetHeight(){
  if (mIsHeadsUp) {
    resetActualHeight();
  }
  mMaxExpandHeight=0;
  mWasReset=true;
  onHeightReset();
  requestLayout();
}
Program: 196012
Project: 196012
Buggy source:
/** 
 * Resets this view so it can be re-used for an updated notification.
 */
@Override public void reset(){
  super.reset();
  mRowMinHeight=0;
  final boolean wasExpanded=isExpanded();
  mRowMaxHeight=0;
  mExpandable=false;
  mHasUserChangedExpansion=false;
  mUserLocked=false;
  mShowingPublic=false;
  mSensitive=false;
  mShowingPublicInitialized=false;
  mIsSystemExpanded=false;
  mExpansionDisabled=false;
  mPublicLayout.reset();
  mPrivateLayout.reset();
  resetHeight();
  logExpansionEvent(false,wasExpanded);
}

Fixed version (ground truth):
/** 
 * Resets this view so it can be re-used for an updated notification.
 */
@Override public void reset(){
  super.reset();
  mRowMinHeight=0;
  final boolean wasExpanded=isExpanded();
  mRowMaxHeight=0;
  mExpandable=false;
  mHasUserChangedExpansion=false;
  mUserLocked=false;
  mShowingPublic=false;
  mSensitive=false;
  mShowingPublicInitialized=false;
  mIsSystemExpanded=false;
  mExpansionDisabled=false;
  mPublicLayout.reset(mIsHeadsUp);
  mPrivateLayout.reset(mIsHeadsUp);
  resetHeight();
  logExpansionEvent(false,wasExpanded);
}
Program: 196013
Project: 196013
Buggy source:
private boolean filterMotionEvent(MotionEvent event){
  return event.getActionMasked() != MotionEvent.ACTION_DOWN || event.getY() > mClipTopAmount && event.getY() < mActualHeight;
}

Fixed version (ground truth):
protected boolean filterMotionEvent(MotionEvent event){
  return event.getActionMasked() != MotionEvent.ACTION_DOWN || event.getY() > mClipTopAmount && event.getY() < mActualHeight;
}
Program: 196014
Project: 196014
Buggy source:
public NotificationContentView(Context context,AttributeSet attrs){
  super(context,attrs);
  mFadePaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.ADD));
  reset();
}

Fixed version (ground truth):
public NotificationContentView(Context context,AttributeSet attrs){
  super(context,attrs);
  mFadePaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.ADD));
  reset(true);
}
Program: 196015
Project: 196015
Buggy source:
public void reset(){
  if (mContractedChild != null) {
    mContractedChild.animate().cancel();
  }
  if (mExpandedChild != null) {
    mExpandedChild.animate().cancel();
  }
  removeAllViews();
  mContractedChild=null;
  mExpandedChild=null;
  mSmallHeight=getResources().getDimensionPixelSize(R.dimen.notification_min_height);
  mActualHeight=mSmallHeight;
  mContractedVisible=true;
}

Fixed version (ground truth):
public void reset(boolean resetActualHeight){
  if (mContractedChild != null) {
    mContractedChild.animate().cancel();
  }
  if (mExpandedChild != null) {
    mExpandedChild.animate().cancel();
  }
  removeAllViews();
  mContractedChild=null;
  mExpandedChild=null;
  mSmallHeight=getResources().getDimensionPixelSize(R.dimen.notification_min_height);
  mContractedVisible=true;
  if (resetActualHeight) {
    mActualHeight=mSmallHeight;
  }
}
Program: 196016
Project: 196016
Buggy source:
public boolean showNotification(NotificationData.Entry headsUp){
  if (mHeadsUp != null && headsUp != null && !mHeadsUp.key.equals(headsUp.key)) {
    release();
  }
  mHeadsUp=headsUp;
  if (mContentHolder != null) {
    mContentHolder.removeAllViews();
  }
  if (mHeadsUp != null) {
    mHeadsUp.row.setSystemExpanded(true);
    mHeadsUp.row.setSensitive(false);
    mHeadsUp.row.setHideSensitive(false,false,0,0);
    if (mContentHolder == null) {
      return false;
    }
    mContentHolder.setX(0);
    mContentHolder.setVisibility(View.VISIBLE);
    mContentHolder.setAlpha(mMaxAlpha);
    mContentHolder.addView(mHeadsUp.row);
    sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
    mSwipeHelper.snapChild(mContentHolder,1f);
    mStartTouchTime=System.currentTimeMillis() + mTouchSensitivityDelay;
    mHeadsUp.setInterruption();
    mBar.scheduleHeadsUpOpen();
    mBar.resetHeadsUpDecayTimer();
  }
  return true;
}

Fixed version (ground truth):
public boolean showNotification(NotificationData.Entry headsUp){
  if (mHeadsUp != null && headsUp != null && !mHeadsUp.key.equals(headsUp.key)) {
    release();
  }
  mHeadsUp=headsUp;
  if (mContentHolder != null) {
    mContentHolder.removeAllViews();
  }
  if (mHeadsUp != null) {
    mHeadsUp.row.setSystemExpanded(true);
    mHeadsUp.row.setSensitive(false);
    mHeadsUp.row.setHeadsUp(true);
    mHeadsUp.row.setHideSensitive(false,false,0,0);
    if (mContentHolder == null) {
      return false;
    }
    mContentHolder.setX(0);
    mContentHolder.setVisibility(View.VISIBLE);
    mContentHolder.setAlpha(mMaxAlpha);
    mContentHolder.addView(mHeadsUp.row);
    sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
    mSwipeHelper.snapChild(mContentHolder,1f);
    mStartTouchTime=System.currentTimeMillis() + mTouchSensitivityDelay;
    mHeadsUp.setInterruption();
    mBar.scheduleHeadsUpOpen();
    mBar.resetHeadsUpDecayTimer();
  }
  return true;
}
Program: 196017
Project: 196017
Buggy source:
public void resetHeight(){
  super.resetHeight();
  mMaxExpandHeight=0;
  mWasReset=true;
  onHeightReset();
  requestLayout();
}

Fixed version (ground truth):
public void resetHeight(){
  if (mIsHeadsUp) {
    resetActualHeight();
  }
  mMaxExpandHeight=0;
  mWasReset=true;
  onHeightReset();
  requestLayout();
}
Program: 196018
Project: 196018
Buggy source:
/** 
 * Resets this view so it can be re-used for an updated notification.
 */
@Override public void reset(){
  super.reset();
  mRowMinHeight=0;
  final boolean wasExpanded=isExpanded();
  mRowMaxHeight=0;
  mExpandable=false;
  mHasUserChangedExpansion=false;
  mUserLocked=false;
  mShowingPublic=false;
  mSensitive=false;
  mShowingPublicInitialized=false;
  mIsSystemExpanded=false;
  mExpansionDisabled=false;
  mPublicLayout.reset();
  mPrivateLayout.reset();
  resetHeight();
  logExpansionEvent(false,wasExpanded);
}

Fixed version (ground truth):
/** 
 * Resets this view so it can be re-used for an updated notification.
 */
@Override public void reset(){
  super.reset();
  mRowMinHeight=0;
  final boolean wasExpanded=isExpanded();
  mRowMaxHeight=0;
  mExpandable=false;
  mHasUserChangedExpansion=false;
  mUserLocked=false;
  mShowingPublic=false;
  mSensitive=false;
  mShowingPublicInitialized=false;
  mIsSystemExpanded=false;
  mExpansionDisabled=false;
  mPublicLayout.reset(mIsHeadsUp);
  mPrivateLayout.reset(mIsHeadsUp);
  resetHeight();
  logExpansionEvent(false,wasExpanded);
}