nus-yam/ex-repair huggingface dataset:
Program: 197835
Project: 197835
Buggy source:
/** 
 * Return a list of all   {@link HdmiDeviceInfo}. <p>Declared as package-private. accessed by   {@link HdmiControlService} only.This is not thread-safe. For thread safety, call  {@link #getSafeExternalInputsLocked} whichdoes not include local device.
 */
@ServiceThreadOnly List<HdmiDeviceInfo> getDeviceInfoList(boolean includelLocalDevice){
  assertRunOnServiceThread();
  if (includelLocalDevice) {
    return HdmiUtils.sparseArrayToList(mDeviceInfos);
  }
 else {
    ArrayList<HdmiDeviceInfo> infoList=new ArrayList<>();
    for (int i=0; i < mDeviceInfos.size(); ++i) {
      HdmiDeviceInfo info=mDeviceInfos.valueAt(i);
      if (!isLocalDeviceAddress(info.getLogicalAddress())) {
        infoList.add(info);
      }
    }
    return infoList;
  }
}

Fixed version (ground truth):
/** 
 * Return a list of all   {@link HdmiDeviceInfo}. <p>Declared as package-private. accessed by   {@link HdmiControlService} only.This is not thread-safe. For thread safety, call  {@link #getSafeExternalInputsLocked} whichdoes not include local device.
 */
@ServiceThreadOnly List<HdmiDeviceInfo> getDeviceInfoList(boolean includeLocalDevice){
  assertRunOnServiceThread();
  if (includeLocalDevice) {
    return HdmiUtils.sparseArrayToList(mDeviceInfos);
  }
 else {
    ArrayList<HdmiDeviceInfo> infoList=new ArrayList<>();
    for (int i=0; i < mDeviceInfos.size(); ++i) {
      HdmiDeviceInfo info=mDeviceInfos.valueAt(i);
      if (!isLocalDeviceAddress(info.getLogicalAddress())) {
        infoList.add(info);
      }
    }
    return infoList;
  }
}
Program: 197836
Project: 197836
Buggy source:
@Override protected void dump(final IndentingPrintWriter pw){
  super.dump(pw);
  pw.println("String_Node_Str" + mArcEstablished);
  pw.println("String_Node_Str" + mArcFeatureEnabled);
  pw.println("String_Node_Str" + mSystemAudioActivated);
  pw.println("String_Node_Str" + mSystemAudioMute);
  pw.println("String_Node_Str" + mAutoDeviceOff);
  pw.println("String_Node_Str" + mAutoWakeup);
  pw.println("String_Node_Str" + mSkipRoutingControl);
}

Fixed version (ground truth):
@Override protected void dump(final IndentingPrintWriter pw){
  super.dump(pw);
  pw.println("String_Node_Str" + mArcEstablished);
  pw.println("String_Node_Str" + mArcFeatureEnabled);
  pw.println("String_Node_Str" + mSystemAudioActivated);
  pw.println("String_Node_Str" + mSystemAudioMute);
  pw.println("String_Node_Str" + mAutoDeviceOff);
  pw.println("String_Node_Str" + mAutoWakeup);
  pw.println("String_Node_Str" + mSkipRoutingControl);
  pw.println("String_Node_Str");
  pw.increaseIndent();
  for (  HdmiDeviceInfo info : mSafeAllDeviceInfos) {
    pw.println(info);
  }
  pw.decreaseIndent();
}
Program: 197837
Project: 197837
Buggy source:
@ServiceThreadOnly void updateActiveInput(int path,boolean notifyInputChange){
  assertRunOnServiceThread();
  if (path == getActivePath()) {
    return;
  }
  setPrevPortId(getActivePortId());
  int portId=mService.pathToPortId(path);
  setActivePath(path);
  if (notifyInputChange) {
    ActiveSource activeSource=getActiveSource();
    HdmiDeviceInfo info=getCecDeviceInfo(activeSource.logicalAddress);
    if (info == null) {
      info=new HdmiDeviceInfo(Constants.ADDR_INVALID,path,portId,HdmiDeviceInfo.DEVICE_RESERVED,0,null);
    }
    mService.invokeInputChangeListener(info);
  }
}

Fixed version (ground truth):
@ServiceThreadOnly void updateActiveInput(int path,boolean notifyInputChange){
  assertRunOnServiceThread();
  if (path == getActivePath()) {
    return;
  }
  setPrevPortId(getActivePortId());
  setActivePath(path);
  if (notifyInputChange) {
    ActiveSource activeSource=getActiveSource();
    HdmiDeviceInfo info=getCecDeviceInfo(activeSource.logicalAddress);
    if (info == null) {
      info=new HdmiDeviceInfo(Constants.ADDR_INVALID,path,getActivePortId(),HdmiDeviceInfo.DEVICE_RESERVED,0,null);
    }
    mService.invokeInputChangeListener(info);
  }
}
Program: 197838
Project: 197838
Buggy source:
@Override @ServiceThreadOnly protected boolean handleReportPhysicalAddress(HdmiCecMessage message){
  assertRunOnServiceThread();
  int path=HdmiUtils.twoBytesToInt(message.getParams());
  int address=message.getSource();
  int type=message.getParams()[2];
  if (updateCecSwitchInfo(address,type,path))   return true;
  if (hasAction(DeviceDiscoveryAction.class)) {
    Slog.i(TAG,"String_Node_Str" + message);
    return true;
  }
  if (!isInDeviceList(path,address)) {
    handleNewDeviceAtTheTailOfActivePath(path);
  }
  startNewDeviceAction(ActiveSource.of(address,path));
  return true;
}

Fixed version (ground truth):
@Override @ServiceThreadOnly protected boolean handleReportPhysicalAddress(HdmiCecMessage message){
  assertRunOnServiceThread();
  int path=HdmiUtils.twoBytesToInt(message.getParams());
  int address=message.getSource();
  int type=message.getParams()[2];
  if (updateCecSwitchInfo(address,type,path))   return true;
  if (hasAction(DeviceDiscoveryAction.class)) {
    Slog.i(TAG,"String_Node_Str" + message);
    return true;
  }
  if (!isInDeviceList(address,path)) {
    handleNewDeviceAtTheTailOfActivePath(path);
  }
  startNewDeviceAction(ActiveSource.of(address,path));
  return true;
}
Program: 197839
Project: 197839
Buggy source:
/** 
 * Whether a device of the specified physical address and logical address exists in a device info list. However, both are minimal condition and it could be different device from the original one.
 * @param logicalAddress logical address of a device to be searched
 * @param physicalAddress physical address of a device to be searched
 * @return true if exist; otherwise false
 */
