nus-yam/ex-repair huggingface dataset:
Program: 196252
Project: 196252
Buggy source:
/** 
 * Send vendor-specific command.
 * @param targetAddress address of the target device
 * @param params vendor-specific parameter. For &lt;Vendor Command With ID&gt; do notinclude the first 3 bytes (vendor ID).
 * @param hasVendorId {@code true} if the command type will be &lt;Vendor Command With ID&gt;.{@code false} if the command will be &lt;Vendor Command&gt;
 */
public void sendVendorCommand(int targetAddress,byte[] params,boolean hasVendorId){
  try {
    mService.sendVendorCommand(getDeviceType(),targetAddress,params,hasVendorId);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Sends vendor-specific command.
 * @param targetAddress address of the target device
 * @param params vendor-specific parameter. For &lt;Vendor Command With ID&gt; do notinclude the first 3 bytes (vendor ID).
 * @param hasVendorId {@code true} if the command type will be &lt;Vendor Command With ID&gt;.{@code false} if the command will be &lt;Vendor Command&gt;
 */
public void sendVendorCommand(int targetAddress,byte[] params,boolean hasVendorId){
  try {
    mService.sendVendorCommand(getDeviceType(),targetAddress,params,hasVendorId);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 196253
Project: 196253
Buggy source:
/** 
 * @hide - hide this constructor because it has a parameter of typeIHdmiControlService, which is a system private class. The right way to create an instance of this class is using the factory Context.getSystemService.
 */
public HdmiControlManager(IHdmiControlService service){
  mService=service;
  int[] types=null;
  if (mService != null) {
    try {
      types=mService.getSupportedTypes();
    }
 catch (    RemoteException e) {
    }
  }
  mHasTvDevice=hasDeviceType(types,HdmiDeviceInfo.DEVICE_TV);
  mHasPlaybackDevice=hasDeviceType(types,HdmiDeviceInfo.DEVICE_PLAYBACK);
}

Fixed version (ground truth):
/** 
 * {@hide} - hide this constructor because it has a parameter of type IHdmiControlService,which is a system private class. The right way to create an instance of this class is using the factory Context.getSystemService.
 */
public HdmiControlManager(IHdmiControlService service){
  mService=service;
  int[] types=null;
  if (mService != null) {
    try {
      types=mService.getSupportedTypes();
    }
 catch (    RemoteException e) {
    }
  }
  mHasTvDevice=hasDeviceType(types,HdmiDeviceInfo.DEVICE_TV);
  mHasPlaybackDevice=hasDeviceType(types,HdmiDeviceInfo.DEVICE_PLAYBACK);
}
Program: 196254
Project: 196254
Buggy source:
/** 
 * Removes a listener to stop getting informed of   {@link HdmiHotplugEvent}.
 * @param listener {@link HotplugEventListener} instance to be removed
 */
public void removeHotplugEventListener(HotplugEventListener listener){
  if (mService == null) {
    return;
  }
  try {
    mService.removeHotplugEventListener(getHotplugEventListenerWrapper(listener));
  }
 catch (  RemoteException e) {
  }
}

Fixed version (ground truth):
/** 
 * Removes a listener to stop getting informed of   {@link HdmiHotplugEvent}.
 * @param listener {@link HotplugEventListener} instance to be removed
 */
public void removeHotplugEventListener(HotplugEventListener listener){
  if (mService == null) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  IHdmiHotplugEventListener wrappedListener=mHotplugEventListeners.remove(listener);
  if (wrappedListener == null) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  try {
    mService.removeHotplugEventListener(wrappedListener);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 196255
Project: 196255
Buggy source:
/** 
 * Adds a listener to get informed of   {@link HdmiHotplugEvent}. <p>To stop getting the notification, use   {@link #removeHotplugEventListener(HotplugEventListener)}.
 * @param listener {@link HotplugEventListener} instance
 * @see HdmiControlManager#removeHotplugEventListener(HotplugEventListener)
 */
public void addHotplugEventListener(HotplugEventListener listener){
  if (mService == null) {
    return;
  }
  try {
    mService.addHotplugEventListener(getHotplugEventListenerWrapper(listener));
  }
 catch (  RemoteException e) {
  }
}

Fixed version (ground truth):
/** 
 * Adds a listener to get informed of   {@link HdmiHotplugEvent}. <p>To stop getting the notification, use   {@link #removeHotplugEventListener(HotplugEventListener)}.
 * @param listener {@link HotplugEventListener} instance
 * @see HdmiControlManager#removeHotplugEventListener(HotplugEventListener)
 */
public void addHotplugEventListener(HotplugEventListener listener){
  if (mService == null) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  if (mHotplugEventListeners.containsKey(listener)) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  IHdmiHotplugEventListener wrappedListener=getHotplugEventListenerWrapper(listener);
  mHotplugEventListeners.put(listener,wrappedListener);
  try {
    mService.addHotplugEventListener(wrappedListener);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 196256
Project: 196256
Buggy source:
/** 
 * Return the physical address of the device.
 */
public int getPhysicalAddress(){
  return mPhysicalAddress;
}

Fixed version (ground truth):
/** 
 * Returns the physical address of the device.
 */
public int getPhysicalAddress(){
  return mPhysicalAddress;
}
Program: 196257
Project: 196257
Buggy source:
/** 
 * Return the CEC logical address of the device.
 */
public int getLogicalAddress(){
  return mLogicalAddress;
}

Fixed version (ground truth):
/** 
 * Returns the CEC logical address of the device.
 */
public int getLogicalAddress(){
  return mLogicalAddress;
}
Program: 196258
Project: 196258
Buggy source:
/** 
 * Return the id of the device.
 */
public int getId(){
  return mId;
}

Fixed version (ground truth):
/** 
 * Returns the id of the device.
 */
public int getId(){
  return mId;
}
Program: 196259
Project: 196259
Buggy source:
/** 
 * Return device's power status. It should be one of the following values. <ul> <li>  {@link HdmiControlManager#POWER_STATUS_ON}<li>  {@link HdmiControlManager#POWER_STATUS_STANDBY}<li>  {@link HdmiControlManager#POWER_STATUS_TRANSIENT_TO_ON}<li>  {@link HdmiControlManager#POWER_STATUS_TRANSIENT_TO_STANDBY}<li>  {@link HdmiControlManager#POWER_STATUS_UNKNOWN}</ul>
 */
public int getDevicePowerStatus(){
  return mDevicePowerStatus;
}

Fixed version (ground truth):
/** 
 * Returns device's power status. It should be one of the following values. <ul> <li>  {@link HdmiControlManager#POWER_STATUS_ON}<li>  {@link HdmiControlManager#POWER_STATUS_STANDBY}<li>  {@link HdmiControlManager#POWER_STATUS_TRANSIENT_TO_ON}<li>  {@link HdmiControlManager#POWER_STATUS_TRANSIENT_TO_STANDBY}<li>  {@link HdmiControlManager#POWER_STATUS_UNKNOWN}</ul>
 */
public int getDevicePowerStatus(){
  return mDevicePowerStatus;
}
Program: 196260
Project: 196260
Buggy source:
/** 
 * Describe the kinds of special objects contained in this Parcelable's marshalled representation.
 */
@Override public int describeContents(){
  return 0;
}

Fixed version (ground truth):
/** 
 * Describes the kinds of special objects contained in this Parcelable's marshalled representation.
 */
@Override public int describeContents(){
  return 0;
}
Program: 196261
Project: 196261
Buggy source:
/** 
 * Return the id to be used for MHL device.
 * @param portId port which the MHL device is connected to
 * @return id for MHL device
 */
public static int idForMhlDevice(int portId){
  return ID_OFFSET_MHL + portId;
}

Fixed version (ground truth):
/** 
 * Returns the id to be used for MHL device.
 * @param portId port which the MHL device is connected to
 * @return id for MHL device
 */
public static int idForMhlDevice(int portId){
  return ID_OFFSET_MHL + portId;
}
Program: 196262
Project: 196262
Buggy source:
/** 
 * Return   {@code true} if the device represents an HDMI-CEC device. {@code false} if the deviceis either MHL or other device.
 */
public boolean isCecDevice(){
  return mHdmiDeviceType == HDMI_DEVICE_TYPE_CEC;
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if the device represents an HDMI-CEC device. {@code false} if the deviceis either MHL or other device.
 */
public boolean isCecDevice(){
  return mHdmiDeviceType == HDMI_DEVICE_TYPE_CEC;
}
Program: 196263
Project: 196263
Buggy source:
/** 
 * Return MHL device id. Return -1 for non-MHL device.
 */
public int getDeviceId(){
  return mDeviceId;
}

Fixed version (ground truth):
/** 
 * Returns MHL device id. Return -1 for non-MHL device.
 */
public int getDeviceId(){
  return mDeviceId;
}
Program: 196264
Project: 196264
Buggy source:
/** 
 * Return   {@code true} if the device is of a type that can be an input source.
 */
public boolean isSourceType(){
  return mDeviceType == DEVICE_PLAYBACK || mDeviceType == DEVICE_RECORDER || mDeviceType == DEVICE_TUNER;
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if the device is of a type that can be an input source.
 */
public boolean isSourceType(){
  return mDeviceType == DEVICE_PLAYBACK || mDeviceType == DEVICE_RECORDER || mDeviceType == DEVICE_TUNER;
}
Program: 196265
Project: 196265
Buggy source:
/** 
 * Return the port ID.
 */
public int getPortId(){
  return mPortId;
}

Fixed version (ground truth):
/** 
 * Returns the port ID.
 */
public int getPortId(){
  return mPortId;
}
Program: 196266
Project: 196266
Buggy source:
/** 
 * Return display (OSD) name of the device.
 */
public String getDisplayName(){
  return mDisplayName;
}

Fixed version (ground truth):
/** 
 * Returns display (OSD) name of the device.
 */
public String getDisplayName(){
  return mDisplayName;
}
Program: 196267
Project: 196267
Buggy source:
/** 
 * Return CEC type of the device. For more details, refer constants between   {@link #DEVICE_TV}and   {@link #DEVICE_INACTIVE}.
 */
public int getDeviceType(){
  return mDeviceType;
}

Fixed version (ground truth):
/** 
 * Returns CEC type of the device. For more details, refer constants between   {@link #DEVICE_TV}and   {@link #DEVICE_INACTIVE}.
 */
public int getDeviceType(){
  return mDeviceType;
}
Program: 196268
Project: 196268
Buggy source:
/** 
 * Return   {@code true} if the device represents an MHL device. {@code false} if the device iseither CEC or other device.
 */
public boolean isMhlDevice(){
  return mHdmiDeviceType == HDMI_DEVICE_TYPE_MHL;
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if the device represents an MHL device. {@code false} if the device iseither CEC or other device.
 */
public boolean isMhlDevice(){
  return mHdmiDeviceType == HDMI_DEVICE_TYPE_MHL;
}
Program: 196269
Project: 196269
Buggy source:
/** 
 * Return MHL adopter id. Return -1 for non-MHL device.
 */
public int getAdopterId(){
  return mAdopterId;
}

Fixed version (ground truth):
/** 
 * Returns MHL adopter id. Return -1 for non-MHL device.
 */
public int getAdopterId(){
  return mAdopterId;
}
Program: 196270
Project: 196270
Buggy source:
/** 
 * Return the id to be used for hardware port.
 * @param portId port id
 * @return id for hardware port
 */
public static int idForHardware(int portId){
  return ID_OFFSET_HARDWARE + portId;
}

Fixed version (ground truth):
/** 
 * Returns the id to be used for hardware port.
 * @param portId port id
 * @return id for hardware port
 */
public static int idForHardware(int portId){
  return ID_OFFSET_HARDWARE + portId;
}
Program: 196271
Project: 196271
Buggy source:
/** 
 * Return the id to be used for CEC device.
 * @param address logical address of CEC device
 * @return id for CEC device
 */
public static int idForCecDevice(int address){
  return ID_OFFSET_CEC + address;
}

Fixed version (ground truth):
/** 
 * Returns the id to be used for CEC device.
 * @param address logical address of CEC device
 * @return id for CEC device
 */
public static int idForCecDevice(int address){
  return ID_OFFSET_CEC + address;
}
Program: 196272
Project: 196272
Buggy source:
/** 
 * Return vendor id of the device. Vendor id is used to distinguish devices built by other manufactures. This is required for vendor-specific command on CEC standard.
 */
public int getVendorId(){
  return mVendorId;
}

Fixed version (ground truth):
/** 
 * Returns vendor id of the device. Vendor id is used to distinguish devices built by other manufactures. This is required for vendor-specific command on CEC standard.
 */
public int getVendorId(){
  return mVendorId;
}
Program: 196273
Project: 196273
Buggy source:
/** 
 * Serialize this object into a   {@link Parcel}.
 * @param dest The Parcel in which the object should be written.
 * @param flags Additional flags about how the object should be written. May be 0 or{@link Parcelable#PARCELABLE_WRITE_RETURN_VALUE}.
 */
@Override public void writeToParcel(Parcel dest,int flags){
  dest.writeInt(mHdmiDeviceType);
  dest.writeInt(mPhysicalAddress);
  dest.writeInt(mPortId);
switch (mHdmiDeviceType) {
case HDMI_DEVICE_TYPE_CEC:
    dest.writeInt(mLogicalAddress);
  dest.writeInt(mDeviceType);
dest.writeInt(mVendorId);
dest.writeInt(mDevicePowerStatus);
dest.writeString(mDisplayName);
break;
case HDMI_DEVICE_TYPE_MHL:
dest.writeInt(mDeviceId);
dest.writeInt(mAdopterId);
break;
default :
}
}

Fixed version (ground truth):
/** 
 * Serializes this object into a   {@link Parcel}.
 * @param dest The Parcel in which the object should be written.
 * @param flags Additional flags about how the object should be written. May be 0 or{@link Parcelable#PARCELABLE_WRITE_RETURN_VALUE}.
 */
@Override public void writeToParcel(Parcel dest,int flags){
  dest.writeInt(mHdmiDeviceType);
  dest.writeInt(mPhysicalAddress);
  dest.writeInt(mPortId);
switch (mHdmiDeviceType) {
case HDMI_DEVICE_TYPE_CEC:
    dest.writeInt(mLogicalAddress);
  dest.writeInt(mDeviceType);
dest.writeInt(mVendorId);
dest.writeInt(mDevicePowerStatus);
dest.writeString(mDisplayName);
break;
case HDMI_DEVICE_TYPE_MHL:
dest.writeInt(mDeviceId);
dest.writeInt(mAdopterId);
break;
default :
}
}
Program: 196274
Project: 196274
Buggy source:
/** 
 * Return the port number for which the event occurred.
 * @return port number
 */
public int getPort(){
  return mPort;
}

Fixed version (ground truth):
/** 
 * Returns the port number for which the event occurred.
 * @return port number
 */
public int getPort(){
  return mPort;
}
Program: 196275
Project: 196275
Buggy source:
/** 
 * Return the connection status associated with this event
 * @return true if the device gets connected; otherwise false
 */
public boolean isConnected(){
  return mConnected;
}

Fixed version (ground truth):
/** 
 * Returns the connection status associated with this event
 * @return true if the device gets connected; otherwise false
 */
public boolean isConnected(){
  return mConnected;
}
Program: 196276
Project: 196276
Buggy source:
public HdmiHotplugEvent[] newArray(int size){
  return new HdmiHotplugEvent[size];
}

Fixed version (ground truth):
@Override public HdmiHotplugEvent[] newArray(int size){
  return new HdmiHotplugEvent[size];
}
Program: 196277
Project: 196277
Buggy source:
/** 
 * Rebuild a   {@link HdmiHotplugEvent} previously stored with{@link Parcelable#writeToParcel(Parcel,int)}.
 * @param p {@link HdmiHotplugEvent} object to read the Rating from
 * @return a new {@link HdmiHotplugEvent} created from the data in the parcel
 */
public HdmiHotplugEvent createFromParcel(Parcel p){
  int port=p.readInt();
  boolean connected=p.readByte() == 1;
  return new HdmiHotplugEvent(port,connected);
}

Fixed version (ground truth):
/** 
 * Rebuilds a   {@link HdmiHotplugEvent} previously stored with{@link Parcelable#writeToParcel(Parcel,int)}.
 * @param p {@link HdmiHotplugEvent} object to read the Rating from
 * @return a new {@link HdmiHotplugEvent} created from the data in the parcel
 */
@Override public HdmiHotplugEvent createFromParcel(Parcel p){
  int port=p.readInt();
  boolean connected=p.readByte() == 1;
  return new HdmiHotplugEvent(port,connected);
}
Program: 196278
Project: 196278
Buggy source:
/** 
 * Describe the kinds of special objects contained in this Parcelable's marshalled representation.
 */
@Override public int describeContents(){
  return 0;
}

Fixed version (ground truth):
/** 
 * Describes the kinds of special objects contained in this Parcelable's marshalled representation.
 */
@Override public int describeContents(){
  return 0;
}
Program: 196279
Project: 196279
Buggy source:
/** 
 * Flatten this object in to a Parcel.
 * @param dest The Parcel in which the object should be written.
 * @param flags Additional flags about how the object should be written.May be 0 or  {@link Parcelable#PARCELABLE_WRITE_RETURN_VALUE}.
 */
@Override public void writeToParcel(Parcel dest,int flags){
  dest.writeInt(mPort);
  dest.writeByte((byte)(mConnected ? 1 : 0));
}

Fixed version (ground truth):
/** 
 * Flattens this object in to a Parcel.
 * @param dest The Parcel in which the object should be written.
 * @param flags Additional flags about how the object should be written.May be 0 or  {@link Parcelable#PARCELABLE_WRITE_RETURN_VALUE}.
 */
@Override public void writeToParcel(Parcel dest,int flags){
  dest.writeInt(mPort);
  dest.writeByte((byte)(mConnected ? 1 : 0));
}
Program: 196280
Project: 196280
Buggy source:
protected abstract int getDeviceType();

Fixed version (ground truth):
abstract int getDeviceType();
Program: 196281
Project: 196281
Buggy source:
public HdmiClient(IHdmiControlService service){
  mService=service;
}

Fixed version (ground truth):
HdmiClient(IHdmiControlService service){
  mService=service;
}
Program: 196282
Project: 196282
Buggy source:
/** 
 * Send a key event to other logical device.
 * @param keyCode key code to send. Defined in {@link android.view.KeyEvent}.
 * @param isPressed true if this is key press event
 */
public void sendKeyEvent(int keyCode,boolean isPressed){
  try {
    mService.sendKeyEvent(getDeviceType(),keyCode,isPressed);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Sends a key event to other logical device.
 * @param keyCode key code to send. Defined in {@link android.view.KeyEvent}.
 * @param isPressed true if this is key press event
 */
public void sendKeyEvent(int keyCode,boolean isPressed){
  try {
    mService.sendKeyEvent(getDeviceType(),keyCode,isPressed);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 196283
Project: 196283
Buggy source:
/** 
 * Send vendor-specific command.
 * @param targetAddress address of the target device
 * @param params vendor-specific parameter. For &lt;Vendor Command With ID&gt; do notinclude the first 3 bytes (vendor ID).
 * @param hasVendorId {@code true} if the command type will be &lt;Vendor Command With ID&gt;.{@code false} if the command will be &lt;Vendor Command&gt;
 */
public void sendVendorCommand(int targetAddress,byte[] params,boolean hasVendorId){
  try {
    mService.sendVendorCommand(getDeviceType(),targetAddress,params,hasVendorId);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Sends vendor-specific command.
 * @param targetAddress address of the target device
 * @param params vendor-specific parameter. For &lt;Vendor Command With ID&gt; do notinclude the first 3 bytes (vendor ID).
 * @param hasVendorId {@code true} if the command type will be &lt;Vendor Command With ID&gt;.{@code false} if the command will be &lt;Vendor Command&gt;
 */
public void sendVendorCommand(int targetAddress,byte[] params,boolean hasVendorId){
  try {
    mService.sendVendorCommand(getDeviceType(),targetAddress,params,hasVendorId);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 196284
Project: 196284
Buggy source:
/** 
 * @hide - hide this constructor because it has a parameter of typeIHdmiControlService, which is a system private class. The right way to create an instance of this class is using the factory Context.getSystemService.
 */
public HdmiControlManager(IHdmiControlService service){
  mService=service;
  int[] types=null;
  if (mService != null) {
    try {
      types=mService.getSupportedTypes();
    }
 catch (    RemoteException e) {
    }
  }
  mHasTvDevice=hasDeviceType(types,HdmiDeviceInfo.DEVICE_TV);
  mHasPlaybackDevice=hasDeviceType(types,HdmiDeviceInfo.DEVICE_PLAYBACK);
}

Fixed version (ground truth):
/** 
 * {@hide} - hide this constructor because it has a parameter of type IHdmiControlService,which is a system private class. The right way to create an instance of this class is using the factory Context.getSystemService.
 */
public HdmiControlManager(IHdmiControlService service){
  mService=service;
  int[] types=null;
  if (mService != null) {
    try {
      types=mService.getSupportedTypes();
    }
 catch (    RemoteException e) {
    }
  }
  mHasTvDevice=hasDeviceType(types,HdmiDeviceInfo.DEVICE_TV);
  mHasPlaybackDevice=hasDeviceType(types,HdmiDeviceInfo.DEVICE_PLAYBACK);
}
Program: 196285
Project: 196285
Buggy source:
/** 
 * Removes a listener to stop getting informed of   {@link HdmiHotplugEvent}.
 * @param listener {@link HotplugEventListener} instance to be removed
 */
public void removeHotplugEventListener(HotplugEventListener listener){
  if (mService == null) {
    return;
  }
  try {
    mService.removeHotplugEventListener(getHotplugEventListenerWrapper(listener));
  }
 catch (  RemoteException e) {
  }
}

Fixed version (ground truth):
/** 
 * Removes a listener to stop getting informed of   {@link HdmiHotplugEvent}.
 * @param listener {@link HotplugEventListener} instance to be removed
 */
public void removeHotplugEventListener(HotplugEventListener listener){
  if (mService == null) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  IHdmiHotplugEventListener wrappedListener=mHotplugEventListeners.remove(listener);
  if (wrappedListener == null) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  try {
    mService.removeHotplugEventListener(wrappedListener);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 196286
Project: 196286
Buggy source:
/** 
 * Adds a listener to get informed of   {@link HdmiHotplugEvent}. <p>To stop getting the notification, use   {@link #removeHotplugEventListener(HotplugEventListener)}.
 * @param listener {@link HotplugEventListener} instance
 * @see HdmiControlManager#removeHotplugEventListener(HotplugEventListener)
 */
public void addHotplugEventListener(HotplugEventListener listener){
  if (mService == null) {
    return;
  }
  try {
    mService.addHotplugEventListener(getHotplugEventListenerWrapper(listener));
  }
 catch (  RemoteException e) {
  }
}

Fixed version (ground truth):
/** 
 * Adds a listener to get informed of   {@link HdmiHotplugEvent}. <p>To stop getting the notification, use   {@link #removeHotplugEventListener(HotplugEventListener)}.
 * @param listener {@link HotplugEventListener} instance
 * @see HdmiControlManager#removeHotplugEventListener(HotplugEventListener)
 */
public void addHotplugEventListener(HotplugEventListener listener){
  if (mService == null) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  if (mHotplugEventListeners.containsKey(listener)) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  IHdmiHotplugEventListener wrappedListener=getHotplugEventListenerWrapper(listener);
  mHotplugEventListeners.put(listener,wrappedListener);
  try {
    mService.addHotplugEventListener(wrappedListener);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 196287
Project: 196287
Buggy source:
/** 
 * Return the physical address of the device.
 */
public int getPhysicalAddress(){
  return mPhysicalAddress;
}

Fixed version (ground truth):
/** 
 * Returns the physical address of the device.
 */
public int getPhysicalAddress(){
  return mPhysicalAddress;
}
Program: 196288
Project: 196288
Buggy source:
/** 
 * Return the CEC logical address of the device.
 */
public int getLogicalAddress(){
  return mLogicalAddress;
}

Fixed version (ground truth):
/** 
 * Returns the CEC logical address of the device.
 */
public int getLogicalAddress(){
  return mLogicalAddress;
}
Program: 196289
Project: 196289
Buggy source:
/** 
 * Return the id of the device.
 */
public int getId(){
  return mId;
}

Fixed version (ground truth):
/** 
 * Returns the id of the device.
 */
public int getId(){
  return mId;
}
Program: 196290
Project: 196290
Buggy source:
/** 
 * Return device's power status. It should be one of the following values. <ul> <li>  {@link HdmiControlManager#POWER_STATUS_ON}<li>  {@link HdmiControlManager#POWER_STATUS_STANDBY}<li>  {@link HdmiControlManager#POWER_STATUS_TRANSIENT_TO_ON}<li>  {@link HdmiControlManager#POWER_STATUS_TRANSIENT_TO_STANDBY}<li>  {@link HdmiControlManager#POWER_STATUS_UNKNOWN}</ul>
 */
public int getDevicePowerStatus(){
  return mDevicePowerStatus;
}

Fixed version (ground truth):
/** 
 * Returns device's power status. It should be one of the following values. <ul> <li>  {@link HdmiControlManager#POWER_STATUS_ON}<li>  {@link HdmiControlManager#POWER_STATUS_STANDBY}<li>  {@link HdmiControlManager#POWER_STATUS_TRANSIENT_TO_ON}<li>  {@link HdmiControlManager#POWER_STATUS_TRANSIENT_TO_STANDBY}<li>  {@link HdmiControlManager#POWER_STATUS_UNKNOWN}</ul>
 */
public int getDevicePowerStatus(){
  return mDevicePowerStatus;
}
Program: 196291
Project: 196291
Buggy source:
/** 
 * Describe the kinds of special objects contained in this Parcelable's marshalled representation.
 */
@Override public int describeContents(){
  return 0;
}

Fixed version (ground truth):
/** 
 * Describes the kinds of special objects contained in this Parcelable's marshalled representation.
 */
@Override public int describeContents(){
  return 0;
}
Program: 196292
Project: 196292
Buggy source:
/** 
 * Return the id to be used for MHL device.
 * @param portId port which the MHL device is connected to
 * @return id for MHL device
 */
public static int idForMhlDevice(int portId){
  return ID_OFFSET_MHL + portId;
}

Fixed version (ground truth):
/** 
 * Returns the id to be used for MHL device.
 * @param portId port which the MHL device is connected to
 * @return id for MHL device
 */
public static int idForMhlDevice(int portId){
  return ID_OFFSET_MHL + portId;
}
Program: 196293
Project: 196293
Buggy source:
/** 
 * Return   {@code true} if the device represents an HDMI-CEC device. {@code false} if the deviceis either MHL or other device.
 */
public boolean isCecDevice(){
  return mHdmiDeviceType == HDMI_DEVICE_TYPE_CEC;
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if the device represents an HDMI-CEC device. {@code false} if the deviceis either MHL or other device.
 */
public boolean isCecDevice(){
  return mHdmiDeviceType == HDMI_DEVICE_TYPE_CEC;
}
Program: 196294
Project: 196294
Buggy source:
/** 
 * Return MHL device id. Return -1 for non-MHL device.
 */
public int getDeviceId(){
  return mDeviceId;
}

Fixed version (ground truth):
/** 
 * Returns MHL device id. Return -1 for non-MHL device.
 */
public int getDeviceId(){
  return mDeviceId;
}
Program: 196295
Project: 196295
Buggy source:
/** 
 * Return   {@code true} if the device is of a type that can be an input source.
 */
public boolean isSourceType(){
  return mDeviceType == DEVICE_PLAYBACK || mDeviceType == DEVICE_RECORDER || mDeviceType == DEVICE_TUNER;
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if the device is of a type that can be an input source.
 */
public boolean isSourceType(){
  return mDeviceType == DEVICE_PLAYBACK || mDeviceType == DEVICE_RECORDER || mDeviceType == DEVICE_TUNER;
}
Program: 196296
Project: 196296
Buggy source:
/** 
 * Return the port ID.
 */
public int getPortId(){
  return mPortId;
}

Fixed version (ground truth):
/** 
 * Returns the port ID.
 */
public int getPortId(){
  return mPortId;
}
Program: 196297
Project: 196297
Buggy source:
/** 
 * Return display (OSD) name of the device.
 */
public String getDisplayName(){
  return mDisplayName;
}

Fixed version (ground truth):
/** 
 * Returns display (OSD) name of the device.
 */
public String getDisplayName(){
  return mDisplayName;
}
Program: 196298
Project: 196298
Buggy source:
/** 
 * Return CEC type of the device. For more details, refer constants between   {@link #DEVICE_TV}and   {@link #DEVICE_INACTIVE}.
 */
public int getDeviceType(){
  return mDeviceType;
}

Fixed version (ground truth):
/** 
 * Returns CEC type of the device. For more details, refer constants between   {@link #DEVICE_TV}and   {@link #DEVICE_INACTIVE}.
 */
public int getDeviceType(){
  return mDeviceType;
}
Program: 196299
Project: 196299
Buggy source:
/** 
 * Return   {@code true} if the device represents an MHL device. {@code false} if the device iseither CEC or other device.
 */
public boolean isMhlDevice(){
  return mHdmiDeviceType == HDMI_DEVICE_TYPE_MHL;
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if the device represents an MHL device. {@code false} if the device iseither CEC or other device.
 */
public boolean isMhlDevice(){
  return mHdmiDeviceType == HDMI_DEVICE_TYPE_MHL;
}
Program: 196300
Project: 196300
Buggy source:
/** 
 * Return MHL adopter id. Return -1 for non-MHL device.
 */
public int getAdopterId(){
  return mAdopterId;
}

Fixed version (ground truth):
/** 
 * Returns MHL adopter id. Return -1 for non-MHL device.
 */
public int getAdopterId(){
  return mAdopterId;
}
Program: 196301
Project: 196301
Buggy source:
/** 
 * Return the id to be used for hardware port.
 * @param portId port id
 * @return id for hardware port
 */
public static int idForHardware(int portId){
  return ID_OFFSET_HARDWARE + portId;
}

Fixed version (ground truth):
/** 
 * Returns the id to be used for hardware port.
 * @param portId port id
 * @return id for hardware port
 */
public static int idForHardware(int portId){
  return ID_OFFSET_HARDWARE + portId;
}
Program: 196302
Project: 196302
Buggy source:
/** 
 * Return the id to be used for CEC device.
 * @param address logical address of CEC device
 * @return id for CEC device
 */
public static int idForCecDevice(int address){
  return ID_OFFSET_CEC + address;
}

Fixed version (ground truth):
/** 
 * Returns the id to be used for CEC device.
 * @param address logical address of CEC device
 * @return id for CEC device
 */
public static int idForCecDevice(int address){
  return ID_OFFSET_CEC + address;
}
Program: 196303
Project: 196303
Buggy source:
/** 
 * Return vendor id of the device. Vendor id is used to distinguish devices built by other manufactures. This is required for vendor-specific command on CEC standard.
 */
public int getVendorId(){
  return mVendorId;
}

Fixed version (ground truth):
/** 
 * Returns vendor id of the device. Vendor id is used to distinguish devices built by other manufactures. This is required for vendor-specific command on CEC standard.
 */
public int getVendorId(){
  return mVendorId;
}
Program: 196304
Project: 196304
Buggy source:
/** 
 * Serialize this object into a   {@link Parcel}.
 * @param dest The Parcel in which the object should be written.
 * @param flags Additional flags about how the object should be written. May be 0 or{@link Parcelable#PARCELABLE_WRITE_RETURN_VALUE}.
 */
@Override public void writeToParcel(Parcel dest,int flags){
  dest.writeInt(mHdmiDeviceType);
  dest.writeInt(mPhysicalAddress);
  dest.writeInt(mPortId);
switch (mHdmiDeviceType) {
case HDMI_DEVICE_TYPE_CEC:
    dest.writeInt(mLogicalAddress);
  dest.writeInt(mDeviceType);
dest.writeInt(mVendorId);
dest.writeInt(mDevicePowerStatus);
dest.writeString(mDisplayName);
break;
case HDMI_DEVICE_TYPE_MHL:
dest.writeInt(mDeviceId);
dest.writeInt(mAdopterId);
break;
default :
}
}

Fixed version (ground truth):
/** 
 * Serializes this object into a   {@link Parcel}.
 * @param dest The Parcel in which the object should be written.
 * @param flags Additional flags about how the object should be written. May be 0 or{@link Parcelable#PARCELABLE_WRITE_RETURN_VALUE}.
 */
@Override public void writeToParcel(Parcel dest,int flags){
  dest.writeInt(mHdmiDeviceType);
  dest.writeInt(mPhysicalAddress);
  dest.writeInt(mPortId);
switch (mHdmiDeviceType) {
case HDMI_DEVICE_TYPE_CEC:
    dest.writeInt(mLogicalAddress);
  dest.writeInt(mDeviceType);
dest.writeInt(mVendorId);
dest.writeInt(mDevicePowerStatus);
dest.writeString(mDisplayName);
break;
case HDMI_DEVICE_TYPE_MHL:
dest.writeInt(mDeviceId);
dest.writeInt(mAdopterId);
break;
default :
}
}
Program: 196305
Project: 196305
Buggy source:
/** 
 * Return the port number for which the event occurred.
 * @return port number
 */
public int getPort(){
  return mPort;
}

Fixed version (ground truth):
/** 
 * Returns the port number for which the event occurred.
 * @return port number
 */
public int getPort(){
  return mPort;
}
Program: 196306
Project: 196306
Buggy source:
/** 
 * Return the connection status associated with this event
 * @return true if the device gets connected; otherwise false
 */
public boolean isConnected(){
  return mConnected;
}

Fixed version (ground truth):
/** 
 * Returns the connection status associated with this event
 * @return true if the device gets connected; otherwise false
 */
public boolean isConnected(){
  return mConnected;
}
Program: 196307
Project: 196307
Buggy source:
public HdmiHotplugEvent[] newArray(int size){
  return new HdmiHotplugEvent[size];
}

Fixed version (ground truth):
@Override public HdmiHotplugEvent[] newArray(int size){
  return new HdmiHotplugEvent[size];
}
Program: 196308
Project: 196308
Buggy source:
/** 
 * Rebuild a   {@link HdmiHotplugEvent} previously stored with{@link Parcelable#writeToParcel(Parcel,int)}.
 * @param p {@link HdmiHotplugEvent} object to read the Rating from
 * @return a new {@link HdmiHotplugEvent} created from the data in the parcel
 */
public HdmiHotplugEvent createFromParcel(Parcel p){
  int port=p.readInt();
  boolean connected=p.readByte() == 1;
  return new HdmiHotplugEvent(port,connected);
}

Fixed version (ground truth):
/** 
 * Rebuilds a   {@link HdmiHotplugEvent} previously stored with{@link Parcelable#writeToParcel(Parcel,int)}.
 * @param p {@link HdmiHotplugEvent} object to read the Rating from
 * @return a new {@link HdmiHotplugEvent} created from the data in the parcel
 */
@Override public HdmiHotplugEvent createFromParcel(Parcel p){
  int port=p.readInt();
  boolean connected=p.readByte() == 1;
  return new HdmiHotplugEvent(port,connected);
}
Program: 196309
Project: 196309
Buggy source:
/** 
 * Describe the kinds of special objects contained in this Parcelable's marshalled representation.
 */
@Override public int describeContents(){
  return 0;
}

Fixed version (ground truth):
/** 
 * Describes the kinds of special objects contained in this Parcelable's marshalled representation.
 */
@Override public int describeContents(){
  return 0;
}
Program: 196310
Project: 196310
Buggy source:
/** 
 * Flatten this object in to a Parcel.
 * @param dest The Parcel in which the object should be written.
 * @param flags Additional flags about how the object should be written.May be 0 or  {@link Parcelable#PARCELABLE_WRITE_RETURN_VALUE}.
 */
@Override public void writeToParcel(Parcel dest,int flags){
  dest.writeInt(mPort);
  dest.writeByte((byte)(mConnected ? 1 : 0));
}

Fixed version (ground truth):
/** 
 * Flattens this object in to a Parcel.
 * @param dest The Parcel in which the object should be written.
 * @param flags Additional flags about how the object should be written.May be 0 or  {@link Parcelable#PARCELABLE_WRITE_RETURN_VALUE}.
 */
@Override public void writeToParcel(Parcel dest,int flags){
  dest.writeInt(mPort);
  dest.writeByte((byte)(mConnected ? 1 : 0));
}
Program: 196311
Project: 196311
Buggy source:
protected abstract int getDeviceType();

Fixed version (ground truth):
abstract int getDeviceType();
Program: 196312
Project: 196312
Buggy source:
public HdmiClient(IHdmiControlService service){
  mService=service;
}

Fixed version (ground truth):
HdmiClient(IHdmiControlService service){
  mService=service;
}
Program: 196313
Project: 196313
Buggy source:
/** 
 * Send a key event to other logical device.
 * @param keyCode key code to send. Defined in {@link android.view.KeyEvent}.
 * @param isPressed true if this is key press event
 */
public void sendKeyEvent(int keyCode,boolean isPressed){
  try {
    mService.sendKeyEvent(getDeviceType(),keyCode,isPressed);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Sends a key event to other logical device.
 * @param keyCode key code to send. Defined in {@link android.view.KeyEvent}.
 * @param isPressed true if this is key press event
 */
public void sendKeyEvent(int keyCode,boolean isPressed){
  try {
    mService.sendKeyEvent(getDeviceType(),keyCode,isPressed);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 196314
Project: 196314
Buggy source:
/** 
 * Send vendor-specific command.
 * @param targetAddress address of the target device
 * @param params vendor-specific parameter. For &lt;Vendor Command With ID&gt; do notinclude the first 3 bytes (vendor ID).
 * @param hasVendorId {@code true} if the command type will be &lt;Vendor Command With ID&gt;.{@code false} if the command will be &lt;Vendor Command&gt;
 */
public void sendVendorCommand(int targetAddress,byte[] params,boolean hasVendorId){
  try {
    mService.sendVendorCommand(getDeviceType(),targetAddress,params,hasVendorId);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Sends vendor-specific command.
 * @param targetAddress address of the target device
 * @param params vendor-specific parameter. For &lt;Vendor Command With ID&gt; do notinclude the first 3 bytes (vendor ID).
 * @param hasVendorId {@code true} if the command type will be &lt;Vendor Command With ID&gt;.{@code false} if the command will be &lt;Vendor Command&gt;
 */
public void sendVendorCommand(int targetAddress,byte[] params,boolean hasVendorId){
  try {
    mService.sendVendorCommand(getDeviceType(),targetAddress,params,hasVendorId);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 196315
Project: 196315
Buggy source:
/** 
 * @hide - hide this constructor because it has a parameter of typeIHdmiControlService, which is a system private class. The right way to create an instance of this class is using the factory Context.getSystemService.
 */
public HdmiControlManager(IHdmiControlService service){
  mService=service;
  int[] types=null;
  if (mService != null) {
    try {
      types=mService.getSupportedTypes();
    }
 catch (    RemoteException e) {
    }
  }
  mHasTvDevice=hasDeviceType(types,HdmiDeviceInfo.DEVICE_TV);
  mHasPlaybackDevice=hasDeviceType(types,HdmiDeviceInfo.DEVICE_PLAYBACK);
}

Fixed version (ground truth):
/** 
 * {@hide} - hide this constructor because it has a parameter of type IHdmiControlService,which is a system private class. The right way to create an instance of this class is using the factory Context.getSystemService.
 */
public HdmiControlManager(IHdmiControlService service){
  mService=service;
  int[] types=null;
  if (mService != null) {
    try {
      types=mService.getSupportedTypes();
    }
 catch (    RemoteException e) {
    }
  }
  mHasTvDevice=hasDeviceType(types,HdmiDeviceInfo.DEVICE_TV);
  mHasPlaybackDevice=hasDeviceType(types,HdmiDeviceInfo.DEVICE_PLAYBACK);
}
Program: 196316
Project: 196316
Buggy source:
/** 
 * Removes a listener to stop getting informed of   {@link HdmiHotplugEvent}.
 * @param listener {@link HotplugEventListener} instance to be removed
 */
public void removeHotplugEventListener(HotplugEventListener listener){
  if (mService == null) {
    return;
  }
  try {
    mService.removeHotplugEventListener(getHotplugEventListenerWrapper(listener));
  }
 catch (  RemoteException e) {
  }
}

Fixed version (ground truth):
/** 
 * Removes a listener to stop getting informed of   {@link HdmiHotplugEvent}.
 * @param listener {@link HotplugEventListener} instance to be removed
 */
public void removeHotplugEventListener(HotplugEventListener listener){
  if (mService == null) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  IHdmiHotplugEventListener wrappedListener=mHotplugEventListeners.remove(listener);
  if (wrappedListener == null) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  try {
    mService.removeHotplugEventListener(wrappedListener);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 196317
Project: 196317
Buggy source:
/** 
 * Adds a listener to get informed of   {@link HdmiHotplugEvent}. <p>To stop getting the notification, use   {@link #removeHotplugEventListener(HotplugEventListener)}.
 * @param listener {@link HotplugEventListener} instance
 * @see HdmiControlManager#removeHotplugEventListener(HotplugEventListener)
 */
public void addHotplugEventListener(HotplugEventListener listener){
  if (mService == null) {
    return;
  }
  try {
    mService.addHotplugEventListener(getHotplugEventListenerWrapper(listener));
  }
 catch (  RemoteException e) {
  }
}

Fixed version (ground truth):
/** 
 * Adds a listener to get informed of   {@link HdmiHotplugEvent}. <p>To stop getting the notification, use   {@link #removeHotplugEventListener(HotplugEventListener)}.
 * @param listener {@link HotplugEventListener} instance
 * @see HdmiControlManager#removeHotplugEventListener(HotplugEventListener)
 */
public void addHotplugEventListener(HotplugEventListener listener){
  if (mService == null) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  if (mHotplugEventListeners.containsKey(listener)) {
    Log.e(TAG,"String_Node_Str");
    return;
  }
  IHdmiHotplugEventListener wrappedListener=getHotplugEventListenerWrapper(listener);
  mHotplugEventListeners.put(listener,wrappedListener);
  try {
    mService.addHotplugEventListener(wrappedListener);
  }
 catch (  RemoteException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 196318
Project: 196318
Buggy source:
/** 
 * Return the physical address of the device.
 */
public int getPhysicalAddress(){
  return mPhysicalAddress;
}

Fixed version (ground truth):
/** 
 * Returns the physical address of the device.
 */
public int getPhysicalAddress(){
  return mPhysicalAddress;
}
Program: 196319
Project: 196319
Buggy source:
/** 
 * Return the CEC logical address of the device.
 */
public int getLogicalAddress(){
  return mLogicalAddress;
}

Fixed version (ground truth):
/** 
 * Returns the CEC logical address of the device.
 */
public int getLogicalAddress(){
  return mLogicalAddress;
}
Program: 196320
Project: 196320
Buggy source:
/** 
 * Return the id of the device.
 */
public int getId(){
  return mId;
}

Fixed version (ground truth):
/** 
 * Returns the id of the device.
 */
public int getId(){
  return mId;
}
Program: 196321
Project: 196321
Buggy source:
/** 
 * Return device's power status. It should be one of the following values. <ul> <li>  {@link HdmiControlManager#POWER_STATUS_ON}<li>  {@link HdmiControlManager#POWER_STATUS_STANDBY}<li>  {@link HdmiControlManager#POWER_STATUS_TRANSIENT_TO_ON}<li>  {@link HdmiControlManager#POWER_STATUS_TRANSIENT_TO_STANDBY}<li>  {@link HdmiControlManager#POWER_STATUS_UNKNOWN}</ul>
 */
public int getDevicePowerStatus(){
  return mDevicePowerStatus;
}

Fixed version (ground truth):
/** 
 * Returns device's power status. It should be one of the following values. <ul> <li>  {@link HdmiControlManager#POWER_STATUS_ON}<li>  {@link HdmiControlManager#POWER_STATUS_STANDBY}<li>  {@link HdmiControlManager#POWER_STATUS_TRANSIENT_TO_ON}<li>  {@link HdmiControlManager#POWER_STATUS_TRANSIENT_TO_STANDBY}<li>  {@link HdmiControlManager#POWER_STATUS_UNKNOWN}</ul>
 */
public int getDevicePowerStatus(){
  return mDevicePowerStatus;
}
Program: 196322
Project: 196322
Buggy source:
/** 
 * Describe the kinds of special objects contained in this Parcelable's marshalled representation.
 */
@Override public int describeContents(){
  return 0;
}

Fixed version (ground truth):
/** 
 * Describes the kinds of special objects contained in this Parcelable's marshalled representation.
 */
@Override public int describeContents(){
  return 0;
}
Program: 196323
Project: 196323
Buggy source:
/** 
 * Return the id to be used for MHL device.
 * @param portId port which the MHL device is connected to
 * @return id for MHL device
 */
public static int idForMhlDevice(int portId){
  return ID_OFFSET_MHL + portId;
}

Fixed version (ground truth):
/** 
 * Returns the id to be used for MHL device.
 * @param portId port which the MHL device is connected to
 * @return id for MHL device
 */
public static int idForMhlDevice(int portId){
  return ID_OFFSET_MHL + portId;
}
Program: 196324
Project: 196324
Buggy source:
/** 
 * Return   {@code true} if the device represents an HDMI-CEC device. {@code false} if the deviceis either MHL or other device.
 */
public boolean isCecDevice(){
  return mHdmiDeviceType == HDMI_DEVICE_TYPE_CEC;
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if the device represents an HDMI-CEC device. {@code false} if the deviceis either MHL or other device.
 */
public boolean isCecDevice(){
  return mHdmiDeviceType == HDMI_DEVICE_TYPE_CEC;
}
Program: 196325
Project: 196325
Buggy source:
/** 
 * Return MHL device id. Return -1 for non-MHL device.
 */
public int getDeviceId(){
  return mDeviceId;
}

Fixed version (ground truth):
/** 
 * Returns MHL device id. Return -1 for non-MHL device.
 */
public int getDeviceId(){
  return mDeviceId;
}
Program: 196326
Project: 196326
Buggy source:
/** 
 * Return   {@code true} if the device is of a type that can be an input source.
 */
public boolean isSourceType(){
  return mDeviceType == DEVICE_PLAYBACK || mDeviceType == DEVICE_RECORDER || mDeviceType == DEVICE_TUNER;
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if the device is of a type that can be an input source.
 */
public boolean isSourceType(){
  return mDeviceType == DEVICE_PLAYBACK || mDeviceType == DEVICE_RECORDER || mDeviceType == DEVICE_TUNER;
}
Program: 196327
Project: 196327
Buggy source:
/** 
 * Return the port ID.
 */
public int getPortId(){
  return mPortId;
}

Fixed version (ground truth):
/** 
 * Returns the port ID.
 */
public int getPortId(){
  return mPortId;
}
Program: 196328
Project: 196328
Buggy source:
/** 
 * Return display (OSD) name of the device.
 */
public String getDisplayName(){
  return mDisplayName;
}

Fixed version (ground truth):
/** 
 * Returns display (OSD) name of the device.
 */
public String getDisplayName(){
  return mDisplayName;
}
Program: 196329
Project: 196329
Buggy source:
/** 
 * Return CEC type of the device. For more details, refer constants between   {@link #DEVICE_TV}and   {@link #DEVICE_INACTIVE}.
 */
public int getDeviceType(){
  return mDeviceType;
}

Fixed version (ground truth):
/** 
 * Returns CEC type of the device. For more details, refer constants between   {@link #DEVICE_TV}and   {@link #DEVICE_INACTIVE}.
 */
public int getDeviceType(){
  return mDeviceType;
}
Program: 196330
Project: 196330
Buggy source:
/** 
 * Return   {@code true} if the device represents an MHL device. {@code false} if the device iseither CEC or other device.
 */
public boolean isMhlDevice(){
  return mHdmiDeviceType == HDMI_DEVICE_TYPE_MHL;
}

Fixed version (ground truth):
/** 
 * Returns   {@code true} if the device represents an MHL device. {@code false} if the device iseither CEC or other device.
 */
public boolean isMhlDevice(){
  return mHdmiDeviceType == HDMI_DEVICE_TYPE_MHL;
}
Program: 196331
Project: 196331
Buggy source:
/** 
 * Return MHL adopter id. Return -1 for non-MHL device.
 */
public int getAdopterId(){
  return mAdopterId;
}

Fixed version (ground truth):
/** 
 * Returns MHL adopter id. Return -1 for non-MHL device.
 */
public int getAdopterId(){
  return mAdopterId;
}
Program: 196332
Project: 196332
Buggy source:
/** 
 * Return the id to be used for hardware port.
 * @param portId port id
 * @return id for hardware port
 */
public static int idForHardware(int portId){
  return ID_OFFSET_HARDWARE + portId;
}

Fixed version (ground truth):
/** 
 * Returns the id to be used for hardware port.
 * @param portId port id
 * @return id for hardware port
 */
public static int idForHardware(int portId){
  return ID_OFFSET_HARDWARE + portId;
}
Program: 196333
Project: 196333
Buggy source:
/** 
 * Return the id to be used for CEC device.
 * @param address logical address of CEC device
 * @return id for CEC device
 */
public static int idForCecDevice(int address){
  return ID_OFFSET_CEC + address;
}

Fixed version (ground truth):
/** 
 * Returns the id to be used for CEC device.
 * @param address logical address of CEC device
 * @return id for CEC device
 */
public static int idForCecDevice(int address){
  return ID_OFFSET_CEC + address;
}