nus-yam/ex-repair huggingface dataset:
Program: 193774
Project: 193774
Buggy source:
void dumpRuntimePermissionsLPr(PrintWriter pw,String prefix,ArraySet<String> permissionNames,List<PermissionState> permissionStates){
  if (!permissionStates.isEmpty()) {
    pw.print(prefix);
    pw.println("String_Node_Str");
    for (    PermissionState permissionState : permissionStates) {
      if (permissionNames != null && !permissionNames.contains(permissionState.getName())) {
        continue;
      }
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(permissionState.getName());
      pw.print("String_Node_Str");
      pw.print(permissionState.isGranted());
      pw.println(permissionFlagsToString("String_Node_Str",permissionState.getFlags()));
    }
  }
}

Fixed version (ground truth):
void dumpRuntimePermissionsLPr(PrintWriter pw,String prefix,ArraySet<String> permissionNames,List<PermissionState> permissionStates,boolean dumpAll){
  if (!permissionStates.isEmpty() || dumpAll) {
    pw.print(prefix);
    pw.println("String_Node_Str");
    for (    PermissionState permissionState : permissionStates) {
      if (permissionNames != null && !permissionNames.contains(permissionState.getName())) {
        continue;
      }
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(permissionState.getName());
      pw.print("String_Node_Str");
      pw.print(permissionState.isGranted());
      pw.println(permissionFlagsToString("String_Node_Str",permissionState.getFlags()));
    }
  }
}
Program: 193781
Project: 193781
Buggy source:
void dumpRuntimePermissionsLPr(PrintWriter pw,String prefix,ArraySet<String> permissionNames,List<PermissionState> permissionStates){
  if (!permissionStates.isEmpty()) {
    pw.print(prefix);
    pw.println("String_Node_Str");
    for (    PermissionState permissionState : permissionStates) {
      if (permissionNames != null && !permissionNames.contains(permissionState.getName())) {
        continue;
      }
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(permissionState.getName());
      pw.print("String_Node_Str");
      pw.print(permissionState.isGranted());
      pw.println(permissionFlagsToString("String_Node_Str",permissionState.getFlags()));
    }
  }
}

Fixed version (ground truth):
void dumpRuntimePermissionsLPr(PrintWriter pw,String prefix,ArraySet<String> permissionNames,List<PermissionState> permissionStates,boolean dumpAll){
  if (!permissionStates.isEmpty() || dumpAll) {
    pw.print(prefix);
    pw.println("String_Node_Str");
    for (    PermissionState permissionState : permissionStates) {
      if (permissionNames != null && !permissionNames.contains(permissionState.getName())) {
        continue;
      }
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(permissionState.getName());
      pw.print("String_Node_Str");
      pw.print(permissionState.isGranted());
      pw.println(permissionFlagsToString("String_Node_Str",permissionState.getFlags()));
    }
  }
}
Program: 193788
Project: 193788
Buggy source:
void dumpRuntimePermissionsLPr(PrintWriter pw,String prefix,ArraySet<String> permissionNames,List<PermissionState> permissionStates){
  if (!permissionStates.isEmpty()) {
    pw.print(prefix);
    pw.println("String_Node_Str");
    for (    PermissionState permissionState : permissionStates) {
      if (permissionNames != null && !permissionNames.contains(permissionState.getName())) {
        continue;
      }
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(permissionState.getName());
      pw.print("String_Node_Str");
      pw.print(permissionState.isGranted());
      pw.println(permissionFlagsToString("String_Node_Str",permissionState.getFlags()));
    }
  }
}

Fixed version (ground truth):
void dumpRuntimePermissionsLPr(PrintWriter pw,String prefix,ArraySet<String> permissionNames,List<PermissionState> permissionStates,boolean dumpAll){
  if (!permissionStates.isEmpty() || dumpAll) {
    pw.print(prefix);
    pw.println("String_Node_Str");
    for (    PermissionState permissionState : permissionStates) {
      if (permissionNames != null && !permissionNames.contains(permissionState.getName())) {
        continue;
      }
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(permissionState.getName());
      pw.print("String_Node_Str");
      pw.print(permissionState.isGranted());
      pw.println(permissionFlagsToString("String_Node_Str",permissionState.getFlags()));
    }
  }
}
Program: 193795
Project: 193795
Buggy source:
void dumpRuntimePermissionsLPr(PrintWriter pw,String prefix,ArraySet<String> permissionNames,List<PermissionState> permissionStates){
  if (!permissionStates.isEmpty()) {
    pw.print(prefix);
    pw.println("String_Node_Str");
    for (    PermissionState permissionState : permissionStates) {
      if (permissionNames != null && !permissionNames.contains(permissionState.getName())) {
        continue;
      }
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(permissionState.getName());
      pw.print("String_Node_Str");
      pw.print(permissionState.isGranted());
      pw.println(permissionFlagsToString("String_Node_Str",permissionState.getFlags()));
    }
  }
}

Fixed version (ground truth):
void dumpRuntimePermissionsLPr(PrintWriter pw,String prefix,ArraySet<String> permissionNames,List<PermissionState> permissionStates,boolean dumpAll){
  if (!permissionStates.isEmpty() || dumpAll) {
    pw.print(prefix);
    pw.println("String_Node_Str");
    for (    PermissionState permissionState : permissionStates) {
      if (permissionNames != null && !permissionNames.contains(permissionState.getName())) {
        continue;
      }
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(permissionState.getName());
      pw.print("String_Node_Str");
      pw.print(permissionState.isGranted());
      pw.println(permissionFlagsToString("String_Node_Str",permissionState.getFlags()));
    }
  }
}
Program: 193802
Project: 193802
Buggy source:
void dumpRuntimePermissionsLPr(PrintWriter pw,String prefix,ArraySet<String> permissionNames,List<PermissionState> permissionStates){
  if (!permissionStates.isEmpty()) {
    pw.print(prefix);
    pw.println("String_Node_Str");
    for (    PermissionState permissionState : permissionStates) {
      if (permissionNames != null && !permissionNames.contains(permissionState.getName())) {
        continue;
      }
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(permissionState.getName());
      pw.print("String_Node_Str");
      pw.print(permissionState.isGranted());
      pw.println(permissionFlagsToString("String_Node_Str",permissionState.getFlags()));
    }
  }
}