@ServiceThreadOnly boolean isInDeviceList(int logicalAddress,int physicalAddress){
  assertRunOnServiceThread();
  HdmiDeviceInfo device=getCecDeviceInfo(logicalAddress);
  if (device == null) {
    return false;
  }
  return device.getPhysicalAddress() == physicalAddress;
}

Fixed version (ground truth):
/** 
 * Whether a device of the specified physical address and logical address exists in a device info list. However, both are minimal condition and it could be different device from the original one.
 * @param logicalAddress logical address of a device to be searched
 * @param physicalAddress physical address of a device to be searched
 * @return true if exist; otherwise false
 */
@ServiceThreadOnly private boolean isInDeviceList(int logicalAddress,int physicalAddress){
  assertRunOnServiceThread();
  HdmiDeviceInfo device=getCecDeviceInfo(logicalAddress);
  if (device == null) {
    return false;
  }
  return device.getPhysicalAddress() == physicalAddress;
}
Program: 197840
Project: 197840
Buggy source:
@ServiceThreadOnly void handleRemoveActiveRoutingPath(int path){
  assertRunOnServiceThread();
  if (isTailOfActivePath(path,getActivePath())) {
    removeAction(RoutingControlAction.class);
    int newPath=mService.portIdToPath(getActivePortId());
    mService.sendCecCommand(HdmiCecMessageBuilder.buildRoutingChange(mAddress,getActivePath(),newPath));
    addAndStartAction(new RoutingControlAction(this,getActivePortId(),true,null));
  }
}

Fixed version (ground truth):
@ServiceThreadOnly void handleRemoveActiveRoutingPath(int path){
  assertRunOnServiceThread();
  if (isTailOfActivePath(path,getActivePath())) {
    removeAction(RoutingControlAction.class);
    int newPath=mService.portIdToPath(getActivePortId());
    mService.sendCecCommand(HdmiCecMessageBuilder.buildRoutingChange(mAddress,getActivePath(),newPath));
    mActiveSource.invalidate();
    addAndStartAction(new RoutingControlAction(this,getActivePath(),true,null));
  }
}
Program: 197841
Project: 197841
Buggy source:
/** 
 * Return a list of all   {@link HdmiDeviceInfo}. <p>Declared as package-private. accessed by   {@link HdmiControlService} only.This is not thread-safe. For thread safety, call  {@link #getSafeExternalInputsLocked} whichdoes not include local device.
 */
@ServiceThreadOnly List<HdmiDeviceInfo> getDeviceInfoList(boolean includelLocalDevice){
  assertRunOnServiceThread();
  if (includelLocalDevice) {
    return HdmiUtils.sparseArrayToList(mDeviceInfos);
  }
 else {
    ArrayList<HdmiDeviceInfo> infoList=new ArrayList<>();
    for (int i=0; i < mDeviceInfos.size(); ++i) {
      HdmiDeviceInfo info=mDeviceInfos.valueAt(i);
      if (!isLocalDeviceAddress(info.getLogicalAddress())) {
        infoList.add(info);
      }
    }
    return infoList;
  }
}

Fixed version (ground truth):
/** 
 * Return a list of all   {@link HdmiDeviceInfo}. <p>Declared as package-private. accessed by   {@link HdmiControlService} only.This is not thread-safe. For thread safety, call  {@link #getSafeExternalInputsLocked} whichdoes not include local device.
 */
@ServiceThreadOnly List<HdmiDeviceInfo> getDeviceInfoList(boolean includeLocalDevice){
  assertRunOnServiceThread();
  if (includeLocalDevice) {
    return HdmiUtils.sparseArrayToList(mDeviceInfos);
  }
 else {
    ArrayList<HdmiDeviceInfo> infoList=new ArrayList<>();
    for (int i=0; i < mDeviceInfos.size(); ++i) {
      HdmiDeviceInfo info=mDeviceInfos.valueAt(i);
      if (!isLocalDeviceAddress(info.getLogicalAddress())) {
        infoList.add(info);
      }
    }
    return infoList;
  }
}
Program: 197842
Project: 197842
Buggy source:
@Override protected void dump(final IndentingPrintWriter pw){
  super.dump(pw);
  pw.println("String_Node_Str" + mArcEstablished);
  pw.println("String_Node_Str" + mArcFeatureEnabled);
  pw.println("String_Node_Str" + mSystemAudioActivated);
  pw.println("String_Node_Str" + mSystemAudioMute);
  pw.println("String_Node_Str" + mAutoDeviceOff);
  pw.println("String_Node_Str" + mAutoWakeup);
  pw.println("String_Node_Str" + mSkipRoutingControl);
}

Fixed version (ground truth):
@Override protected void dump(final IndentingPrintWriter pw){
  super.dump(pw);
  pw.println("String_Node_Str" + mArcEstablished);
  pw.println("String_Node_Str" + mArcFeatureEnabled);
  pw.println("String_Node_Str" + mSystemAudioActivated);
  pw.println("String_Node_Str" + mSystemAudioMute);
  pw.println("String_Node_Str" + mAutoDeviceOff);
  pw.println("String_Node_Str" + mAutoWakeup);
  pw.println("String_Node_Str" + mSkipRoutingControl);
  pw.println("String_Node_Str");
  pw.increaseIndent();
  for (  HdmiDeviceInfo info : mSafeAllDeviceInfos) {
    pw.println(info);
  }
  pw.decreaseIndent();
}
Program: 197843
Project: 197843
Buggy source:
@ServiceThreadOnly void updateActiveInput(int path,boolean notifyInputChange){
  assertRunOnServiceThread();
  if (path == getActivePath()) {
    return;
  }
  setPrevPortId(getActivePortId());
  int portId=mService.pathToPortId(path);
  setActivePath(path);
  if (notifyInputChange) {
    ActiveSource activeSource=getActiveSource();
    HdmiDeviceInfo info=getCecDeviceInfo(activeSource.logicalAddress);
    if (info == null) {
      info=new HdmiDeviceInfo(Constants.ADDR_INVALID,path,portId,HdmiDeviceInfo.DEVICE_RESERVED,0,null);
    }
    mService.invokeInputChangeListener(info);
  }
}

