nus-yam/ex-repair huggingface dataset:
Program: 198727
Project: 198727
Buggy source:
@Override protected void handleSecondaryClick(){
  if (!mState.value) {
    mController.setBluetoothEnabled(true);
  }
  showDetail(true);
}

Fixed version (ground truth):
@Override protected void handleSecondaryClick(){
  showDetail(true);
}
Program: 198728
Project: 198728
Buggy source:
void finishUserStop(UserStartedState uss){
  final int userId=uss.mHandle.getIdentifier();
  boolean stopped;
  ArrayList<IStopUserCallback> callbacks;
synchronized (this) {
    callbacks=new ArrayList<IStopUserCallback>(uss.mStopCallbacks);
    if (mStartedUsers.get(userId) != uss) {
      stopped=false;
    }
 else     if (uss.mState != UserStartedState.STATE_SHUTDOWN) {
      stopped=false;
    }
 else {
      stopped=true;
      mStartedUsers.remove(userId);
      mUserLru.remove(Integer.valueOf(userId));
      updateStartedUserArrayLocked();
      forceStopUserLocked(userId,"String_Node_Str");
    }
  }
  for (int i=0; i < callbacks.size(); i++) {
    try {
      if (stopped)       callbacks.get(i).userStopped(userId);
 else       callbacks.get(i).userStopAborted(userId);
    }
 catch (    RemoteException e) {
    }
  }
  mStackSupervisor.removeUserLocked(userId);
}

Fixed version (ground truth):
void finishUserStop(UserStartedState uss){
  final int userId=uss.mHandle.getIdentifier();
  boolean stopped;
  ArrayList<IStopUserCallback> callbacks;
synchronized (this) {
    callbacks=new ArrayList<IStopUserCallback>(uss.mStopCallbacks);
    if (mStartedUsers.get(userId) != uss) {
      stopped=false;
    }
 else     if (uss.mState != UserStartedState.STATE_SHUTDOWN) {
      stopped=false;
    }
 else {
      stopped=true;
      mStartedUsers.remove(userId);
      mUserLru.remove(Integer.valueOf(userId));
      updateStartedUserArrayLocked();
      forceStopUserLocked(userId,"String_Node_Str");
    }
    removeRecentTaskLocked(userId);
  }
  for (int i=0; i < callbacks.size(); i++) {
    try {
      if (stopped)       callbacks.get(i).userStopped(userId);
 else       callbacks.get(i).userStopAborted(userId);
    }
 catch (    RemoteException e) {
    }
  }
  mStackSupervisor.removeUserLocked(userId);
}
Program: 198730
Project: 198730
Buggy source:
/** 
 * Generate capture result metadata from the legacy camera request. <p>This method caches and reuses the result from the previous call to this method if the   {@code parameters} of the subsequent {@link LegacyRequest} passed to this methodhave not changed.</p>
 * @param legacyRequest a non-{@code null} legacy request containing the latest parameters
 * @param timestamp the timestamp to use for this result in nanoseconds.
 * @return {@link CameraMetadataNative} object containing result metadata.
 */
public CameraMetadataNative cachedConvertResultMetadata(LegacyRequest legacyRequest,long timestamp){
  if (mCachedRequest != null && legacyRequest.parameters.same(mCachedRequest.parameters)) {
    CameraMetadataNative newResult=new CameraMetadataNative(mCachedResult);
    newResult.set(CaptureResult.SENSOR_TIMESTAMP,timestamp);
    return newResult;
  }
  mCachedRequest=legacyRequest;
  mCachedResult=convertResultMetadata(mCachedRequest,timestamp);
  return mCachedResult;
}

Fixed version (ground truth):
/** 
 * Generate capture result metadata from the legacy camera request. <p>This method caches and reuses the result from the previous call to this method if the   {@code parameters} of the subsequent {@link LegacyRequest} passed to this methodhave not changed.</p>
 * @param legacyRequest a non-{@code null} legacy request containing the latest parameters
 * @param timestamp the timestamp to use for this result in nanoseconds.
 * @param frameCounter a monotonically increasing frame counter for the result
 * @return {@link CameraMetadataNative} object containing result metadata.
 */