Fixed version (ground truth):
void dumpRuntimePermissionsLPr(PrintWriter pw,String prefix,ArraySet<String> permissionNames,List<PermissionState> permissionStates,boolean dumpAll){
  if (!permissionStates.isEmpty() || dumpAll) {
    pw.print(prefix);
    pw.println("String_Node_Str");
    for (    PermissionState permissionState : permissionStates) {
      if (permissionNames != null && !permissionNames.contains(permissionState.getName())) {
        continue;
      }
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(permissionState.getName());
      pw.print("String_Node_Str");
      pw.print(permissionState.isGranted());
      pw.println(permissionFlagsToString("String_Node_Str",permissionState.getFlags()));
    }
  }
}
Program: 193809
Project: 193809
Buggy source:
void dumpRuntimePermissionsLPr(PrintWriter pw,String prefix,ArraySet<String> permissionNames,List<PermissionState> permissionStates){
  if (!permissionStates.isEmpty()) {
    pw.print(prefix);
    pw.println("String_Node_Str");
    for (    PermissionState permissionState : permissionStates) {
      if (permissionNames != null && !permissionNames.contains(permissionState.getName())) {
        continue;
      }
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(permissionState.getName());
      pw.print("String_Node_Str");
      pw.print(permissionState.isGranted());
      pw.println(permissionFlagsToString("String_Node_Str",permissionState.getFlags()));
    }
  }
}

Fixed version (ground truth):
void dumpRuntimePermissionsLPr(PrintWriter pw,String prefix,ArraySet<String> permissionNames,List<PermissionState> permissionStates,boolean dumpAll){
  if (!permissionStates.isEmpty() || dumpAll) {
    pw.print(prefix);
    pw.println("String_Node_Str");
    for (    PermissionState permissionState : permissionStates) {
      if (permissionNames != null && !permissionNames.contains(permissionState.getName())) {
        continue;
      }
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(permissionState.getName());
      pw.print("String_Node_Str");
      pw.print(permissionState.isGranted());
      pw.println(permissionFlagsToString("String_Node_Str",permissionState.getFlags()));
    }
  }
}
Program: 193812
Project: 193812
Buggy source:
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  WindowInsets insets=getRootWindowInsets();
  int systemMargin=insets.getSystemWindowInsetTop();
  final int leftPos=getPaddingLeft();
  final int rightPos=right - left - getPaddingRight();
  final int topPos=getPaddingTop();
  final int bottomPos=bottom - top - getPaddingBottom();
  final int width=rightPos - leftPos;
  final View caption=getChildAt(0);
  updateElevation();
  mAllowUpdateElevation=true;
  final int captionHeight=(isFillingScreen() || !mShowDecor) ? 0 : caption.getMeasuredHeight();
  caption.layout(leftPos,topPos + systemMargin,leftPos + width,topPos + systemMargin + captionHeight);
  if (getChildCount() > 1) {
    getChildAt(1).layout(leftPos,topPos + captionHeight,leftPos + width,bottomPos);
  }
}

Fixed version (ground truth):
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  updateElevation();
  mAllowUpdateElevation=true;
  super.onLayout(changed,left,top,right,bottom);
}
Program: 193813
Project: 193813
Buggy source:
@Override public void addView(View child,int index,LayoutParams params){
  if (index >= 2 || getChildCount() >= 2) {
    throw new IllegalStateException("String_Node_Str");
  }
  super.addView(child,index,params);
}

Fixed version (ground truth):
@Override public void addView(View child,int index,ViewGroup.LayoutParams params){
  if (index >= 2 || getChildCount() >= 2) {
    throw new IllegalStateException("String_Node_Str");
  }
  super.addView(child,index,params);
}
Program: 193814
Project: 193814
Buggy source:
public void setPhoneWindow(PhoneWindow owner,boolean showDecor,boolean windowHasShadow){
  mOwner=owner;
  mWindowHasShadow=windowHasShadow;
  mShowDecor=showDecor;
  if (mWindowHasShadow) {
    initializeElevation();
  }
  mOwner.getDecorView().setOutlineProvider(ViewOutlineProvider.BOUNDS);
  findViewById(R.id.maximize_window).setOnClickListener(this);
  findViewById(R.id.close_window).setOnClickListener(this);
}

Fixed version (ground truth):
public void setPhoneWindow(PhoneWindow owner,boolean showDecor,boolean windowHasShadow){
  mOwner=owner;
  mWindowHasShadow=windowHasShadow;
  mShowDecor=showDecor;
  updateCaptionVisibility();
  if (mWindowHasShadow) {
    initializeElevation();
  }
  mOwner.getDecorView().setOutlineProvider(ViewOutlineProvider.BOUNDS);
  findViewById(R.id.maximize_window).setOnClickListener(this);
  findViewById(R.id.close_window).setOnClickListener(this);
}
Program: 193815
Project: 193815
Buggy source:
/** 
 * The phone window configuration has changed and the decor needs to be updated.
 * @param showDecor True if the decor should be shown.
 * @param windowHasShadow True when the window should show a shadow.
 */
public void phoneWindowUpdated(boolean showDecor,boolean windowHasShadow){
  mShowDecor=showDecor;
  if (windowHasShadow != mWindowHasShadow) {
    mWindowHasShadow=windowHasShadow;
    initializeElevation();
  }
}