Fixed version (ground truth):
@ServiceThreadOnly void updateActiveInput(int path,boolean notifyInputChange){
  assertRunOnServiceThread();
  if (path == getActivePath()) {
    return;
  }
  setPrevPortId(getActivePortId());
  setActivePath(path);
  if (notifyInputChange) {
    ActiveSource activeSource=getActiveSource();
    HdmiDeviceInfo info=getCecDeviceInfo(activeSource.logicalAddress);
    if (info == null) {
      info=new HdmiDeviceInfo(Constants.ADDR_INVALID,path,getActivePortId(),HdmiDeviceInfo.DEVICE_RESERVED,0,null);
    }
    mService.invokeInputChangeListener(info);
  }
}
Program: 197844
Project: 197844
Buggy source:
protected void setOutlineRect(float left,float top,float right,float bottom){
  mCustomOutline=true;
  mOutlineRect.set((int)left,(int)top,(int)right,(int)bottom);
  mOutlineRect.bottom=(int)Math.max(top + mDensity,mOutlineRect.bottom);
  mOutlineRect.right=(int)Math.max(left + mDensity,mOutlineRect.right);
  invalidateOutline();
}

Fixed version (ground truth):
protected void setOutlineRect(float left,float top,float right,float bottom){
  mCustomOutline=true;
  mOutlineRect.set((int)left,(int)top,(int)right,(int)bottom);
  mOutlineRect.bottom=(int)Math.max(top,mOutlineRect.bottom);
  mOutlineRect.right=(int)Math.max(left,mOutlineRect.right);
  invalidateOutline();
}
Program: 197845
Project: 197845
Buggy source:
public ExpandableOutlineView(Context context,AttributeSet attrs){
  super(context,attrs);
  mDensity=getResources().getDisplayMetrics().density;
  setOutlineProvider(new ViewOutlineProvider(){
    @Override public void getOutline(    View view,    Outline outline){
      if (!mCustomOutline) {
        outline.setRect(0,mClipTopAmount,getWidth(),Math.max(mActualHeight,mClipTopAmount));
      }
 else {
        outline.setRect(mOutlineRect);
      }
    }
  }
);
}

Fixed version (ground truth):
public ExpandableOutlineView(Context context,AttributeSet attrs){
  super(context,attrs);
  setOutlineProvider(new ViewOutlineProvider(){
    @Override public void getOutline(    View view,    Outline outline){
      if (!mCustomOutline) {
        outline.setRect(0,mClipTopAmount,getWidth(),Math.max(mActualHeight,mClipTopAmount));
      }
 else {
        outline.setRect(mOutlineRect);
      }
    }
  }
);
}
Program: 197846
Project: 197846
Buggy source:
protected void setOutlineRect(float left,float top,float right,float bottom){
  mCustomOutline=true;
  mOutlineRect.set((int)left,(int)top,(int)right,(int)bottom);
  mOutlineRect.bottom=(int)Math.max(top + mDensity,mOutlineRect.bottom);
  mOutlineRect.right=(int)Math.max(left + mDensity,mOutlineRect.right);
  invalidateOutline();
}

Fixed version (ground truth):
protected void setOutlineRect(float left,float top,float right,float bottom){
  mCustomOutline=true;
  mOutlineRect.set((int)left,(int)top,(int)right,(int)bottom);
  mOutlineRect.bottom=(int)Math.max(top,mOutlineRect.bottom);
  mOutlineRect.right=(int)Math.max(left,mOutlineRect.right);
  invalidateOutline();
}
Program: 197847
Project: 197847
Buggy source:
public ExpandableOutlineView(Context context,AttributeSet attrs){
  super(context,attrs);
  mDensity=getResources().getDisplayMetrics().density;
  setOutlineProvider(new ViewOutlineProvider(){
    @Override public void getOutline(    View view,    Outline outline){
      if (!mCustomOutline) {
        outline.setRect(0,mClipTopAmount,getWidth(),Math.max(mActualHeight,mClipTopAmount));
      }
 else {
        outline.setRect(mOutlineRect);
      }
    }
  }
);
}

Fixed version (ground truth):
public ExpandableOutlineView(Context context,AttributeSet attrs){
  super(context,attrs);
  setOutlineProvider(new ViewOutlineProvider(){
    @Override public void getOutline(    View view,    Outline outline){
      if (!mCustomOutline) {
        outline.setRect(0,mClipTopAmount,getWidth(),Math.max(mActualHeight,mClipTopAmount));
      }
 else {
        outline.setRect(mOutlineRect);
      }
    }
  }
);
}
Program: 197848
Project: 197848
Buggy source:
@Override @ServiceThreadOnly protected boolean handleReportPhysicalAddress(HdmiCecMessage message){
  assertRunOnServiceThread();
  int path=HdmiUtils.twoBytesToInt(message.getParams());
  int address=message.getSource();
  int type=message.getParams()[2];
  if (updateCecSwitchInfo(address,type,path))   return true;
  if (hasAction(DeviceDiscoveryAction.class)) {
    Slog.i(TAG,"String_Node_Str" + message);
    return true;
  }
  if (!isInDeviceList(path,address)) {
    handleNewDeviceAtTheTailOfActivePath(path);
  }
  startNewDeviceAction(ActiveSource.of(address,path));
  return true;
}

Fixed version (ground truth):
@Override @ServiceThreadOnly protected boolean handleReportPhysicalAddress(HdmiCecMessage message){
  assertRunOnServiceThread();
  int path=HdmiUtils.twoBytesToInt(message.getParams());
  int address=message.getSource();
  int type=message.getParams()[2];
  if (updateCecSwitchInfo(address,type,path))   return true;
  if (hasAction(DeviceDiscoveryAction.class)) {
    Slog.i(TAG,"String_Node_Str" + message);
    return true;
  }
  if (!isInDeviceList(address,path)) {
    handleNewDeviceAtTheTailOfActivePath(path);
  }
  startNewDeviceAction(ActiveSource.of(address,path));
  return true;
}
Program: 197849
Project: 197849
Buggy source:
/** 
 * Whether a device of the specified physical address and logical address exists in a device info list. However, both are minimal condition and it could be different device from the original one.
 * @param logicalAddress logical address of a device to be searched
 * @param physicalAddress physical address of a device to be searched
 * @return true if exist; otherwise false
 */
@ServiceThreadOnly boolean isInDeviceList(int logicalAddress,int physicalAddress){
  assertRunOnServiceThread();
  HdmiDeviceInfo device=getCecDeviceInfo(logicalAddress);
  if (device == null) {
    return false;
  }
  return device.getPhysicalAddress() == physicalAddress;
}

Fixed version (ground truth):
/** 
 * Whether a device of the specified physical address and logical address exists in a device info list. However, both are minimal condition and it could be different device from the original one.
 * @param logicalAddress logical address of a device to be searched
 * @param physicalAddress physical address of a device to be searched
 * @return true if exist; otherwise false
 */