public CameraMetadataNative cachedConvertResultMetadata(LegacyRequest legacyRequest,long timestamp,long frameCounter){
  CameraMetadataNative result;
  boolean cached;
  if (mCachedRequest != null && legacyRequest.parameters.same(mCachedRequest.parameters)) {
    result=new CameraMetadataNative(mCachedResult);
    cached=true;
  }
 else {
    result=convertResultMetadata(legacyRequest,timestamp);
    cached=false;
    mCachedRequest=legacyRequest;
    mCachedResult=new CameraMetadataNative(result);
  }
{
    result.set(REQUEST_FRAME_COUNT,(int)frameCounter);
    result.set(SENSOR_TIMESTAMP,timestamp);
  }
  if (VERBOSE) {
    Log.v(TAG,"String_Node_Str" + cached + "String_Node_Str"+ frameCounter+ "String_Node_Str"+ timestamp);
    Log.v(TAG,"String_Node_Str");
    result.dumpToLog();
    Log.v(TAG,"String_Node_Str");
  }
  return result;
}
Program: 198733
Project: 198733
Buggy source:
void finishUserStop(UserStartedState uss){
  final int userId=uss.mHandle.getIdentifier();
  boolean stopped;
  ArrayList<IStopUserCallback> callbacks;
synchronized (this) {
    callbacks=new ArrayList<IStopUserCallback>(uss.mStopCallbacks);
    if (mStartedUsers.get(userId) != uss) {
      stopped=false;
    }
 else     if (uss.mState != UserStartedState.STATE_SHUTDOWN) {
      stopped=false;
    }
 else {
      stopped=true;
      mStartedUsers.remove(userId);
      mUserLru.remove(Integer.valueOf(userId));
      updateStartedUserArrayLocked();
      forceStopUserLocked(userId,"String_Node_Str");
    }
  }
  for (int i=0; i < callbacks.size(); i++) {
    try {
      if (stopped)       callbacks.get(i).userStopped(userId);
 else       callbacks.get(i).userStopAborted(userId);
    }
 catch (    RemoteException e) {
    }
  }
  mStackSupervisor.removeUserLocked(userId);
}

Fixed version (ground truth):
void finishUserStop(UserStartedState uss){
  final int userId=uss.mHandle.getIdentifier();
  boolean stopped;
  ArrayList<IStopUserCallback> callbacks;
synchronized (this) {
    callbacks=new ArrayList<IStopUserCallback>(uss.mStopCallbacks);
    if (mStartedUsers.get(userId) != uss) {
      stopped=false;
    }
 else     if (uss.mState != UserStartedState.STATE_SHUTDOWN) {
      stopped=false;
    }
 else {
      stopped=true;
      mStartedUsers.remove(userId);
      mUserLru.remove(Integer.valueOf(userId));
      updateStartedUserArrayLocked();
      forceStopUserLocked(userId,"String_Node_Str");
    }
    removeRecentTaskLocked(userId);
  }
  for (int i=0; i < callbacks.size(); i++) {
    try {
      if (stopped)       callbacks.get(i).userStopped(userId);
 else       callbacks.get(i).userStopAborted(userId);
    }
 catch (    RemoteException e) {
    }
  }
  mStackSupervisor.removeUserLocked(userId);
}
Program: 198734
Project: 198734
Buggy source:
/** 
 * Retrieve the Drawable for the attribute at <var>index</var>.
 * @param index Index of attribute to retrieve.
 * @return Drawable for the attribute, or null if not defined.
 */