Fixed version (ground truth):
/** 
 * The phone window configuration has changed and the decor needs to be updated.
 * @param showDecor True if the decor should be shown.
 * @param windowHasShadow True when the window should show a shadow.
 */
public void phoneWindowUpdated(boolean showDecor,boolean windowHasShadow){
  mShowDecor=showDecor;
  updateCaptionVisibility();
  if (windowHasShadow != mWindowHasShadow) {
    mWindowHasShadow=windowHasShadow;
    initializeElevation();
  }
}
Program: 193816
Project: 193816
Buggy source:
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  WindowInsets insets=getRootWindowInsets();
  int systemMargin=insets.getSystemWindowInsetTop();
  final int leftPos=getPaddingLeft();
  final int rightPos=right - left - getPaddingRight();
  final int topPos=getPaddingTop();
  final int bottomPos=bottom - top - getPaddingBottom();
  final int width=rightPos - leftPos;
  final View caption=getChildAt(0);
  updateElevation();
  mAllowUpdateElevation=true;
  final int captionHeight=(isFillingScreen() || !mShowDecor) ? 0 : caption.getMeasuredHeight();
  caption.layout(leftPos,topPos + systemMargin,leftPos + width,topPos + systemMargin + captionHeight);
  if (getChildCount() > 1) {
    getChildAt(1).layout(leftPos,topPos + captionHeight,leftPos + width,bottomPos);
  }
}

Fixed version (ground truth):
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  updateElevation();
  mAllowUpdateElevation=true;
  super.onLayout(changed,left,top,right,bottom);
}
Program: 193817
Project: 193817
Buggy source:
@Override public void addView(View child,int index,LayoutParams params){
  if (index >= 2 || getChildCount() >= 2) {
    throw new IllegalStateException("String_Node_Str");
  }
  super.addView(child,index,params);
}

Fixed version (ground truth):
@Override public void addView(View child,int index,ViewGroup.LayoutParams params){
  if (index >= 2 || getChildCount() >= 2) {
    throw new IllegalStateException("String_Node_Str");
  }
  super.addView(child,index,params);
}
Program: 193818
Project: 193818
Buggy source:
public void setPhoneWindow(PhoneWindow owner,boolean showDecor,boolean windowHasShadow){
  mOwner=owner;
  mWindowHasShadow=windowHasShadow;
  mShowDecor=showDecor;
  if (mWindowHasShadow) {
    initializeElevation();
  }
  mOwner.getDecorView().setOutlineProvider(ViewOutlineProvider.BOUNDS);
  findViewById(R.id.maximize_window).setOnClickListener(this);
  findViewById(R.id.close_window).setOnClickListener(this);
}

Fixed version (ground truth):
public void setPhoneWindow(PhoneWindow owner,boolean showDecor,boolean windowHasShadow){
  mOwner=owner;
  mWindowHasShadow=windowHasShadow;
  mShowDecor=showDecor;
  updateCaptionVisibility();
  if (mWindowHasShadow) {
    initializeElevation();
  }
  mOwner.getDecorView().setOutlineProvider(ViewOutlineProvider.BOUNDS);
  findViewById(R.id.maximize_window).setOnClickListener(this);
  findViewById(R.id.close_window).setOnClickListener(this);
}
Program: 193819
Project: 193819
Buggy source:
/** 
 * The phone window configuration has changed and the decor needs to be updated.
 * @param showDecor True if the decor should be shown.
 * @param windowHasShadow True when the window should show a shadow.
 */
public void phoneWindowUpdated(boolean showDecor,boolean windowHasShadow){
  mShowDecor=showDecor;
  if (windowHasShadow != mWindowHasShadow) {
    mWindowHasShadow=windowHasShadow;
    initializeElevation();
  }
}

Fixed version (ground truth):
/** 
 * The phone window configuration has changed and the decor needs to be updated.
 * @param showDecor True if the decor should be shown.
 * @param windowHasShadow True when the window should show a shadow.
 */
public void phoneWindowUpdated(boolean showDecor,boolean windowHasShadow){
  mShowDecor=showDecor;
  updateCaptionVisibility();
  if (windowHasShadow != mWindowHasShadow) {
    mWindowHasShadow=windowHasShadow;
    initializeElevation();
  }
}
Program: 193824
Project: 193824
Buggy source:
void dumpRuntimePermissionsLPr(PrintWriter pw,String prefix,ArraySet<String> permissionNames,List<PermissionState> permissionStates){
  if (!permissionStates.isEmpty()) {
    pw.print(prefix);
    pw.println("String_Node_Str");
    for (    PermissionState permissionState : permissionStates) {
      if (permissionNames != null && !permissionNames.contains(permissionState.getName())) {
        continue;
      }
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(permissionState.getName());
      pw.print("String_Node_Str");
      pw.print(permissionState.isGranted());
      pw.println(permissionFlagsToString("String_Node_Str",permissionState.getFlags()));
    }
  }
}

Fixed version (ground truth):
void dumpRuntimePermissionsLPr(PrintWriter pw,String prefix,ArraySet<String> permissionNames,List<PermissionState> permissionStates,boolean dumpAll){
  if (!permissionStates.isEmpty() || dumpAll) {
    pw.print(prefix);
    pw.println("String_Node_Str");
    for (    PermissionState permissionState : permissionStates) {
      if (permissionNames != null && !permissionNames.contains(permissionState.getName())) {
        continue;
      }
      pw.print(prefix);
      pw.print("String_Node_Str");
      pw.print(permissionState.getName());
      pw.print("String_Node_Str");
      pw.print(permissionState.isGranted());
      pw.println(permissionFlagsToString("String_Node_Str",permissionState.getFlags()));
    }
  }
}
Program: 193828
Project: 193828
Buggy source:
@Override public int getWidth(){
  throwISEIfImageIsInvalid();
  mWidth=(getFormat() == ImageFormat.JPEG) ? ImageReader.this.getWidth() : nativeGetWidth(mFormat);
  return mWidth;
}