@ServiceThreadOnly private boolean isInDeviceList(int logicalAddress,int physicalAddress){
  assertRunOnServiceThread();
  HdmiDeviceInfo device=getCecDeviceInfo(logicalAddress);
  if (device == null) {
    return false;
  }
  return device.getPhysicalAddress() == physicalAddress;
}
Program: 197850
Project: 197850
Buggy source:
@ServiceThreadOnly void handleRemoveActiveRoutingPath(int path){
  assertRunOnServiceThread();
  if (isTailOfActivePath(path,getActivePath())) {
    removeAction(RoutingControlAction.class);
    int newPath=mService.portIdToPath(getActivePortId());
    mService.sendCecCommand(HdmiCecMessageBuilder.buildRoutingChange(mAddress,getActivePath(),newPath));
    addAndStartAction(new RoutingControlAction(this,getActivePortId(),true,null));
  }
}

Fixed version (ground truth):
@ServiceThreadOnly void handleRemoveActiveRoutingPath(int path){
  assertRunOnServiceThread();
  if (isTailOfActivePath(path,getActivePath())) {
    removeAction(RoutingControlAction.class);
    int newPath=mService.portIdToPath(getActivePortId());
    mService.sendCecCommand(HdmiCecMessageBuilder.buildRoutingChange(mAddress,getActivePath(),newPath));
    mActiveSource.invalidate();
    addAndStartAction(new RoutingControlAction(this,getActivePath(),true,null));
  }
}
Program: 197851
Project: 197851
Buggy source:
/** 
 * Return a list of all   {@link HdmiDeviceInfo}. <p>Declared as package-private. accessed by   {@link HdmiControlService} only.This is not thread-safe. For thread safety, call  {@link #getSafeExternalInputsLocked} whichdoes not include local device.
 */
@ServiceThreadOnly List<HdmiDeviceInfo> getDeviceInfoList(boolean includelLocalDevice){
  assertRunOnServiceThread();
  if (includelLocalDevice) {
    return HdmiUtils.sparseArrayToList(mDeviceInfos);
  }
 else {
    ArrayList<HdmiDeviceInfo> infoList=new ArrayList<>();
    for (int i=0; i < mDeviceInfos.size(); ++i) {
      HdmiDeviceInfo info=mDeviceInfos.valueAt(i);
      if (!isLocalDeviceAddress(info.getLogicalAddress())) {
        infoList.add(info);
      }
    }
    return infoList;
  }
}

Fixed version (ground truth):
/** 
 * Return a list of all   {@link HdmiDeviceInfo}. <p>Declared as package-private. accessed by   {@link HdmiControlService} only.This is not thread-safe. For thread safety, call  {@link #getSafeExternalInputsLocked} whichdoes not include local device.
 */
@ServiceThreadOnly List<HdmiDeviceInfo> getDeviceInfoList(boolean includeLocalDevice){
  assertRunOnServiceThread();
  if (includeLocalDevice) {
    return HdmiUtils.sparseArrayToList(mDeviceInfos);
  }
 else {
    ArrayList<HdmiDeviceInfo> infoList=new ArrayList<>();
    for (int i=0; i < mDeviceInfos.size(); ++i) {
      HdmiDeviceInfo info=mDeviceInfos.valueAt(i);
      if (!isLocalDeviceAddress(info.getLogicalAddress())) {
        infoList.add(info);
      }
    }
    return infoList;
  }
}
Program: 197852
Project: 197852
Buggy source:
@Override protected void dump(final IndentingPrintWriter pw){
  super.dump(pw);
  pw.println("String_Node_Str" + mArcEstablished);
  pw.println("String_Node_Str" + mArcFeatureEnabled);
  pw.println("String_Node_Str" + mSystemAudioActivated);
  pw.println("String_Node_Str" + mSystemAudioMute);
  pw.println("String_Node_Str" + mAutoDeviceOff);
  pw.println("String_Node_Str" + mAutoWakeup);
  pw.println("String_Node_Str" + mSkipRoutingControl);
}

Fixed version (ground truth):
@Override protected void dump(final IndentingPrintWriter pw){
  super.dump(pw);
  pw.println("String_Node_Str" + mArcEstablished);
  pw.println("String_Node_Str" + mArcFeatureEnabled);
  pw.println("String_Node_Str" + mSystemAudioActivated);
  pw.println("String_Node_Str" + mSystemAudioMute);
  pw.println("String_Node_Str" + mAutoDeviceOff);
  pw.println("String_Node_Str" + mAutoWakeup);
  pw.println("String_Node_Str" + mSkipRoutingControl);
  pw.println("String_Node_Str");
  pw.increaseIndent();
  for (  HdmiDeviceInfo info : mSafeAllDeviceInfos) {
    pw.println(info);
  }
  pw.decreaseIndent();
}
Program: 197853
Project: 197853
Buggy source:
@ServiceThreadOnly void updateActiveInput(int path,boolean notifyInputChange){
  assertRunOnServiceThread();
  if (path == getActivePath()) {
    return;
  }
  setPrevPortId(getActivePortId());
  int portId=mService.pathToPortId(path);
  setActivePath(path);
  if (notifyInputChange) {
    ActiveSource activeSource=getActiveSource();
    HdmiDeviceInfo info=getCecDeviceInfo(activeSource.logicalAddress);
    if (info == null) {
      info=new HdmiDeviceInfo(Constants.ADDR_INVALID,path,portId,HdmiDeviceInfo.DEVICE_RESERVED,0,null);
    }
    mService.invokeInputChangeListener(info);
  }
}

Fixed version (ground truth):
@ServiceThreadOnly void updateActiveInput(int path,boolean notifyInputChange){
  assertRunOnServiceThread();
  if (path == getActivePath()) {
    return;
  }
  setPrevPortId(getActivePortId());
  setActivePath(path);
  if (notifyInputChange) {
    ActiveSource activeSource=getActiveSource();
    HdmiDeviceInfo info=getCecDeviceInfo(activeSource.logicalAddress);
    if (info == null) {
      info=new HdmiDeviceInfo(Constants.ADDR_INVALID,path,getActivePortId(),HdmiDeviceInfo.DEVICE_RESERVED,0,null);
    }
    mService.invokeInputChangeListener(info);
  }
}
Program: 197854
Project: 197854
Buggy source:
protected void setOutlineRect(float left,float top,float right,float bottom){
  mCustomOutline=true;
  mOutlineRect.set((int)left,(int)top,(int)right,(int)bottom);
  mOutlineRect.bottom=(int)Math.max(top + mDensity,mOutlineRect.bottom);
  mOutlineRect.right=(int)Math.max(left + mDensity,mOutlineRect.right);
  invalidateOutline();
}