public Drawable getDrawable(int index){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  final TypedValue value=mValue;
  if (getValueAt(index * AssetManager.STYLE_NUM_ENTRIES,value)) {
    if (value.type == TypedValue.TYPE_ATTRIBUTE) {
      throw new RuntimeException("String_Node_Str" + index);
    }
    return mResources.loadDrawable(value,value.resourceId,mTheme);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Retrieve the Drawable for the attribute at <var>index</var>.  This gets the resource ID of the selected attribute, and uses  {@link Resources#getDrawable Resources.getDrawable} of the owningResources object to retrieve its Drawable.
 * @param index Index of attribute to retrieve.
 * @return Drawable for the attribute, or null if not defined.
 */
public Drawable getDrawable(int index){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  final TypedValue value=mValue;
  if (getValueAt(index * AssetManager.STYLE_NUM_ENTRIES,value)) {
    if (value.type == TypedValue.TYPE_ATTRIBUTE) {
      throw new RuntimeException("String_Node_Str" + index);
    }
    return mResources.loadDrawable(value,value.resourceId,mTheme);
  }
  return null;
}
Program: 198735
Project: 198735
Buggy source:
/** 
 * Retrieve the Drawable for the attribute at <var>index</var>.  This gets the resource ID of the selected attribute, and uses  {@link Resources#getDrawable Resources.getDrawable} of the owningResources object to retrieve its Drawable.
 * @param index Index of attribute to retrieve.
 * @return Drawable for the attribute, or null if not defined.
 */
public Drawable getDrawable(int index){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  final TypedValue value=mValue;
  if (getValueAt(index * AssetManager.STYLE_NUM_ENTRIES,value)) {
    if (false) {
      System.out.println("String_Node_Str");
      System.out.println("String_Node_Str" + value.type + "String_Node_Str"+ value.string+ "String_Node_Str"+ Integer.toHexString(value.data)+ "String_Node_Str"+ value.assetCookie);
      System.out.println("String_Node_Str");
    }
    return mResources.loadDrawable(value,value.resourceId,mTheme);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Retrieve the Drawable for the attribute at <var>index</var>.
 * @param index Index of attribute to retrieve.
 * @return Drawable for the attribute, or null if not defined.
 */
public Drawable getDrawable(int index){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  final TypedValue value=mValue;
  if (getValueAt(index * AssetManager.STYLE_NUM_ENTRIES,value)) {
    if (value.type == TypedValue.TYPE_ATTRIBUTE) {
      throw new RuntimeException("String_Node_Str" + index);
    }
    return mResources.loadDrawable(value,value.resourceId,mTheme);
  }
  return null;
}
Program: 198736
Project: 198736
Buggy source:
/** 
 * Retrieve a dimensional unit attribute at <var>index</var> for use as an offset in raw pixels.  This is the same as  {@link #getDimension}, except the returned value is converted to integer pixels for you.  An offset conversion involves simply truncating the base value to an integer.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute dimension value multiplied by the appropriatemetric and truncated to integer pixels, or defValue if not defined.
 * @see #getDimension
 * @see #getDimensionPixelSize
 */
public int getDimensionPixelOffset(int index,int defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type == TypedValue.TYPE_DIMENSION) {
    return TypedValue.complexToDimensionPixelOffset(data[index + AssetManager.STYLE_DATA],mMetrics);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}

Fixed version (ground truth):
/** 
 * Retrieve a dimensional unit attribute at <var>index</var> for use as an offset in raw pixels.  This is the same as  {@link #getDimension}, except the returned value is converted to integer pixels for you.  An offset conversion involves simply truncating the base value to an integer.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute dimension value multiplied by the appropriatemetric and truncated to integer pixels, or defValue if not defined.
 * @see #getDimension
 * @see #getDimensionPixelSize
 */
public int getDimensionPixelOffset(int index,int defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type == TypedValue.TYPE_DIMENSION) {
    return TypedValue.complexToDimensionPixelOffset(data[index + AssetManager.STYLE_DATA],mMetrics);
  }
 else   if (type == TypedValue.TYPE_ATTRIBUTE) {
    throw new RuntimeException("String_Node_Str" + index);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}
Program: 198737
Project: 198737
Buggy source:
/** 
 * Retrieve the integer value for the attribute at <var>index</var>.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute integer value, or defValue if not defined.
 */
public int getInteger(int index,int defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type >= TypedValue.TYPE_FIRST_INT && type <= TypedValue.TYPE_LAST_INT) {
    return data[index + AssetManager.STYLE_DATA];
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}

Fixed version (ground truth):
/** 
 * Retrieve the integer value for the attribute at <var>index</var>.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute integer value, or defValue if not defined.
 */
public int getInteger(int index,int defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type >= TypedValue.TYPE_FIRST_INT && type <= TypedValue.TYPE_LAST_INT) {
    return data[index + AssetManager.STYLE_DATA];
  }
 else   if (type == TypedValue.TYPE_ATTRIBUTE) {
    throw new RuntimeException("String_Node_Str" + index);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}
Program: 198738
Project: 198738
Buggy source:
/** 
 * Retrieve a dimensional unit attribute at <var>index</var>.  Unit conversions are based on the current   {@link DisplayMetrics}associated with the resources this   {@link TypedArray} objectcame from.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute dimension value multiplied by the appropriatemetric, or defValue if not defined.
 * @see #getDimensionPixelOffset
 * @see #getDimensionPixelSize
 */
public float getDimension(int index,float defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type == TypedValue.TYPE_DIMENSION) {
    return TypedValue.complexToDimension(data[index + AssetManager.STYLE_DATA],mMetrics);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}

Fixed version (ground truth):
/** 
 * Retrieve a dimensional unit attribute at <var>index</var>.  Unit conversions are based on the current   {@link DisplayMetrics}associated with the resources this   {@link TypedArray} objectcame from.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute dimension value multiplied by the appropriatemetric, or defValue if not defined.
 * @see #getDimensionPixelOffset
 * @see #getDimensionPixelSize
 */
public float getDimension(int index,float defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type == TypedValue.TYPE_DIMENSION) {
    return TypedValue.complexToDimension(data[index + AssetManager.STYLE_DATA],mMetrics);
  }
 else   if (type == TypedValue.TYPE_ATTRIBUTE) {
    throw new RuntimeException("String_Node_Str" + index);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}
Program: 198739
Project: 198739
Buggy source:
/** 
 * Retrieve the CharSequence[] for the attribute at <var>index</var>. This gets the resource ID of the selected attribute, and uses  {@link Resources#getTextArray Resources.getTextArray} of the owningResources object to retrieve its String[].
 * @param index Index of attribute to retrieve.
 * @return CharSequence[] for the attribute, or null if not defined.
 */
public CharSequence[] getTextArray(int index){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  final TypedValue value=mValue;
  if (getValueAt(index * AssetManager.STYLE_NUM_ENTRIES,value)) {
    if (false) {
      System.out.println("String_Node_Str");
      System.out.println("String_Node_Str" + value.type + "String_Node_Str"+ value.string+ "String_Node_Str"+ Integer.toHexString(value.data)+ "String_Node_Str"+ value.assetCookie);
      System.out.println("String_Node_Str");
    }
    return mResources.getTextArray(value.resourceId);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Retrieve the CharSequence[] for the attribute at <var>index</var>. This gets the resource ID of the selected attribute, and uses  {@link Resources#getTextArray Resources.getTextArray} of the owningResources object to retrieve its String[].
 * @param index Index of attribute to retrieve.
 * @return CharSequence[] for the attribute, or null if not defined.
 */
public CharSequence[] getTextArray(int index){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  final TypedValue value=mValue;
  if (getValueAt(index * AssetManager.STYLE_NUM_ENTRIES,value)) {
    return mResources.getTextArray(value.resourceId);
  }
  return null;
}
Program: 198740
Project: 198740
Buggy source:
/** 
 * Retrieve a dimensional unit attribute at <var>index</var> for use as a size in raw pixels.  This is the same as  {@link #getDimension}, except the returned value is converted to integer pixels for use as a size.  A size conversion involves rounding the base value, and ensuring that a non-zero base value is at least one pixel in size.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute dimension value multiplied by the appropriatemetric and truncated to integer pixels, or defValue if not defined.
 * @see #getDimension
 * @see #getDimensionPixelOffset
 */
public int getDimensionPixelSize(int index,int defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type == TypedValue.TYPE_DIMENSION) {
    return TypedValue.complexToDimensionPixelSize(data[index + AssetManager.STYLE_DATA],mMetrics);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}

Fixed version (ground truth):
/** 
 * Retrieve a dimensional unit attribute at <var>index</var> for use as a size in raw pixels.  This is the same as  {@link #getDimension}, except the returned value is converted to integer pixels for use as a size.  A size conversion involves rounding the base value, and ensuring that a non-zero base value is at least one pixel in size.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute dimension value multiplied by the appropriatemetric and truncated to integer pixels, or defValue if not defined.
 * @see #getDimension
 * @see #getDimensionPixelOffset
 */
public int getDimensionPixelSize(int index,int defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type == TypedValue.TYPE_DIMENSION) {
    return TypedValue.complexToDimensionPixelSize(data[index + AssetManager.STYLE_DATA],mMetrics);
  }
 else   if (type == TypedValue.TYPE_ATTRIBUTE) {
    throw new RuntimeException("String_Node_Str" + index);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}
Program: 198741
Project: 198741
Buggy source:
/** 
 * Retrieve the color value for the attribute at <var>index</var>.  If the attribute references a color resource holding a complex  {@link android.content.res.ColorStateList}, then the default color from the set is returned.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute color value, or defValue if not defined.
 */
public int getColor(int index,int defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type >= TypedValue.TYPE_FIRST_INT && type <= TypedValue.TYPE_LAST_INT) {
    return data[index + AssetManager.STYLE_DATA];
  }
 else   if (type == TypedValue.TYPE_STRING) {
    final TypedValue value=mValue;
    if (getValueAt(index,value)) {
      ColorStateList csl=mResources.loadColorStateList(value,value.resourceId);
      return csl.getDefaultColor();
    }
    return defValue;
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}

Fixed version (ground truth):
/** 
 * Retrieve the color value for the attribute at <var>index</var>.  If the attribute references a color resource holding a complex  {@link android.content.res.ColorStateList}, then the default color from the set is returned.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute color value, or defValue if not defined.
 */
public int getColor(int index,int defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type >= TypedValue.TYPE_FIRST_INT && type <= TypedValue.TYPE_LAST_INT) {
    return data[index + AssetManager.STYLE_DATA];
  }
 else   if (type == TypedValue.TYPE_STRING) {
    final TypedValue value=mValue;
    if (getValueAt(index,value)) {
      ColorStateList csl=mResources.loadColorStateList(value,value.resourceId);
      return csl.getDefaultColor();
    }
    return defValue;
  }
 else   if (type == TypedValue.TYPE_ATTRIBUTE) {
    throw new RuntimeException("String_Node_Str" + index);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}
Program: 198742
Project: 198742
Buggy source:
/** 
 * Retrieve the ColorStateList for the attribute at <var>index</var>. The value may be either a single solid color or a reference to a color or complex   {@link android.content.res.ColorStateList} description.
 * @param index Index of attribute to retrieve.
 * @return ColorStateList for the attribute, or null if not defined.
 */
public ColorStateList getColorStateList(int index){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  final TypedValue value=mValue;
  if (getValueAt(index * AssetManager.STYLE_NUM_ENTRIES,value)) {
    return mResources.loadColorStateList(value,value.resourceId);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Retrieve the ColorStateList for the attribute at <var>index</var>. The value may be either a single solid color or a reference to a color or complex   {@link android.content.res.ColorStateList} description.
 * @param index Index of attribute to retrieve.
 * @return ColorStateList for the attribute, or null if not defined.
 */
public ColorStateList getColorStateList(int index){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  final TypedValue value=mValue;
  if (getValueAt(index * AssetManager.STYLE_NUM_ENTRIES,value)) {
    if (value.type == TypedValue.TYPE_ATTRIBUTE) {
      throw new RuntimeException("String_Node_Str" + index);
    }
    return mResources.loadColorStateList(value,value.resourceId);
  }
  return null;
}
Program: 198743
Project: 198743
Buggy source:
/** 
 * Retrieve a fractional unit attribute at <var>index</var>.
 * @param index Index of attribute to retrieve.
 * @param base The base value of this fraction.  In other words, astandard fraction is multiplied by this value.
 * @param pbase The parent base value of this fraction.  In otherwords, a parent fraction (nn%p) is multiplied by this value.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute fractional value multiplied by the appropriatebase value, or defValue if not defined.
 */
public float getFraction(int index,int base,int pbase,float defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type == TypedValue.TYPE_FRACTION) {
    return TypedValue.complexToFraction(data[index + AssetManager.STYLE_DATA],base,pbase);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}

Fixed version (ground truth):
/** 
 * Retrieve a fractional unit attribute at <var>index</var>.
 * @param index Index of attribute to retrieve.
 * @param base The base value of this fraction.  In other words, astandard fraction is multiplied by this value.
 * @param pbase The parent base value of this fraction.  In otherwords, a parent fraction (nn%p) is multiplied by this value.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute fractional value multiplied by the appropriatebase value, or defValue if not defined.
 */
public float getFraction(int index,int base,int pbase,float defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type == TypedValue.TYPE_FRACTION) {
    return TypedValue.complexToFraction(data[index + AssetManager.STYLE_DATA],base,pbase);
  }
 else   if (type == TypedValue.TYPE_ATTRIBUTE) {
    throw new RuntimeException("String_Node_Str" + index);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}
Program: 198744
Project: 198744
Buggy source:
/** 
 * Retrieve the Drawable for the attribute at <var>index</var>.  This gets the resource ID of the selected attribute, and uses  {@link Resources#getDrawable Resources.getDrawable} of the owningResources object to retrieve its Drawable.
 * @param index Index of attribute to retrieve.
 * @return Drawable for the attribute, or null if not defined.
 */
public Drawable getDrawable(int index){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  final TypedValue value=mValue;
  if (getValueAt(index * AssetManager.STYLE_NUM_ENTRIES,value)) {
    if (false) {
      System.out.println("String_Node_Str");
      System.out.println("String_Node_Str" + value.type + "String_Node_Str"+ value.string+ "String_Node_Str"+ Integer.toHexString(value.data)+ "String_Node_Str"+ value.assetCookie);
      System.out.println("String_Node_Str");
    }
    return mResources.loadDrawable(value,value.resourceId,mTheme);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Retrieve the Drawable for the attribute at <var>index</var>.
 * @param index Index of attribute to retrieve.
 * @return Drawable for the attribute, or null if not defined.
 */
public Drawable getDrawable(int index){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  final TypedValue value=mValue;
  if (getValueAt(index * AssetManager.STYLE_NUM_ENTRIES,value)) {
    if (value.type == TypedValue.TYPE_ATTRIBUTE) {
      throw new RuntimeException("String_Node_Str" + index);
    }
    return mResources.loadDrawable(value,value.resourceId,mTheme);
  }
  return null;
}
Program: 198745
Project: 198745
Buggy source:
/** 
 * Retrieve a dimensional unit attribute at <var>index</var> for use as an offset in raw pixels.  This is the same as  {@link #getDimension}, except the returned value is converted to integer pixels for you.  An offset conversion involves simply truncating the base value to an integer.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute dimension value multiplied by the appropriatemetric and truncated to integer pixels, or defValue if not defined.
 * @see #getDimension
 * @see #getDimensionPixelSize
 */
public int getDimensionPixelOffset(int index,int defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type == TypedValue.TYPE_DIMENSION) {
    return TypedValue.complexToDimensionPixelOffset(data[index + AssetManager.STYLE_DATA],mMetrics);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}

Fixed version (ground truth):
/** 
 * Retrieve a dimensional unit attribute at <var>index</var> for use as an offset in raw pixels.  This is the same as  {@link #getDimension}, except the returned value is converted to integer pixels for you.  An offset conversion involves simply truncating the base value to an integer.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute dimension value multiplied by the appropriatemetric and truncated to integer pixels, or defValue if not defined.
 * @see #getDimension
 * @see #getDimensionPixelSize
 */
public int getDimensionPixelOffset(int index,int defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type == TypedValue.TYPE_DIMENSION) {
    return TypedValue.complexToDimensionPixelOffset(data[index + AssetManager.STYLE_DATA],mMetrics);
  }
 else   if (type == TypedValue.TYPE_ATTRIBUTE) {
    throw new RuntimeException("String_Node_Str" + index);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}
Program: 198746
Project: 198746
Buggy source:
/** 
 * Retrieve the integer value for the attribute at <var>index</var>.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute integer value, or defValue if not defined.
 */
public int getInteger(int index,int defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type >= TypedValue.TYPE_FIRST_INT && type <= TypedValue.TYPE_LAST_INT) {
    return data[index + AssetManager.STYLE_DATA];
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}

Fixed version (ground truth):
/** 
 * Retrieve the integer value for the attribute at <var>index</var>.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute integer value, or defValue if not defined.
 */
public int getInteger(int index,int defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type >= TypedValue.TYPE_FIRST_INT && type <= TypedValue.TYPE_LAST_INT) {
    return data[index + AssetManager.STYLE_DATA];
  }
 else   if (type == TypedValue.TYPE_ATTRIBUTE) {
    throw new RuntimeException("String_Node_Str" + index);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}
Program: 198747
Project: 198747
Buggy source:
/** 
 * Retrieve a dimensional unit attribute at <var>index</var>.  Unit conversions are based on the current   {@link DisplayMetrics}associated with the resources this   {@link TypedArray} objectcame from.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute dimension value multiplied by the appropriatemetric, or defValue if not defined.
 * @see #getDimensionPixelOffset
 * @see #getDimensionPixelSize
 */
public float getDimension(int index,float defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type == TypedValue.TYPE_DIMENSION) {
    return TypedValue.complexToDimension(data[index + AssetManager.STYLE_DATA],mMetrics);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}

Fixed version (ground truth):
/** 
 * Retrieve a dimensional unit attribute at <var>index</var>.  Unit conversions are based on the current   {@link DisplayMetrics}associated with the resources this   {@link TypedArray} objectcame from.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute dimension value multiplied by the appropriatemetric, or defValue if not defined.
 * @see #getDimensionPixelOffset
 * @see #getDimensionPixelSize
 */
public float getDimension(int index,float defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type == TypedValue.TYPE_DIMENSION) {
    return TypedValue.complexToDimension(data[index + AssetManager.STYLE_DATA],mMetrics);
  }
 else   if (type == TypedValue.TYPE_ATTRIBUTE) {
    throw new RuntimeException("String_Node_Str" + index);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}
Program: 198748
Project: 198748
Buggy source:
/** 
 * Retrieve the CharSequence[] for the attribute at <var>index</var>. This gets the resource ID of the selected attribute, and uses  {@link Resources#getTextArray Resources.getTextArray} of the owningResources object to retrieve its String[].
 * @param index Index of attribute to retrieve.
 * @return CharSequence[] for the attribute, or null if not defined.
 */
public CharSequence[] getTextArray(int index){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  final TypedValue value=mValue;
  if (getValueAt(index * AssetManager.STYLE_NUM_ENTRIES,value)) {
    if (false) {
      System.out.println("String_Node_Str");
      System.out.println("String_Node_Str" + value.type + "String_Node_Str"+ value.string+ "String_Node_Str"+ Integer.toHexString(value.data)+ "String_Node_Str"+ value.assetCookie);
      System.out.println("String_Node_Str");
    }
    return mResources.getTextArray(value.resourceId);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Retrieve the CharSequence[] for the attribute at <var>index</var>. This gets the resource ID of the selected attribute, and uses  {@link Resources#getTextArray Resources.getTextArray} of the owningResources object to retrieve its String[].
 * @param index Index of attribute to retrieve.
 * @return CharSequence[] for the attribute, or null if not defined.
 */
public CharSequence[] getTextArray(int index){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  final TypedValue value=mValue;
  if (getValueAt(index * AssetManager.STYLE_NUM_ENTRIES,value)) {
    return mResources.getTextArray(value.resourceId);
  }
  return null;
}
Program: 198749
Project: 198749
Buggy source:
/** 
 * Retrieve a dimensional unit attribute at <var>index</var> for use as a size in raw pixels.  This is the same as  {@link #getDimension}, except the returned value is converted to integer pixels for use as a size.  A size conversion involves rounding the base value, and ensuring that a non-zero base value is at least one pixel in size.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute dimension value multiplied by the appropriatemetric and truncated to integer pixels, or defValue if not defined.
 * @see #getDimension
 * @see #getDimensionPixelOffset
 */
public int getDimensionPixelSize(int index,int defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type == TypedValue.TYPE_DIMENSION) {
    return TypedValue.complexToDimensionPixelSize(data[index + AssetManager.STYLE_DATA],mMetrics);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}

Fixed version (ground truth):
/** 
 * Retrieve a dimensional unit attribute at <var>index</var> for use as a size in raw pixels.  This is the same as  {@link #getDimension}, except the returned value is converted to integer pixels for use as a size.  A size conversion involves rounding the base value, and ensuring that a non-zero base value is at least one pixel in size.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute dimension value multiplied by the appropriatemetric and truncated to integer pixels, or defValue if not defined.
 * @see #getDimension
 * @see #getDimensionPixelOffset
 */
public int getDimensionPixelSize(int index,int defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type == TypedValue.TYPE_DIMENSION) {
    return TypedValue.complexToDimensionPixelSize(data[index + AssetManager.STYLE_DATA],mMetrics);
  }
 else   if (type == TypedValue.TYPE_ATTRIBUTE) {
    throw new RuntimeException("String_Node_Str" + index);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}
Program: 198750
Project: 198750
Buggy source:
/** 
 * Retrieve the color value for the attribute at <var>index</var>.  If the attribute references a color resource holding a complex  {@link android.content.res.ColorStateList}, then the default color from the set is returned.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute color value, or defValue if not defined.
 */
public int getColor(int index,int defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type >= TypedValue.TYPE_FIRST_INT && type <= TypedValue.TYPE_LAST_INT) {
    return data[index + AssetManager.STYLE_DATA];
  }
 else   if (type == TypedValue.TYPE_STRING) {
    final TypedValue value=mValue;
    if (getValueAt(index,value)) {
      ColorStateList csl=mResources.loadColorStateList(value,value.resourceId);
      return csl.getDefaultColor();
    }
    return defValue;
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}

Fixed version (ground truth):
/** 
 * Retrieve the color value for the attribute at <var>index</var>.  If the attribute references a color resource holding a complex  {@link android.content.res.ColorStateList}, then the default color from the set is returned.
 * @param index Index of attribute to retrieve.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute color value, or defValue if not defined.
 */
public int getColor(int index,int defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type >= TypedValue.TYPE_FIRST_INT && type <= TypedValue.TYPE_LAST_INT) {
    return data[index + AssetManager.STYLE_DATA];
  }
 else   if (type == TypedValue.TYPE_STRING) {
    final TypedValue value=mValue;
    if (getValueAt(index,value)) {
      ColorStateList csl=mResources.loadColorStateList(value,value.resourceId);
      return csl.getDefaultColor();
    }
    return defValue;
  }
 else   if (type == TypedValue.TYPE_ATTRIBUTE) {
    throw new RuntimeException("String_Node_Str" + index);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}
Program: 198751
Project: 198751
Buggy source:
/** 
 * Retrieve the ColorStateList for the attribute at <var>index</var>. The value may be either a single solid color or a reference to a color or complex   {@link android.content.res.ColorStateList} description.
 * @param index Index of attribute to retrieve.
 * @return ColorStateList for the attribute, or null if not defined.
 */
public ColorStateList getColorStateList(int index){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  final TypedValue value=mValue;
  if (getValueAt(index * AssetManager.STYLE_NUM_ENTRIES,value)) {
    return mResources.loadColorStateList(value,value.resourceId);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Retrieve the ColorStateList for the attribute at <var>index</var>. The value may be either a single solid color or a reference to a color or complex   {@link android.content.res.ColorStateList} description.
 * @param index Index of attribute to retrieve.
 * @return ColorStateList for the attribute, or null if not defined.
 */
public ColorStateList getColorStateList(int index){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  final TypedValue value=mValue;
  if (getValueAt(index * AssetManager.STYLE_NUM_ENTRIES,value)) {
    if (value.type == TypedValue.TYPE_ATTRIBUTE) {
      throw new RuntimeException("String_Node_Str" + index);
    }
    return mResources.loadColorStateList(value,value.resourceId);
  }
  return null;
}
Program: 198752
Project: 198752
Buggy source:
/** 
 * Retrieve a fractional unit attribute at <var>index</var>.
 * @param index Index of attribute to retrieve.
 * @param base The base value of this fraction.  In other words, astandard fraction is multiplied by this value.
 * @param pbase The parent base value of this fraction.  In otherwords, a parent fraction (nn%p) is multiplied by this value.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute fractional value multiplied by the appropriatebase value, or defValue if not defined.
 */
public float getFraction(int index,int base,int pbase,float defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type == TypedValue.TYPE_FRACTION) {
    return TypedValue.complexToFraction(data[index + AssetManager.STYLE_DATA],base,pbase);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}

Fixed version (ground truth):
/** 
 * Retrieve a fractional unit attribute at <var>index</var>.
 * @param index Index of attribute to retrieve.
 * @param base The base value of this fraction.  In other words, astandard fraction is multiplied by this value.
 * @param pbase The parent base value of this fraction.  In otherwords, a parent fraction (nn%p) is multiplied by this value.
 * @param defValue Value to return if the attribute is not defined ornot a resource.
 * @return Attribute fractional value multiplied by the appropriatebase value, or defValue if not defined.
 */
public float getFraction(int index,int base,int pbase,float defValue){
  if (mRecycled) {
    throw new RuntimeException("String_Node_Str");
  }
  index*=AssetManager.STYLE_NUM_ENTRIES;
  final int[] data=mData;
  final int type=data[index + AssetManager.STYLE_TYPE];
  if (type == TypedValue.TYPE_NULL) {
    return defValue;
  }
 else   if (type == TypedValue.TYPE_FRACTION) {
    return TypedValue.complexToFraction(data[index + AssetManager.STYLE_DATA],base,pbase);
  }
 else   if (type == TypedValue.TYPE_ATTRIBUTE) {
    throw new RuntimeException("String_Node_Str" + index);
  }
  throw new UnsupportedOperationException("String_Node_Str" + Integer.toHexString(type));
}
Program: 198753
Project: 198753
Buggy source:
@Override public WindowInsets dispatchApplyWindowInsets(WindowInsets insets){
  if (mOutsetBottom != null) {
    final DisplayMetrics metrics=getContext().getResources().getDisplayMetrics();
    int bottom=(int)mOutsetBottom.getDimension(metrics);
    WindowInsets newInsets=insets.replaceSystemWindowInsets(insets.getSystemWindowInsetLeft(),insets.getSystemWindowInsetTop(),insets.getSystemWindowInsetRight(),insets.getSystemWindowInsetBottom() + bottom);
    return super.dispatchApplyWindowInsets(newInsets);
  }
 else {
    return super.dispatchApplyWindowInsets(insets);
  }
}

Fixed version (ground truth):
@Override public WindowInsets dispatchApplyWindowInsets(WindowInsets insets){
  if (mOutsetBottom != null) {
    final DisplayMetrics metrics=getContext().getResources().getDisplayMetrics();
    int bottom=(int)mOutsetBottom.getDimension(metrics);
    WindowInsets newInsets=insets.replaceSystemWindowInsets(insets.getSystemWindowInsetLeft(),insets.getSystemWindowInsetTop(),insets.getSystemWindowInsetRight(),bottom);
    return super.dispatchApplyWindowInsets(newInsets);
  }
 else {
    return super.dispatchApplyWindowInsets(insets);
  }
}
Program: 198754
Project: 198754
Buggy source:
@Override public WindowInsets dispatchApplyWindowInsets(WindowInsets insets){
  if (mOutsetBottom != null) {
    final DisplayMetrics metrics=getContext().getResources().getDisplayMetrics();
    int bottom=(int)mOutsetBottom.getDimension(metrics);
    WindowInsets newInsets=insets.replaceSystemWindowInsets(insets.getSystemWindowInsetLeft(),insets.getSystemWindowInsetTop(),insets.getSystemWindowInsetRight(),insets.getSystemWindowInsetBottom() + bottom);
    return super.dispatchApplyWindowInsets(newInsets);
  }
 else {
    return super.dispatchApplyWindowInsets(insets);
  }
}

Fixed version (ground truth):
@Override public WindowInsets dispatchApplyWindowInsets(WindowInsets insets){
  if (mOutsetBottom != null) {
    final DisplayMetrics metrics=getContext().getResources().getDisplayMetrics();
    int bottom=(int)mOutsetBottom.getDimension(metrics);
    WindowInsets newInsets=insets.replaceSystemWindowInsets(insets.getSystemWindowInsetLeft(),insets.getSystemWindowInsetTop(),insets.getSystemWindowInsetRight(),bottom);
    return super.dispatchApplyWindowInsets(newInsets);
  }
 else {
    return super.dispatchApplyWindowInsets(insets);
  }
}