Fixed version (ground truth):
@Override public int getWidth(){
  throwISEIfImageIsInvalid();
  int width;
switch (getFormat()) {
case ImageFormat.JPEG:
case ImageFormat.DEPTH_POINT_CLOUD:
    width=ImageReader.this.getWidth();
  break;
default :
width=nativeGetWidth(mFormat);
}
return width;
}
Program: 193829
Project: 193829
Buggy source:
@Override public int getHeight(){
  throwISEIfImageIsInvalid();
  mHeight=(getFormat() == ImageFormat.JPEG) ? ImageReader.this.getHeight() : nativeGetHeight(mFormat);
  return mHeight;
}

Fixed version (ground truth):
@Override public int getHeight(){
  throwISEIfImageIsInvalid();
  int height;
switch (getFormat()) {
case ImageFormat.JPEG:
case ImageFormat.DEPTH_POINT_CLOUD:
    height=ImageReader.this.getHeight();
  break;
default :
height=nativeGetHeight(mFormat);
}
return height;
}
Program: 193831
Project: 193831
Buggy source:
@Override public int getWidth(){
  throwISEIfImageIsInvalid();
  mWidth=(getFormat() == ImageFormat.JPEG) ? ImageReader.this.getWidth() : nativeGetWidth(mFormat);
  return mWidth;
}

Fixed version (ground truth):
@Override public int getWidth(){
  throwISEIfImageIsInvalid();
  int width;
switch (getFormat()) {
case ImageFormat.JPEG:
case ImageFormat.DEPTH_POINT_CLOUD:
    width=ImageReader.this.getWidth();
  break;
default :
width=nativeGetWidth(mFormat);
}
return width;
}
Program: 193832
Project: 193832
Buggy source:
@Override public int getHeight(){
  throwISEIfImageIsInvalid();
  mHeight=(getFormat() == ImageFormat.JPEG) ? ImageReader.this.getHeight() : nativeGetHeight(mFormat);
  return mHeight;
}

Fixed version (ground truth):
@Override public int getHeight(){
  throwISEIfImageIsInvalid();
  int height;
switch (getFormat()) {
case ImageFormat.JPEG:
case ImageFormat.DEPTH_POINT_CLOUD:
    height=ImageReader.this.getHeight();
  break;
default :
height=nativeGetHeight(mFormat);
}
return height;
}
Program: 193834
Project: 193834
Buggy source:
@Override public int getWidth(){
  throwISEIfImageIsInvalid();
  mWidth=(getFormat() == ImageFormat.JPEG) ? ImageReader.this.getWidth() : nativeGetWidth(mFormat);
  return mWidth;
}

Fixed version (ground truth):
@Override public int getWidth(){
  throwISEIfImageIsInvalid();
  int width;
switch (getFormat()) {
case ImageFormat.JPEG:
case ImageFormat.DEPTH_POINT_CLOUD:
    width=ImageReader.this.getWidth();
  break;
default :
width=nativeGetWidth(mFormat);
}
return width;
}
Program: 193835
Project: 193835
Buggy source:
@Override public int getHeight(){
  throwISEIfImageIsInvalid();
  mHeight=(getFormat() == ImageFormat.JPEG) ? ImageReader.this.getHeight() : nativeGetHeight(mFormat);
  return mHeight;
}

Fixed version (ground truth):
@Override public int getHeight(){
  throwISEIfImageIsInvalid();
  int height;
switch (getFormat()) {
case ImageFormat.JPEG:
case ImageFormat.DEPTH_POINT_CLOUD:
    height=ImageReader.this.getHeight();
  break;
default :
height=nativeGetHeight(mFormat);
}
return height;
}
Program: 193837
Project: 193837
Buggy source:
@Override public int getWidth(){
  throwISEIfImageIsInvalid();
  mWidth=(getFormat() == ImageFormat.JPEG) ? ImageReader.this.getWidth() : nativeGetWidth(mFormat);
  return mWidth;
}

Fixed version (ground truth):
@Override public int getWidth(){
  throwISEIfImageIsInvalid();
  int width;
switch (getFormat()) {
case ImageFormat.JPEG:
case ImageFormat.DEPTH_POINT_CLOUD:
    width=ImageReader.this.getWidth();
  break;
default :
width=nativeGetWidth(mFormat);
}
return width;
}
Program: 193838
Project: 193838
Buggy source:
@Override public int getHeight(){
  throwISEIfImageIsInvalid();
  mHeight=(getFormat() == ImageFormat.JPEG) ? ImageReader.this.getHeight() : nativeGetHeight(mFormat);
  return mHeight;
}

Fixed version (ground truth):
@Override public int getHeight(){
  throwISEIfImageIsInvalid();
  int height;
switch (getFormat()) {
case ImageFormat.JPEG:
case ImageFormat.DEPTH_POINT_CLOUD:
    height=ImageReader.this.getHeight();
  break;
default :
height=nativeGetHeight(mFormat);
}
return height;
}
Program: 193840
Project: 193840
Buggy source:
@Override public int getWidth(){
  throwISEIfImageIsInvalid();
  mWidth=(getFormat() == ImageFormat.JPEG) ? ImageReader.this.getWidth() : nativeGetWidth(mFormat);
  return mWidth;
}

Fixed version (ground truth):
@Override public int getWidth(){
  throwISEIfImageIsInvalid();
  int width;
switch (getFormat()) {
case ImageFormat.JPEG:
case ImageFormat.DEPTH_POINT_CLOUD:
    width=ImageReader.this.getWidth();
  break;
default :
width=nativeGetWidth(mFormat);
}
return width;
}
Program: 193841
Project: 193841
Buggy source:
@Override public int getHeight(){
  throwISEIfImageIsInvalid();
  mHeight=(getFormat() == ImageFormat.JPEG) ? ImageReader.this.getHeight() : nativeGetHeight(mFormat);
  return mHeight;
}