Fixed version (ground truth):
protected void setOutlineRect(float left,float top,float right,float bottom){
  mCustomOutline=true;
  mOutlineRect.set((int)left,(int)top,(int)right,(int)bottom);
  mOutlineRect.bottom=(int)Math.max(top,mOutlineRect.bottom);
  mOutlineRect.right=(int)Math.max(left,mOutlineRect.right);
  invalidateOutline();
}
Program: 197855
Project: 197855
Buggy source:
public ExpandableOutlineView(Context context,AttributeSet attrs){
  super(context,attrs);
  mDensity=getResources().getDisplayMetrics().density;
  setOutlineProvider(new ViewOutlineProvider(){
    @Override public void getOutline(    View view,    Outline outline){
      if (!mCustomOutline) {
        outline.setRect(0,mClipTopAmount,getWidth(),Math.max(mActualHeight,mClipTopAmount));
      }
 else {
        outline.setRect(mOutlineRect);
      }
    }
  }
);
}

Fixed version (ground truth):
public ExpandableOutlineView(Context context,AttributeSet attrs){
  super(context,attrs);
  setOutlineProvider(new ViewOutlineProvider(){
    @Override public void getOutline(    View view,    Outline outline){
      if (!mCustomOutline) {
        outline.setRect(0,mClipTopAmount,getWidth(),Math.max(mActualHeight,mClipTopAmount));
      }
 else {
        outline.setRect(mOutlineRect);
      }
    }
  }
);
}
Program: 197856
Project: 197856
Buggy source:
/** 
 * Called with the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  mConfig=RecentsConfiguration.reinitialize(this,RecentsTaskLoader.getInstance().getSystemServicesProxy());
  mAppWidgetHost=new RecentsAppWidgetHost(this,Constants.Values.App.AppWidgetHostId);
  setContentView(R.layout.recents);
  mRecentsView=(RecentsView)findViewById(R.id.recents_view);
  mRecentsView.setCallbacks(this);
  mRecentsView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
  mEmptyViewStub=(ViewStub)findViewById(R.id.empty_view_stub);
  mDebugOverlayStub=(ViewStub)findViewById(R.id.debug_overlay_stub);
  mScrimViews=new SystemBarScrimViews(this,mConfig);
  inflateDebugOverlay();
  bindSearchBarAppWidget();
  updateRecentsTasks(getIntent());
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_SCREEN_OFF);
  filter.addAction(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED);
  registerReceiver(mSystemBroadcastReceiver,filter);
  try {
    Utilities.setShadowProperty("String_Node_Str",String.valueOf(1.5f));
  }
 catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
catch (  InvocationTargetException e) {
    e.printStackTrace();
  }
  if (savedInstanceState != null) {
    mConfig.updateOnConfigurationChange();
    onConfigurationChange();
  }
}

Fixed version (ground truth):
/** 
 * Called with the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  RecentsTaskLoader.initialize(this);
  mConfig=RecentsConfiguration.reinitialize(this,RecentsTaskLoader.getInstance().getSystemServicesProxy());
  mAppWidgetHost=new RecentsAppWidgetHost(this,Constants.Values.App.AppWidgetHostId);
  setContentView(R.layout.recents);
  mRecentsView=(RecentsView)findViewById(R.id.recents_view);
  mRecentsView.setCallbacks(this);
  mRecentsView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
  mEmptyViewStub=(ViewStub)findViewById(R.id.empty_view_stub);
  mDebugOverlayStub=(ViewStub)findViewById(R.id.debug_overlay_stub);
  mScrimViews=new SystemBarScrimViews(this,mConfig);
  inflateDebugOverlay();
  bindSearchBarAppWidget();
  updateRecentsTasks(getIntent());
  IntentFilter filter=new IntentFilter();
  filter.addAction(Intent.ACTION_SCREEN_OFF);
  filter.addAction(SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED);
  registerReceiver(mSystemBroadcastReceiver,filter);
  try {
    Utilities.setShadowProperty("String_Node_Str",String.valueOf(1.5f));
  }
 catch (  IllegalAccessException e) {
    e.printStackTrace();
  }
catch (  InvocationTargetException e) {
    e.printStackTrace();
  }
  if (savedInstanceState != null) {
    mConfig.updateOnConfigurationChange();
    onConfigurationChange();
  }
}
Program: 197857
Project: 197857
Buggy source:
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  boolean updateExpandHeight=mMaxExpandHeight == 0 && !mWasReset;
  mMaxExpandHeight=mPrivateLayout.getMaxHeight();
  if (updateExpandHeight) {
    applyExpansionToLayout();
  }
  mWasReset=false;
}

Fixed version (ground truth):
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  boolean updateExpandHeight=mMaxExpandHeight == 0 && !mWasReset;
  updateMaxExpandHeight();
  if (updateExpandHeight) {
    applyExpansionToLayout();
  }
  mWasReset=false;
}
Program: 197858
Project: 197858
Buggy source:
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  if (!mActualHeightInitialized && mActualHeight == 0) {
    setActualHeight(getInitialHeight());
  }
}

Fixed version (ground truth):
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  if (!mActualHeightInitialized && mActualHeight == 0) {
    int initialHeight=getInitialHeight();
    if (initialHeight != 0) {
      setActualHeight(initialHeight);
    }
  }
}
Program: 197859
Project: 197859
Buggy source:
@Override public void run(){
  mDismissView.setVisibility(GONE);
  mDismissView.setWillBeGone(false);
  updateContentHeight();
}

Fixed version (ground truth):
@Override public void run(){
  mDismissView.setVisibility(GONE);
  mDismissView.setWillBeGone(false);
  updateContentHeight();
  notifyHeightChangeListener(mDismissView);
}
Program: 197860
Project: 197860
Buggy source:
public void updateDismissView(boolean visible){
  int oldVisibility=mDismissView.willBeGone() ? GONE : mDismissView.getVisibility();
  int newVisibility=visible ? VISIBLE : GONE;
  if (oldVisibility != newVisibility) {
    if (oldVisibility == GONE) {
      if (mDismissView.willBeGone()) {
        mDismissView.cancelAnimation();
      }
 else {
        mDismissView.setInvisible();
        mDismissView.setVisibility(newVisibility);
      }
      mDismissView.setWillBeGone(false);
      updateContentHeight();
    }
 else {
      mDismissView.setWillBeGone(true);
      mDismissView.performVisibilityAnimation(false,new Runnable(){
        @Override public void run(){
          mDismissView.setVisibility(GONE);
          mDismissView.setWillBeGone(false);
          updateContentHeight();
        }
      }
);
    }
  }
}

Fixed version (ground truth):
public void updateDismissView(boolean visible){
  int oldVisibility=mDismissView.willBeGone() ? GONE : mDismissView.getVisibility();
  int newVisibility=visible ? VISIBLE : GONE;
  if (oldVisibility != newVisibility) {
    if (newVisibility != GONE) {
      if (mDismissView.willBeGone()) {
        mDismissView.cancelAnimation();
      }
 else {
        mDismissView.setInvisible();
      }
      mDismissView.setVisibility(newVisibility);
      mDismissView.setWillBeGone(false);
      updateContentHeight();
      notifyHeightChangeListener(mDismissView);
    }
 else {
      mDismissView.setWillBeGone(true);
      mDismissView.performVisibilityAnimation(false,new Runnable(){
        @Override public void run(){
          mDismissView.setVisibility(GONE);
          mDismissView.setWillBeGone(false);
          updateContentHeight();
          notifyHeightChangeListener(mDismissView);
        }
      }
);
    }
  }
}
Program: 197861
Project: 197861
Buggy source:
public void updateEmptyShadeView(boolean visible){
  int oldVisibility=mEmptyShadeView.willBeGone() ? GONE : mEmptyShadeView.getVisibility();
  int newVisibility=visible ? VISIBLE : GONE;
  if (oldVisibility != newVisibility) {
    if (oldVisibility == GONE) {
      if (mEmptyShadeView.willBeGone()) {
        mEmptyShadeView.cancelAnimation();
      }
 else {
        mEmptyShadeView.setInvisible();
        mEmptyShadeView.setVisibility(newVisibility);
      }
      mEmptyShadeView.setWillBeGone(false);
      updateContentHeight();
    }
 else {
      mEmptyShadeView.setWillBeGone(true);
      mEmptyShadeView.performVisibilityAnimation(false,new Runnable(){
        @Override public void run(){
          mEmptyShadeView.setVisibility(GONE);
          mEmptyShadeView.setWillBeGone(false);
          updateContentHeight();
        }
      }
);
    }
  }
}

Fixed version (ground truth):
public void updateEmptyShadeView(boolean visible){
  int oldVisibility=mEmptyShadeView.willBeGone() ? GONE : mEmptyShadeView.getVisibility();
  int newVisibility=visible ? VISIBLE : GONE;
  if (oldVisibility != newVisibility) {
    if (newVisibility != GONE) {
      if (mEmptyShadeView.willBeGone()) {
        mEmptyShadeView.cancelAnimation();
      }
 else {
        mEmptyShadeView.setInvisible();
      }
      mEmptyShadeView.setVisibility(newVisibility);
      mEmptyShadeView.setWillBeGone(false);
      updateContentHeight();
      notifyHeightChangeListener(mDismissView);
    }
 else {
      mEmptyShadeView.setWillBeGone(true);
      mEmptyShadeView.performVisibilityAnimation(false,new Runnable(){
        @Override public void run(){
          mEmptyShadeView.setVisibility(GONE);
          mEmptyShadeView.setWillBeGone(false);
          updateContentHeight();
          notifyHeightChangeListener(mDismissView);
        }
      }
);
    }
  }
}
Program: 197863
Project: 197863
Buggy source:
protected void setOutlineRect(float left,float top,float right,float bottom){
  mCustomOutline=true;
  mOutlineRect.set((int)left,(int)top,(int)right,(int)bottom);
  mOutlineRect.bottom=(int)Math.max(top + mDensity,mOutlineRect.bottom);
  mOutlineRect.right=(int)Math.max(left + mDensity,mOutlineRect.right);
  invalidateOutline();
}

Fixed version (ground truth):
protected void setOutlineRect(float left,float top,float right,float bottom){
  mCustomOutline=true;
  mOutlineRect.set((int)left,(int)top,(int)right,(int)bottom);
  mOutlineRect.bottom=(int)Math.max(top,mOutlineRect.bottom);
  mOutlineRect.right=(int)Math.max(left,mOutlineRect.right);
  invalidateOutline();
}
Program: 197864
Project: 197864
Buggy source:
public ExpandableOutlineView(Context context,AttributeSet attrs){
  super(context,attrs);
  mDensity=getResources().getDisplayMetrics().density;
  setOutlineProvider(new ViewOutlineProvider(){
    @Override public void getOutline(    View view,    Outline outline){
      if (!mCustomOutline) {
        outline.setRect(0,mClipTopAmount,getWidth(),Math.max(mActualHeight,mClipTopAmount));
      }
 else {
        outline.setRect(mOutlineRect);
      }
    }
  }
);
}

Fixed version (ground truth):
public ExpandableOutlineView(Context context,AttributeSet attrs){
  super(context,attrs);
  setOutlineProvider(new ViewOutlineProvider(){
    @Override public void getOutline(    View view,    Outline outline){
      if (!mCustomOutline) {
        outline.setRect(0,mClipTopAmount,getWidth(),Math.max(mActualHeight,mClipTopAmount));
      }
 else {
        outline.setRect(mOutlineRect);
      }
    }
  }
);
}
Program: 197865
Project: 197865
Buggy source:
protected void setOutlineRect(float left,float top,float right,float bottom){
  mCustomOutline=true;
  mOutlineRect.set((int)left,(int)top,(int)right,(int)bottom);
  mOutlineRect.bottom=(int)Math.max(top + mDensity,mOutlineRect.bottom);
  mOutlineRect.right=(int)Math.max(left + mDensity,mOutlineRect.right);
  invalidateOutline();
}

Fixed version (ground truth):
protected void setOutlineRect(float left,float top,float right,float bottom){
  mCustomOutline=true;
  mOutlineRect.set((int)left,(int)top,(int)right,(int)bottom);
  mOutlineRect.bottom=(int)Math.max(top,mOutlineRect.bottom);
  mOutlineRect.right=(int)Math.max(left,mOutlineRect.right);
  invalidateOutline();
}
Program: 197866
Project: 197866
Buggy source:
public ExpandableOutlineView(Context context,AttributeSet attrs){
  super(context,attrs);
  mDensity=getResources().getDisplayMetrics().density;
  setOutlineProvider(new ViewOutlineProvider(){
    @Override public void getOutline(    View view,    Outline outline){
      if (!mCustomOutline) {
        outline.setRect(0,mClipTopAmount,getWidth(),Math.max(mActualHeight,mClipTopAmount));
      }
 else {
        outline.setRect(mOutlineRect);
      }
    }
  }
);
}

Fixed version (ground truth):
public ExpandableOutlineView(Context context,AttributeSet attrs){
  super(context,attrs);
  setOutlineProvider(new ViewOutlineProvider(){
    @Override public void getOutline(    View view,    Outline outline){
      if (!mCustomOutline) {
        outline.setRect(0,mClipTopAmount,getWidth(),Math.max(mActualHeight,mClipTopAmount));
      }
 else {
        outline.setRect(mOutlineRect);
      }
    }
  }
);
}
Program: 197867
Project: 197867
Buggy source:
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  boolean updateExpandHeight=mMaxExpandHeight == 0 && !mWasReset;
  mMaxExpandHeight=mPrivateLayout.getMaxHeight();
  if (updateExpandHeight) {
    applyExpansionToLayout();
  }
  mWasReset=false;
}

Fixed version (ground truth):
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  boolean updateExpandHeight=mMaxExpandHeight == 0 && !mWasReset;
  updateMaxExpandHeight();
  if (updateExpandHeight) {
    applyExpansionToLayout();
  }
  mWasReset=false;
}
Program: 197868
Project: 197868
Buggy source:
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  if (!mActualHeightInitialized && mActualHeight == 0) {
    setActualHeight(getInitialHeight());
  }
}

Fixed version (ground truth):
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  if (!mActualHeightInitialized && mActualHeight == 0) {
    int initialHeight=getInitialHeight();
    if (initialHeight != 0) {
      setActualHeight(initialHeight);
    }
  }
}
Program: 197869
Project: 197869
Buggy source:
@Override public void run(){
  mDismissView.setVisibility(GONE);
  mDismissView.setWillBeGone(false);
  updateContentHeight();
}

Fixed version (ground truth):
@Override public void run(){
  mDismissView.setVisibility(GONE);
  mDismissView.setWillBeGone(false);
  updateContentHeight();
  notifyHeightChangeListener(mDismissView);
}
Program: 197870
Project: 197870
Buggy source:
public void updateDismissView(boolean visible){
  int oldVisibility=mDismissView.willBeGone() ? GONE : mDismissView.getVisibility();
  int newVisibility=visible ? VISIBLE : GONE;
  if (oldVisibility != newVisibility) {
    if (oldVisibility == GONE) {
      if (mDismissView.willBeGone()) {
        mDismissView.cancelAnimation();
      }
 else {
        mDismissView.setInvisible();
        mDismissView.setVisibility(newVisibility);
      }
      mDismissView.setWillBeGone(false);
      updateContentHeight();
    }
 else {
      mDismissView.setWillBeGone(true);
      mDismissView.performVisibilityAnimation(false,new Runnable(){
        @Override public void run(){
          mDismissView.setVisibility(GONE);
          mDismissView.setWillBeGone(false);
          updateContentHeight();
        }
      }
);
    }
  }
}

Fixed version (ground truth):
public void updateDismissView(boolean visible){
  int oldVisibility=mDismissView.willBeGone() ? GONE : mDismissView.getVisibility();
  int newVisibility=visible ? VISIBLE : GONE;
  if (oldVisibility != newVisibility) {
    if (newVisibility != GONE) {
      if (mDismissView.willBeGone()) {
        mDismissView.cancelAnimation();
      }
 else {
        mDismissView.setInvisible();
      }
      mDismissView.setVisibility(newVisibility);
      mDismissView.setWillBeGone(false);
      updateContentHeight();
      notifyHeightChangeListener(mDismissView);
    }
 else {
      mDismissView.setWillBeGone(true);
      mDismissView.performVisibilityAnimation(false,new Runnable(){
        @Override public void run(){
          mDismissView.setVisibility(GONE);
          mDismissView.setWillBeGone(false);
          updateContentHeight();
          notifyHeightChangeListener(mDismissView);
        }
      }
);
    }
  }
}
Program: 197871
Project: 197871
Buggy source:
public void updateEmptyShadeView(boolean visible){
  int oldVisibility=mEmptyShadeView.willBeGone() ? GONE : mEmptyShadeView.getVisibility();
  int newVisibility=visible ? VISIBLE : GONE;
  if (oldVisibility != newVisibility) {
    if (oldVisibility == GONE) {
      if (mEmptyShadeView.willBeGone()) {
        mEmptyShadeView.cancelAnimation();
      }
 else {
        mEmptyShadeView.setInvisible();
        mEmptyShadeView.setVisibility(newVisibility);
      }
      mEmptyShadeView.setWillBeGone(false);
      updateContentHeight();
    }
 else {
      mEmptyShadeView.setWillBeGone(true);
      mEmptyShadeView.performVisibilityAnimation(false,new Runnable(){
        @Override public void run(){
          mEmptyShadeView.setVisibility(GONE);
          mEmptyShadeView.setWillBeGone(false);
          updateContentHeight();
        }
      }
);
    }
  }
}

Fixed version (ground truth):
public void updateEmptyShadeView(boolean visible){
  int oldVisibility=mEmptyShadeView.willBeGone() ? GONE : mEmptyShadeView.getVisibility();
  int newVisibility=visible ? VISIBLE : GONE;
  if (oldVisibility != newVisibility) {
    if (newVisibility != GONE) {
      if (mEmptyShadeView.willBeGone()) {
        mEmptyShadeView.cancelAnimation();
      }
 else {
        mEmptyShadeView.setInvisible();
      }
      mEmptyShadeView.setVisibility(newVisibility);
      mEmptyShadeView.setWillBeGone(false);
      updateContentHeight();
      notifyHeightChangeListener(mDismissView);
    }
 else {
      mEmptyShadeView.setWillBeGone(true);
      mEmptyShadeView.performVisibilityAnimation(false,new Runnable(){
        @Override public void run(){
          mEmptyShadeView.setVisibility(GONE);
          mEmptyShadeView.setWillBeGone(false);
          updateContentHeight();
          notifyHeightChangeListener(mDismissView);
        }
      }
);
    }
  }
}
Program: 197873
Project: 197873
Buggy source:
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  boolean updateExpandHeight=mMaxExpandHeight == 0 && !mWasReset;
  mMaxExpandHeight=mPrivateLayout.getMaxHeight();
  if (updateExpandHeight) {
    applyExpansionToLayout();
  }
  mWasReset=false;
}

Fixed version (ground truth):
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  boolean updateExpandHeight=mMaxExpandHeight == 0 && !mWasReset;
  updateMaxExpandHeight();
  if (updateExpandHeight) {
    applyExpansionToLayout();
  }
  mWasReset=false;
}
Program: 197874
Project: 197874
Buggy source:
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  if (!mActualHeightInitialized && mActualHeight == 0) {
    setActualHeight(getInitialHeight());
  }
}

Fixed version (ground truth):
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  if (!mActualHeightInitialized && mActualHeight == 0) {
    int initialHeight=getInitialHeight();
    if (initialHeight != 0) {
      setActualHeight(initialHeight);
    }
  }
}
Program: 197875
Project: 197875
Buggy source:
@Override public void run(){
  mDismissView.setVisibility(GONE);
  mDismissView.setWillBeGone(false);
  updateContentHeight();
}

Fixed version (ground truth):
@Override public void run(){
  mDismissView.setVisibility(GONE);
  mDismissView.setWillBeGone(false);
  updateContentHeight();
  notifyHeightChangeListener(mDismissView);
}
Program: 197876
Project: 197876
Buggy source:
public void updateDismissView(boolean visible){
  int oldVisibility=mDismissView.willBeGone() ? GONE : mDismissView.getVisibility();
  int newVisibility=visible ? VISIBLE : GONE;
  if (oldVisibility != newVisibility) {
    if (oldVisibility == GONE) {
      if (mDismissView.willBeGone()) {
        mDismissView.cancelAnimation();
      }
 else {
        mDismissView.setInvisible();
        mDismissView.setVisibility(newVisibility);
      }
      mDismissView.setWillBeGone(false);
      updateContentHeight();
    }
 else {
      mDismissView.setWillBeGone(true);
      mDismissView.performVisibilityAnimation(false,new Runnable(){
        @Override public void run(){
          mDismissView.setVisibility(GONE);
          mDismissView.setWillBeGone(false);
          updateContentHeight();
        }
      }
);
    }
  }
}

Fixed version (ground truth):
public void updateDismissView(boolean visible){
  int oldVisibility=mDismissView.willBeGone() ? GONE : mDismissView.getVisibility();
  int newVisibility=visible ? VISIBLE : GONE;
  if (oldVisibility != newVisibility) {
    if (newVisibility != GONE) {
      if (mDismissView.willBeGone()) {
        mDismissView.cancelAnimation();
      }
 else {
        mDismissView.setInvisible();
      }
      mDismissView.setVisibility(newVisibility);
      mDismissView.setWillBeGone(false);
      updateContentHeight();
      notifyHeightChangeListener(mDismissView);
    }
 else {
      mDismissView.setWillBeGone(true);
      mDismissView.performVisibilityAnimation(false,new Runnable(){
        @Override public void run(){
          mDismissView.setVisibility(GONE);
          mDismissView.setWillBeGone(false);
          updateContentHeight();
          notifyHeightChangeListener(mDismissView);
        }
      }
);
    }
  }
}
Program: 197877
Project: 197877
Buggy source:
public void updateEmptyShadeView(boolean visible){
  int oldVisibility=mEmptyShadeView.willBeGone() ? GONE : mEmptyShadeView.getVisibility();
  int newVisibility=visible ? VISIBLE : GONE;
  if (oldVisibility != newVisibility) {
    if (oldVisibility == GONE) {
      if (mEmptyShadeView.willBeGone()) {
        mEmptyShadeView.cancelAnimation();
      }
 else {
        mEmptyShadeView.setInvisible();
        mEmptyShadeView.setVisibility(newVisibility);
      }
      mEmptyShadeView.setWillBeGone(false);
      updateContentHeight();
    }
 else {
      mEmptyShadeView.setWillBeGone(true);
      mEmptyShadeView.performVisibilityAnimation(false,new Runnable(){
        @Override public void run(){
          mEmptyShadeView.setVisibility(GONE);
          mEmptyShadeView.setWillBeGone(false);
          updateContentHeight();
        }
      }
);
    }
  }
}

Fixed version (ground truth):
public void updateEmptyShadeView(boolean visible){
  int oldVisibility=mEmptyShadeView.willBeGone() ? GONE : mEmptyShadeView.getVisibility();
  int newVisibility=visible ? VISIBLE : GONE;
  if (oldVisibility != newVisibility) {
    if (newVisibility != GONE) {
      if (mEmptyShadeView.willBeGone()) {
        mEmptyShadeView.cancelAnimation();
      }
 else {
        mEmptyShadeView.setInvisible();
      }
      mEmptyShadeView.setVisibility(newVisibility);
      mEmptyShadeView.setWillBeGone(false);
      updateContentHeight();
      notifyHeightChangeListener(mDismissView);
    }
 else {
      mEmptyShadeView.setWillBeGone(true);
      mEmptyShadeView.performVisibilityAnimation(false,new Runnable(){
        @Override public void run(){
          mEmptyShadeView.setVisibility(GONE);
          mEmptyShadeView.setWillBeGone(false);
          updateContentHeight();
          notifyHeightChangeListener(mDismissView);
        }
      }
);
    }
  }
}
Program: 197879
Project: 197879
Buggy source:
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  boolean updateExpandHeight=mMaxExpandHeight == 0 && !mWasReset;
  mMaxExpandHeight=mPrivateLayout.getMaxHeight();
  if (updateExpandHeight) {
    applyExpansionToLayout();
  }
  mWasReset=false;
}

Fixed version (ground truth):
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  boolean updateExpandHeight=mMaxExpandHeight == 0 && !mWasReset;
  updateMaxExpandHeight();
  if (updateExpandHeight) {
    applyExpansionToLayout();
  }
  mWasReset=false;
}
Program: 197880
Project: 197880
Buggy source:
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  if (!mActualHeightInitialized && mActualHeight == 0) {
    setActualHeight(getInitialHeight());
  }
}

Fixed version (ground truth):
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  if (!mActualHeightInitialized && mActualHeight == 0) {
    int initialHeight=getInitialHeight();
    if (initialHeight != 0) {
      setActualHeight(initialHeight);
    }
  }
}
Program: 197881
Project: 197881
Buggy source:
@Override public void run(){
  mDismissView.setVisibility(GONE);
  mDismissView.setWillBeGone(false);
  updateContentHeight();
}

Fixed version (ground truth):
@Override public void run(){
  mDismissView.setVisibility(GONE);
  mDismissView.setWillBeGone(false);
  updateContentHeight();
  notifyHeightChangeListener(mDismissView);
}