Fixed version (ground truth):
@Override public int getHeight(){
  throwISEIfImageIsInvalid();
  int height;
switch (getFormat()) {
case ImageFormat.JPEG:
case ImageFormat.DEPTH_POINT_CLOUD:
    height=ImageReader.this.getHeight();
  break;
default :
height=nativeGetHeight(mFormat);
}
return height;
}
Program: 193843
Project: 193843
Buggy source:
@Override public int getWidth(){
  throwISEIfImageIsInvalid();
  mWidth=(getFormat() == ImageFormat.JPEG) ? ImageReader.this.getWidth() : nativeGetWidth(mFormat);
  return mWidth;
}

Fixed version (ground truth):
@Override public int getWidth(){
  throwISEIfImageIsInvalid();
  int width;
switch (getFormat()) {
case ImageFormat.JPEG:
case ImageFormat.DEPTH_POINT_CLOUD:
    width=ImageReader.this.getWidth();
  break;
default :
width=nativeGetWidth(mFormat);
}
return width;
}
Program: 193844
Project: 193844
Buggy source:
@Override public int getHeight(){
  throwISEIfImageIsInvalid();
  mHeight=(getFormat() == ImageFormat.JPEG) ? ImageReader.this.getHeight() : nativeGetHeight(mFormat);
  return mHeight;
}

Fixed version (ground truth):
@Override public int getHeight(){
  throwISEIfImageIsInvalid();
  int height;
switch (getFormat()) {
case ImageFormat.JPEG:
case ImageFormat.DEPTH_POINT_CLOUD:
    height=ImageReader.this.getHeight();
  break;
default :
height=nativeGetHeight(mFormat);
}
return height;
}
Program: 193853
Project: 193853
Buggy source:
@Override public int getWidth(){
  throwISEIfImageIsInvalid();
  mWidth=(getFormat() == ImageFormat.JPEG) ? ImageReader.this.getWidth() : nativeGetWidth(mFormat);
  return mWidth;
}

Fixed version (ground truth):
@Override public int getWidth(){
  throwISEIfImageIsInvalid();
  int width;
switch (getFormat()) {
case ImageFormat.JPEG:
case ImageFormat.DEPTH_POINT_CLOUD:
    width=ImageReader.this.getWidth();
  break;
default :
width=nativeGetWidth(mFormat);
}
return width;
}
Program: 193854
Project: 193854
Buggy source:
@Override public int getHeight(){
  throwISEIfImageIsInvalid();
  mHeight=(getFormat() == ImageFormat.JPEG) ? ImageReader.this.getHeight() : nativeGetHeight(mFormat);
  return mHeight;
}

Fixed version (ground truth):
@Override public int getHeight(){
  throwISEIfImageIsInvalid();
  int height;
switch (getFormat()) {
case ImageFormat.JPEG:
case ImageFormat.DEPTH_POINT_CLOUD:
    height=ImageReader.this.getHeight();
  break;
default :
height=nativeGetHeight(mFormat);
}
return height;
}
Program: 193856
Project: 193856
Buggy source:
private void adjustFocusedActivityLocked(ActivityRecord r,String reason){
  if (mStackSupervisor.isFrontStack(this) && mService.mFocusedActivity == r) {
    ActivityRecord next=topRunningActivityLocked(null);
    final String myReason=reason + "String_Node_Str";
    if (next != r) {
      final TaskRecord task=r.task;
      if (r.frontOfTask && task == topTask() && task.isOverHomeStack()) {
        if (!mFullscreen && adjustFocusToNextVisibleStackLocked(null,myReason)) {
          return;
        }
        if (mStackSupervisor.moveHomeStackTaskToTop(task.getTaskToReturnTo(),myReason)) {
          return;
        }
      }
    }
    final ActivityRecord top=mStackSupervisor.topRunningActivityLocked();
    if (top != null) {
      mService.setFocusedActivityLocked(top,myReason);
    }
  }
}

Fixed version (ground truth):
private void adjustFocusedActivityLocked(ActivityRecord r,String reason){
  if (mStackSupervisor.isFrontStack(this) && mService.mFocusedActivity == r) {
    ActivityRecord next=topRunningActivityLocked(null);
    final String myReason=reason + "String_Node_Str";
    if (next != r) {
      if (next != null && mStackId == FREEFORM_WORKSPACE_STACK_ID) {
        mService.setFocusedActivityLocked(next,myReason);
        return;
      }
 else {
        final TaskRecord task=r.task;
        if (r.frontOfTask && task == topTask() && task.isOverHomeStack()) {
          if (!mFullscreen && adjustFocusToNextVisibleStackLocked(null,myReason)) {
            return;
          }
          if (mStackSupervisor.moveHomeStackTaskToTop(task.getTaskToReturnTo(),myReason)) {
            return;
          }
        }
      }
    }
    final ActivityRecord top=mStackSupervisor.topRunningActivityLocked();
    if (top != null) {
      mService.setFocusedActivityLocked(top,myReason);
    }
  }
}
Program: 193874
Project: 193874
Buggy source:
private void adjustFocusedActivityLocked(ActivityRecord r,String reason){
  if (mStackSupervisor.isFrontStack(this) && mService.mFocusedActivity == r) {
    ActivityRecord next=topRunningActivityLocked(null);
    final String myReason=reason + "String_Node_Str";
    if (next != r) {
      final TaskRecord task=r.task;
      if (r.frontOfTask && task == topTask() && task.isOverHomeStack()) {
        if (!mFullscreen && adjustFocusToNextVisibleStackLocked(null,myReason)) {
          return;
        }
        if (mStackSupervisor.moveHomeStackTaskToTop(task.getTaskToReturnTo(),myReason)) {
          return;
        }
      }
    }
    final ActivityRecord top=mStackSupervisor.topRunningActivityLocked();
    if (top != null) {
      mService.setFocusedActivityLocked(top,myReason);
    }
  }
}

Fixed version (ground truth):
private void adjustFocusedActivityLocked(ActivityRecord r,String reason){
  if (mStackSupervisor.isFrontStack(this) && mService.mFocusedActivity == r) {
    ActivityRecord next=topRunningActivityLocked(null);
    final String myReason=reason + "String_Node_Str";
    if (next != r) {
      if (next != null && mStackId == FREEFORM_WORKSPACE_STACK_ID) {
        mService.setFocusedActivityLocked(next,myReason);
        return;
      }
 else {
        final TaskRecord task=r.task;
        if (r.frontOfTask && task == topTask() && task.isOverHomeStack()) {
          if (!mFullscreen && adjustFocusToNextVisibleStackLocked(null,myReason)) {
            return;
          }
          if (mStackSupervisor.moveHomeStackTaskToTop(task.getTaskToReturnTo(),myReason)) {
            return;
          }
        }
      }
    }
    final ActivityRecord top=mStackSupervisor.topRunningActivityLocked();
    if (top != null) {
      mService.setFocusedActivityLocked(top,myReason);
    }
  }
}
Program: 193882
Project: 193882
Buggy source:
@Override protected void onStart(){
  super.onStart();
  MetricsLogger.visible(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,true);
  IntentFilter filter=new IntentFilter();
  filter.addAction(Recents.ACTION_HIDE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_TOGGLE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_START_ENTER_ANIMATION);
  registerReceiver(mServiceBroadcastReceiver,filter);
  loader.registerReceivers(this,mRecentsView);
  updateRecentsTasks();
  if (mConfig.launchedHasConfigurationChanged) {
    onEnterAnimationTriggered();
  }
  if (!mConfig.launchedHasConfigurationChanged) {
    mRecentsView.disableLayersForOneFrame();
  }
}

Fixed version (ground truth):
@Override protected void onStart(){
  super.onStart();
  MetricsLogger.visible(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,true);
  IntentFilter filter=new IntentFilter();
  filter.addAction(Recents.ACTION_HIDE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_TOGGLE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_START_ENTER_ANIMATION);
  registerReceiver(mServiceBroadcastReceiver,filter);
  loader.registerReceivers(this,mRecentsView);
  updateRecentsTasks();
  boolean wasLaunchedByAm=!mConfig.launchedFromHome && !mConfig.launchedFromAppWithThumbnail;
  if (mConfig.launchedHasConfigurationChanged || wasLaunchedByAm) {
    onEnterAnimationTriggered();
  }
  if (!mConfig.launchedHasConfigurationChanged) {
    mRecentsView.disableLayersForOneFrame();
  }
}
Program: 193883
Project: 193883
Buggy source:
@Override protected void onStop(){
  super.onStop();
  MetricsLogger.hidden(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,false);
  mRecentsView.onRecentsHidden();
  unregisterReceiver(mServiceBroadcastReceiver);
  loader.unregisterReceivers();
}

Fixed version (ground truth):
@Override protected void onStop(){
  super.onStop();
  MetricsLogger.hidden(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,false);
  mRecentsView.onRecentsHidden();
  unregisterReceiver(mServiceBroadcastReceiver);
  loader.unregisterReceivers();
  mConfig.launchedFromHome=false;
  mConfig.launchedFromSearchHome=false;
  mConfig.launchedFromAppWithThumbnail=false;
  mConfig.launchedToTaskId=-1;
  mConfig.launchedWithAltTab=false;
  mConfig.launchedHasConfigurationChanged=false;
}
Program: 193884
Project: 193884
Buggy source:
@Override protected void onStart(){
  super.onStart();
  MetricsLogger.visible(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,true);
  IntentFilter filter=new IntentFilter();
  filter.addAction(Recents.ACTION_HIDE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_TOGGLE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_START_ENTER_ANIMATION);
  registerReceiver(mServiceBroadcastReceiver,filter);
  loader.registerReceivers(this,mRecentsView);
  updateRecentsTasks();
  if (mConfig.launchedHasConfigurationChanged) {
    onEnterAnimationTriggered();
  }
  if (!mConfig.launchedHasConfigurationChanged) {
    mRecentsView.disableLayersForOneFrame();
  }
}

Fixed version (ground truth):
@Override protected void onStart(){
  super.onStart();
  MetricsLogger.visible(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,true);
  IntentFilter filter=new IntentFilter();
  filter.addAction(Recents.ACTION_HIDE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_TOGGLE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_START_ENTER_ANIMATION);
  registerReceiver(mServiceBroadcastReceiver,filter);
  loader.registerReceivers(this,mRecentsView);
  updateRecentsTasks();
  boolean wasLaunchedByAm=!mConfig.launchedFromHome && !mConfig.launchedFromAppWithThumbnail;
  if (mConfig.launchedHasConfigurationChanged || wasLaunchedByAm) {
    onEnterAnimationTriggered();
  }
  if (!mConfig.launchedHasConfigurationChanged) {
    mRecentsView.disableLayersForOneFrame();
  }
}
Program: 193885
Project: 193885
Buggy source:
@Override protected void onStop(){
  super.onStop();
  MetricsLogger.hidden(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,false);
  mRecentsView.onRecentsHidden();
  unregisterReceiver(mServiceBroadcastReceiver);
  loader.unregisterReceivers();
}

Fixed version (ground truth):
@Override protected void onStop(){
  super.onStop();
  MetricsLogger.hidden(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,false);
  mRecentsView.onRecentsHidden();
  unregisterReceiver(mServiceBroadcastReceiver);
  loader.unregisterReceivers();
  mConfig.launchedFromHome=false;
  mConfig.launchedFromSearchHome=false;
  mConfig.launchedFromAppWithThumbnail=false;
  mConfig.launchedToTaskId=-1;
  mConfig.launchedWithAltTab=false;
  mConfig.launchedHasConfigurationChanged=false;
}
Program: 193886
Project: 193886
Buggy source:
@Override protected void onStart(){
  super.onStart();
  MetricsLogger.visible(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,true);
  IntentFilter filter=new IntentFilter();
  filter.addAction(Recents.ACTION_HIDE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_TOGGLE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_START_ENTER_ANIMATION);
  registerReceiver(mServiceBroadcastReceiver,filter);
  loader.registerReceivers(this,mRecentsView);
  updateRecentsTasks();
  if (mConfig.launchedHasConfigurationChanged) {
    onEnterAnimationTriggered();
  }
  if (!mConfig.launchedHasConfigurationChanged) {
    mRecentsView.disableLayersForOneFrame();
  }
}

Fixed version (ground truth):
@Override protected void onStart(){
  super.onStart();
  MetricsLogger.visible(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,true);
  IntentFilter filter=new IntentFilter();
  filter.addAction(Recents.ACTION_HIDE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_TOGGLE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_START_ENTER_ANIMATION);
  registerReceiver(mServiceBroadcastReceiver,filter);
  loader.registerReceivers(this,mRecentsView);
  updateRecentsTasks();
  boolean wasLaunchedByAm=!mConfig.launchedFromHome && !mConfig.launchedFromAppWithThumbnail;
  if (mConfig.launchedHasConfigurationChanged || wasLaunchedByAm) {
    onEnterAnimationTriggered();
  }
  if (!mConfig.launchedHasConfigurationChanged) {
    mRecentsView.disableLayersForOneFrame();
  }
}
Program: 193887
Project: 193887
Buggy source:
@Override protected void onStop(){
  super.onStop();
  MetricsLogger.hidden(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,false);
  mRecentsView.onRecentsHidden();
  unregisterReceiver(mServiceBroadcastReceiver);
  loader.unregisterReceivers();
}

Fixed version (ground truth):
@Override protected void onStop(){
  super.onStop();
  MetricsLogger.hidden(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,false);
  mRecentsView.onRecentsHidden();
  unregisterReceiver(mServiceBroadcastReceiver);
  loader.unregisterReceivers();
  mConfig.launchedFromHome=false;
  mConfig.launchedFromSearchHome=false;
  mConfig.launchedFromAppWithThumbnail=false;
  mConfig.launchedToTaskId=-1;
  mConfig.launchedWithAltTab=false;
  mConfig.launchedHasConfigurationChanged=false;
}
Program: 193888
Project: 193888
Buggy source:
@Override protected void onStart(){
  super.onStart();
  MetricsLogger.visible(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,true);
  IntentFilter filter=new IntentFilter();
  filter.addAction(Recents.ACTION_HIDE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_TOGGLE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_START_ENTER_ANIMATION);
  registerReceiver(mServiceBroadcastReceiver,filter);
  loader.registerReceivers(this,mRecentsView);
  updateRecentsTasks();
  if (mConfig.launchedHasConfigurationChanged) {
    onEnterAnimationTriggered();
  }
  if (!mConfig.launchedHasConfigurationChanged) {
    mRecentsView.disableLayersForOneFrame();
  }
}

Fixed version (ground truth):
@Override protected void onStart(){
  super.onStart();
  MetricsLogger.visible(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,true);
  IntentFilter filter=new IntentFilter();
  filter.addAction(Recents.ACTION_HIDE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_TOGGLE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_START_ENTER_ANIMATION);
  registerReceiver(mServiceBroadcastReceiver,filter);
  loader.registerReceivers(this,mRecentsView);
  updateRecentsTasks();
  boolean wasLaunchedByAm=!mConfig.launchedFromHome && !mConfig.launchedFromAppWithThumbnail;
  if (mConfig.launchedHasConfigurationChanged || wasLaunchedByAm) {
    onEnterAnimationTriggered();
  }
  if (!mConfig.launchedHasConfigurationChanged) {
    mRecentsView.disableLayersForOneFrame();
  }
}
Program: 193889
Project: 193889
Buggy source:
@Override protected void onStop(){
  super.onStop();
  MetricsLogger.hidden(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,false);
  mRecentsView.onRecentsHidden();
  unregisterReceiver(mServiceBroadcastReceiver);
  loader.unregisterReceivers();
}

Fixed version (ground truth):
@Override protected void onStop(){
  super.onStop();
  MetricsLogger.hidden(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,false);
  mRecentsView.onRecentsHidden();
  unregisterReceiver(mServiceBroadcastReceiver);
  loader.unregisterReceivers();
  mConfig.launchedFromHome=false;
  mConfig.launchedFromSearchHome=false;
  mConfig.launchedFromAppWithThumbnail=false;
  mConfig.launchedToTaskId=-1;
  mConfig.launchedWithAltTab=false;
  mConfig.launchedHasConfigurationChanged=false;
}
Program: 193890
Project: 193890
Buggy source:
@Override protected void onStart(){
  super.onStart();
  MetricsLogger.visible(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,true);
  IntentFilter filter=new IntentFilter();
  filter.addAction(Recents.ACTION_HIDE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_TOGGLE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_START_ENTER_ANIMATION);
  registerReceiver(mServiceBroadcastReceiver,filter);
  loader.registerReceivers(this,mRecentsView);
  updateRecentsTasks();
  if (mConfig.launchedHasConfigurationChanged) {
    onEnterAnimationTriggered();
  }
  if (!mConfig.launchedHasConfigurationChanged) {
    mRecentsView.disableLayersForOneFrame();
  }
}

Fixed version (ground truth):
@Override protected void onStart(){
  super.onStart();
  MetricsLogger.visible(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,true);
  IntentFilter filter=new IntentFilter();
  filter.addAction(Recents.ACTION_HIDE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_TOGGLE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_START_ENTER_ANIMATION);
  registerReceiver(mServiceBroadcastReceiver,filter);
  loader.registerReceivers(this,mRecentsView);
  updateRecentsTasks();
  boolean wasLaunchedByAm=!mConfig.launchedFromHome && !mConfig.launchedFromAppWithThumbnail;
  if (mConfig.launchedHasConfigurationChanged || wasLaunchedByAm) {
    onEnterAnimationTriggered();
  }
  if (!mConfig.launchedHasConfigurationChanged) {
    mRecentsView.disableLayersForOneFrame();
  }
}
Program: 193891
Project: 193891
Buggy source:
@Override protected void onStop(){
  super.onStop();
  MetricsLogger.hidden(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,false);
  mRecentsView.onRecentsHidden();
  unregisterReceiver(mServiceBroadcastReceiver);
  loader.unregisterReceivers();
}

Fixed version (ground truth):
@Override protected void onStop(){
  super.onStop();
  MetricsLogger.hidden(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,false);
  mRecentsView.onRecentsHidden();
  unregisterReceiver(mServiceBroadcastReceiver);
  loader.unregisterReceivers();
  mConfig.launchedFromHome=false;
  mConfig.launchedFromSearchHome=false;
  mConfig.launchedFromAppWithThumbnail=false;
  mConfig.launchedToTaskId=-1;
  mConfig.launchedWithAltTab=false;
  mConfig.launchedHasConfigurationChanged=false;
}
Program: 193892
Project: 193892
Buggy source:
@Override protected void onStart(){
  super.onStart();
  MetricsLogger.visible(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,true);
  IntentFilter filter=new IntentFilter();
  filter.addAction(Recents.ACTION_HIDE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_TOGGLE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_START_ENTER_ANIMATION);
  registerReceiver(mServiceBroadcastReceiver,filter);
  loader.registerReceivers(this,mRecentsView);
  updateRecentsTasks();
  if (mConfig.launchedHasConfigurationChanged) {
    onEnterAnimationTriggered();
  }
  if (!mConfig.launchedHasConfigurationChanged) {
    mRecentsView.disableLayersForOneFrame();
  }
}

Fixed version (ground truth):
@Override protected void onStart(){
  super.onStart();
  MetricsLogger.visible(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,true);
  IntentFilter filter=new IntentFilter();
  filter.addAction(Recents.ACTION_HIDE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_TOGGLE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_START_ENTER_ANIMATION);
  registerReceiver(mServiceBroadcastReceiver,filter);
  loader.registerReceivers(this,mRecentsView);
  updateRecentsTasks();
  boolean wasLaunchedByAm=!mConfig.launchedFromHome && !mConfig.launchedFromAppWithThumbnail;
  if (mConfig.launchedHasConfigurationChanged || wasLaunchedByAm) {
    onEnterAnimationTriggered();
  }
  if (!mConfig.launchedHasConfigurationChanged) {
    mRecentsView.disableLayersForOneFrame();
  }
}
Program: 193893
Project: 193893
Buggy source:
@Override protected void onStop(){
  super.onStop();
  MetricsLogger.hidden(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,false);
  mRecentsView.onRecentsHidden();
  unregisterReceiver(mServiceBroadcastReceiver);
  loader.unregisterReceivers();
}

Fixed version (ground truth):
@Override protected void onStop(){
  super.onStop();
  MetricsLogger.hidden(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,false);
  mRecentsView.onRecentsHidden();
  unregisterReceiver(mServiceBroadcastReceiver);
  loader.unregisterReceivers();
  mConfig.launchedFromHome=false;
  mConfig.launchedFromSearchHome=false;
  mConfig.launchedFromAppWithThumbnail=false;
  mConfig.launchedToTaskId=-1;
  mConfig.launchedWithAltTab=false;
  mConfig.launchedHasConfigurationChanged=false;
}
Program: 193894
Project: 193894
Buggy source:
@Override protected void onStart(){
  super.onStart();
  MetricsLogger.visible(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,true);
  IntentFilter filter=new IntentFilter();
  filter.addAction(Recents.ACTION_HIDE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_TOGGLE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_START_ENTER_ANIMATION);
  registerReceiver(mServiceBroadcastReceiver,filter);
  loader.registerReceivers(this,mRecentsView);
  updateRecentsTasks();
  if (mConfig.launchedHasConfigurationChanged) {
    onEnterAnimationTriggered();
  }
  if (!mConfig.launchedHasConfigurationChanged) {
    mRecentsView.disableLayersForOneFrame();
  }
}

Fixed version (ground truth):
@Override protected void onStart(){
  super.onStart();
  MetricsLogger.visible(this,MetricsLogger.OVERVIEW_ACTIVITY);
  RecentsTaskLoader loader=RecentsTaskLoader.getInstance();
  SystemServicesProxy ssp=loader.getSystemServicesProxy();
  Recents.notifyVisibilityChanged(this,ssp,true);
  IntentFilter filter=new IntentFilter();
  filter.addAction(Recents.ACTION_HIDE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_TOGGLE_RECENTS_ACTIVITY);
  filter.addAction(Recents.ACTION_START_ENTER_ANIMATION);
  registerReceiver(mServiceBroadcastReceiver,filter);
  loader.registerReceivers(this,mRecentsView);
  updateRecentsTasks();
  boolean wasLaunchedByAm=!mConfig.launchedFromHome && !mConfig.launchedFromAppWithThumbnail;
  if (mConfig.launchedHasConfigurationChanged || wasLaunchedByAm) {
    onEnterAnimationTriggered();
  }
  if (!mConfig.launchedHasConfigurationChanged) {
    mRecentsView.disableLayersForOneFrame();
  }
}