nus-yam/ex-repair huggingface dataset:
Program: 1736
Project: 1736
Buggy source:
/** 
 * Set all class variables using current values from the given  {@link Paint}.
 */
private void setClassVariablesFrom(Paint paint){
  mColorFilter=paint.mColorFilter;
  mMaskFilter=paint.mMaskFilter;
  mPathEffect=paint.mPathEffect;
  mRasterizer=paint.mRasterizer;
  if (paint.mShader != null) {
    mShader=paint.mShader.copy();
  }
  mTypeface=paint.mTypeface;
  mXfermode=paint.mXfermode;
  mHasCompatScaling=paint.mHasCompatScaling;
  mCompatScaling=paint.mCompatScaling;
  mInvCompatScaling=paint.mInvCompatScaling;
  hasShadow=paint.hasShadow;
  shadowDx=paint.shadowDx;
  shadowDy=paint.shadowDy;
  shadowRadius=paint.shadowRadius;
  shadowColor=paint.shadowColor;
  mBidiFlags=paint.mBidiFlags;
  mLocale=paint.mLocale;
}

Fixed version (ground truth):
/** 
 * Set all class variables using current values from the given  {@link Paint}.
 */
private void setClassVariablesFrom(Paint paint){
  mColorFilter=paint.mColorFilter;
  mMaskFilter=paint.mMaskFilter;
  mPathEffect=paint.mPathEffect;
  mRasterizer=paint.mRasterizer;
  if (paint.mShader != null) {
    mShader=paint.mShader.copy();
  }
 else {
    mShader=null;
  }
  mTypeface=paint.mTypeface;
  mXfermode=paint.mXfermode;
  mHasCompatScaling=paint.mHasCompatScaling;
  mCompatScaling=paint.mCompatScaling;
  mInvCompatScaling=paint.mInvCompatScaling;
  hasShadow=paint.hasShadow;
  shadowDx=paint.shadowDx;
  shadowDy=paint.shadowDy;
  shadowRadius=paint.shadowRadius;
  shadowColor=paint.shadowColor;
  mBidiFlags=paint.mBidiFlags;
  mLocale=paint.mLocale;
}
Program: 1737
Project: 1737
Buggy source:
/** 
 * Resolve the Drawables depending on the layout direction. This is implicitly supposing that the View directionality can and will be resolved before its Drawables. Will call   {@link View#onResolveDrawables} when resolution is done.
 * @hide
 */
protected void resolveDrawables(){
  if (canResolveLayoutDirection()) {
    if (mBackground != null) {
      mBackground.setLayoutDirection(getLayoutDirection());
    }
    mPrivateFlags2|=PFLAG2_DRAWABLE_RESOLVED;
    onResolveDrawables(getLayoutDirection());
  }
}

Fixed version (ground truth):
/** 
 * Resolve the Drawables depending on the layout direction. This is implicitly supposing that the View directionality can and will be resolved before its Drawables. Will call   {@link View#onResolveDrawables} when resolution is done.
 * @hide
 */
protected void resolveDrawables(){
  if (!isLayoutDirectionResolved() && getRawLayoutDirection() == View.LAYOUT_DIRECTION_INHERIT) {
    return;
  }
  final int layoutDirection=isLayoutDirectionResolved() ? getLayoutDirection() : getRawLayoutDirection();
  if (mBackground != null) {
    mBackground.setLayoutDirection(layoutDirection);
  }
  mPrivateFlags2|=PFLAG2_DRAWABLE_RESOLVED;
  onResolveDrawables(layoutDirection);
}
Program: 1738
Project: 1738
Buggy source:
private void setRelativeDrawablesIfNeeded(Drawable start,Drawable end){
  boolean hasRelativeDrawables=(start != null) || (end != null);
  if (hasRelativeDrawables) {
    Drawables dr=mDrawables;
    if (dr == null) {
      mDrawables=dr=new Drawables(getContext());
    }
    mDrawables.mOverride=true;
    final Rect compoundRect=dr.mCompoundRect;
    int[] state=getDrawableState();
    if (start != null) {
      start.setBounds(0,0,start.getIntrinsicWidth(),start.getIntrinsicHeight());
      start.setState(state);
      start.copyBounds(compoundRect);
      start.setCallback(this);
      dr.mDrawableStart=start;
      dr.mDrawableSizeStart=compoundRect.width();
      dr.mDrawableHeightStart=compoundRect.height();
    }
 else {
      dr.mDrawableSizeStart=dr.mDrawableHeightStart=0;
    }
    if (end != null) {
      end.setBounds(0,0,end.getIntrinsicWidth(),end.getIntrinsicHeight());
      end.setState(state);
      end.copyBounds(compoundRect);
      end.setCallback(this);
      dr.mDrawableEnd=end;
      dr.mDrawableSizeEnd=compoundRect.width();
      dr.mDrawableHeightEnd=compoundRect.height();
    }
 else {
      dr.mDrawableSizeEnd=dr.mDrawableHeightEnd=0;
    }
  }
}

Fixed version (ground truth):
private void setRelativeDrawablesIfNeeded(Drawable start,Drawable end){
  boolean hasRelativeDrawables=(start != null) || (end != null);
  if (hasRelativeDrawables) {
    Drawables dr=mDrawables;
    if (dr == null) {
      mDrawables=dr=new Drawables(getContext());
    }
    mDrawables.mOverride=true;
    final Rect compoundRect=dr.mCompoundRect;
    int[] state=getDrawableState();
    if (start != null) {
      start.setBounds(0,0,start.getIntrinsicWidth(),start.getIntrinsicHeight());
      start.setState(state);
      start.copyBounds(compoundRect);
      start.setCallback(this);
      dr.mDrawableStart=start;
      dr.mDrawableSizeStart=compoundRect.width();
      dr.mDrawableHeightStart=compoundRect.height();
    }
 else {
      dr.mDrawableSizeStart=dr.mDrawableHeightStart=0;
    }
    if (end != null) {
      end.setBounds(0,0,end.getIntrinsicWidth(),end.getIntrinsicHeight());
      end.setState(state);
      end.copyBounds(compoundRect);
      end.setCallback(this);
      dr.mDrawableEnd=end;
      dr.mDrawableSizeEnd=compoundRect.width();
      dr.mDrawableHeightEnd=compoundRect.height();
    }
 else {
      dr.mDrawableSizeEnd=dr.mDrawableHeightEnd=0;
    }
    resetResolvedDrawables();
    resolveDrawables();
  }
}
Program: 1739
Project: 1739
Buggy source:
/** 
 * Set all class variables using current values from the given  {@link Paint}.
 */
private void setClassVariablesFrom(Paint paint){
  mColorFilter=paint.mColorFilter;
  mMaskFilter=paint.mMaskFilter;
  mPathEffect=paint.mPathEffect;
  mRasterizer=paint.mRasterizer;
  if (paint.mShader != null) {
    mShader=paint.mShader.copy();
  }
  mTypeface=paint.mTypeface;
  mXfermode=paint.mXfermode;
  mHasCompatScaling=paint.mHasCompatScaling;
  mCompatScaling=paint.mCompatScaling;
  mInvCompatScaling=paint.mInvCompatScaling;
  hasShadow=paint.hasShadow;
  shadowDx=paint.shadowDx;
  shadowDy=paint.shadowDy;
  shadowRadius=paint.shadowRadius;
  shadowColor=paint.shadowColor;
  mBidiFlags=paint.mBidiFlags;
  mLocale=paint.mLocale;
}

Fixed version (ground truth):
/** 
 * Set all class variables using current values from the given  {@link Paint}.
 */
private void setClassVariablesFrom(Paint paint){
  mColorFilter=paint.mColorFilter;
  mMaskFilter=paint.mMaskFilter;
  mPathEffect=paint.mPathEffect;
  mRasterizer=paint.mRasterizer;
  if (paint.mShader != null) {
    mShader=paint.mShader.copy();
  }
 else {
    mShader=null;
  }
  mTypeface=paint.mTypeface;
  mXfermode=paint.mXfermode;
  mHasCompatScaling=paint.mHasCompatScaling;
  mCompatScaling=paint.mCompatScaling;
  mInvCompatScaling=paint.mInvCompatScaling;
  hasShadow=paint.hasShadow;
  shadowDx=paint.shadowDx;
  shadowDy=paint.shadowDy;
  shadowRadius=paint.shadowRadius;
  shadowColor=paint.shadowColor;
  mBidiFlags=paint.mBidiFlags;
  mLocale=paint.mLocale;
}
Program: 1740
Project: 1740
Buggy source:
/** 
 * Resolve the Drawables depending on the layout direction. This is implicitly supposing that the View directionality can and will be resolved before its Drawables. Will call   {@link View#onResolveDrawables} when resolution is done.
 * @hide
 */
protected void resolveDrawables(){
  if (canResolveLayoutDirection()) {
    if (mBackground != null) {
      mBackground.setLayoutDirection(getLayoutDirection());
    }
    mPrivateFlags2|=PFLAG2_DRAWABLE_RESOLVED;
    onResolveDrawables(getLayoutDirection());
  }
}

Fixed version (ground truth):
/** 
 * Resolve the Drawables depending on the layout direction. This is implicitly supposing that the View directionality can and will be resolved before its Drawables. Will call   {@link View#onResolveDrawables} when resolution is done.
 * @hide
 */
protected void resolveDrawables(){
  if (!isLayoutDirectionResolved() && getRawLayoutDirection() == View.LAYOUT_DIRECTION_INHERIT) {
    return;
  }
  final int layoutDirection=isLayoutDirectionResolved() ? getLayoutDirection() : getRawLayoutDirection();
  if (mBackground != null) {
    mBackground.setLayoutDirection(layoutDirection);
  }
  mPrivateFlags2|=PFLAG2_DRAWABLE_RESOLVED;
  onResolveDrawables(layoutDirection);
}
Program: 1741
Project: 1741
Buggy source:
private void setRelativeDrawablesIfNeeded(Drawable start,Drawable end){
  boolean hasRelativeDrawables=(start != null) || (end != null);
  if (hasRelativeDrawables) {
    Drawables dr=mDrawables;
    if (dr == null) {
      mDrawables=dr=new Drawables(getContext());
    }
    mDrawables.mOverride=true;
    final Rect compoundRect=dr.mCompoundRect;
    int[] state=getDrawableState();
    if (start != null) {
      start.setBounds(0,0,start.getIntrinsicWidth(),start.getIntrinsicHeight());
      start.setState(state);
      start.copyBounds(compoundRect);
      start.setCallback(this);
      dr.mDrawableStart=start;
      dr.mDrawableSizeStart=compoundRect.width();
      dr.mDrawableHeightStart=compoundRect.height();
    }
 else {
      dr.mDrawableSizeStart=dr.mDrawableHeightStart=0;
    }
    if (end != null) {
      end.setBounds(0,0,end.getIntrinsicWidth(),end.getIntrinsicHeight());
      end.setState(state);
      end.copyBounds(compoundRect);
      end.setCallback(this);
      dr.mDrawableEnd=end;
      dr.mDrawableSizeEnd=compoundRect.width();
      dr.mDrawableHeightEnd=compoundRect.height();
    }
 else {
      dr.mDrawableSizeEnd=dr.mDrawableHeightEnd=0;
    }
  }
}

Fixed version (ground truth):
private void setRelativeDrawablesIfNeeded(Drawable start,Drawable end){
  boolean hasRelativeDrawables=(start != null) || (end != null);
  if (hasRelativeDrawables) {
    Drawables dr=mDrawables;
    if (dr == null) {
      mDrawables=dr=new Drawables(getContext());
    }
    mDrawables.mOverride=true;
    final Rect compoundRect=dr.mCompoundRect;
    int[] state=getDrawableState();
    if (start != null) {
      start.setBounds(0,0,start.getIntrinsicWidth(),start.getIntrinsicHeight());
      start.setState(state);
      start.copyBounds(compoundRect);
      start.setCallback(this);
      dr.mDrawableStart=start;
      dr.mDrawableSizeStart=compoundRect.width();
      dr.mDrawableHeightStart=compoundRect.height();
    }
 else {
      dr.mDrawableSizeStart=dr.mDrawableHeightStart=0;
    }
    if (end != null) {
      end.setBounds(0,0,end.getIntrinsicWidth(),end.getIntrinsicHeight());
      end.setState(state);
      end.copyBounds(compoundRect);
      end.setCallback(this);
      dr.mDrawableEnd=end;
      dr.mDrawableSizeEnd=compoundRect.width();
      dr.mDrawableHeightEnd=compoundRect.height();
    }
 else {
      dr.mDrawableSizeEnd=dr.mDrawableHeightEnd=0;
    }
    resetResolvedDrawables();
    resolveDrawables();
  }
}
Program: 1742
Project: 1742
Buggy source:
/** 
 * Set all class variables using current values from the given  {@link Paint}.
 */
private void setClassVariablesFrom(Paint paint){
  mColorFilter=paint.mColorFilter;
  mMaskFilter=paint.mMaskFilter;
  mPathEffect=paint.mPathEffect;
  mRasterizer=paint.mRasterizer;
  if (paint.mShader != null) {
    mShader=paint.mShader.copy();
  }
  mTypeface=paint.mTypeface;
  mXfermode=paint.mXfermode;
  mHasCompatScaling=paint.mHasCompatScaling;
  mCompatScaling=paint.mCompatScaling;
  mInvCompatScaling=paint.mInvCompatScaling;
  hasShadow=paint.hasShadow;
  shadowDx=paint.shadowDx;
  shadowDy=paint.shadowDy;
  shadowRadius=paint.shadowRadius;
  shadowColor=paint.shadowColor;
  mBidiFlags=paint.mBidiFlags;
  mLocale=paint.mLocale;
}

Fixed version (ground truth):
/** 
 * Set all class variables using current values from the given  {@link Paint}.
 */
private void setClassVariablesFrom(Paint paint){
  mColorFilter=paint.mColorFilter;
  mMaskFilter=paint.mMaskFilter;
  mPathEffect=paint.mPathEffect;
  mRasterizer=paint.mRasterizer;
  if (paint.mShader != null) {
    mShader=paint.mShader.copy();
  }
 else {
    mShader=null;
  }
  mTypeface=paint.mTypeface;
  mXfermode=paint.mXfermode;
  mHasCompatScaling=paint.mHasCompatScaling;
  mCompatScaling=paint.mCompatScaling;
  mInvCompatScaling=paint.mInvCompatScaling;
  hasShadow=paint.hasShadow;
  shadowDx=paint.shadowDx;
  shadowDy=paint.shadowDy;
  shadowRadius=paint.shadowRadius;
  shadowColor=paint.shadowColor;
  mBidiFlags=paint.mBidiFlags;
  mLocale=paint.mLocale;
}
Program: 1743
Project: 1743
Buggy source:
/** 
 * Resolve the Drawables depending on the layout direction. This is implicitly supposing that the View directionality can and will be resolved before its Drawables. Will call   {@link View#onResolveDrawables} when resolution is done.
 * @hide
 */
protected void resolveDrawables(){
  if (canResolveLayoutDirection()) {
    if (mBackground != null) {
      mBackground.setLayoutDirection(getLayoutDirection());
    }
    mPrivateFlags2|=PFLAG2_DRAWABLE_RESOLVED;
    onResolveDrawables(getLayoutDirection());
  }
}

Fixed version (ground truth):
/** 
 * Resolve the Drawables depending on the layout direction. This is implicitly supposing that the View directionality can and will be resolved before its Drawables. Will call   {@link View#onResolveDrawables} when resolution is done.
 * @hide
 */
protected void resolveDrawables(){
  if (!isLayoutDirectionResolved() && getRawLayoutDirection() == View.LAYOUT_DIRECTION_INHERIT) {
    return;
  }
  final int layoutDirection=isLayoutDirectionResolved() ? getLayoutDirection() : getRawLayoutDirection();
  if (mBackground != null) {
    mBackground.setLayoutDirection(layoutDirection);
  }
  mPrivateFlags2|=PFLAG2_DRAWABLE_RESOLVED;
  onResolveDrawables(layoutDirection);
}
Program: 1744
Project: 1744
Buggy source:
private void setRelativeDrawablesIfNeeded(Drawable start,Drawable end){
  boolean hasRelativeDrawables=(start != null) || (end != null);
  if (hasRelativeDrawables) {
    Drawables dr=mDrawables;
    if (dr == null) {
      mDrawables=dr=new Drawables(getContext());
    }
    mDrawables.mOverride=true;
    final Rect compoundRect=dr.mCompoundRect;
    int[] state=getDrawableState();
    if (start != null) {
      start.setBounds(0,0,start.getIntrinsicWidth(),start.getIntrinsicHeight());
      start.setState(state);
      start.copyBounds(compoundRect);
      start.setCallback(this);
      dr.mDrawableStart=start;
      dr.mDrawableSizeStart=compoundRect.width();
      dr.mDrawableHeightStart=compoundRect.height();
    }
 else {
      dr.mDrawableSizeStart=dr.mDrawableHeightStart=0;
    }
    if (end != null) {
      end.setBounds(0,0,end.getIntrinsicWidth(),end.getIntrinsicHeight());
      end.setState(state);
      end.copyBounds(compoundRect);
      end.setCallback(this);
      dr.mDrawableEnd=end;
      dr.mDrawableSizeEnd=compoundRect.width();
      dr.mDrawableHeightEnd=compoundRect.height();
    }
 else {
      dr.mDrawableSizeEnd=dr.mDrawableHeightEnd=0;
    }
  }
}

Fixed version (ground truth):
private void setRelativeDrawablesIfNeeded(Drawable start,Drawable end){
  boolean hasRelativeDrawables=(start != null) || (end != null);
  if (hasRelativeDrawables) {
    Drawables dr=mDrawables;
    if (dr == null) {
      mDrawables=dr=new Drawables(getContext());
    }
    mDrawables.mOverride=true;
    final Rect compoundRect=dr.mCompoundRect;
    int[] state=getDrawableState();
    if (start != null) {
      start.setBounds(0,0,start.getIntrinsicWidth(),start.getIntrinsicHeight());
      start.setState(state);
      start.copyBounds(compoundRect);
      start.setCallback(this);
      dr.mDrawableStart=start;
      dr.mDrawableSizeStart=compoundRect.width();
      dr.mDrawableHeightStart=compoundRect.height();
    }
 else {
      dr.mDrawableSizeStart=dr.mDrawableHeightStart=0;
    }
    if (end != null) {
      end.setBounds(0,0,end.getIntrinsicWidth(),end.getIntrinsicHeight());
      end.setState(state);
      end.copyBounds(compoundRect);
      end.setCallback(this);
      dr.mDrawableEnd=end;
      dr.mDrawableSizeEnd=compoundRect.width();
      dr.mDrawableHeightEnd=compoundRect.height();
    }
 else {
      dr.mDrawableSizeEnd=dr.mDrawableHeightEnd=0;
    }
    resetResolvedDrawables();
    resolveDrawables();
  }
}
Program: 1745
Project: 1745
Buggy source:
/** 
 * Set all class variables using current values from the given  {@link Paint}.
 */
private void setClassVariablesFrom(Paint paint){
  mColorFilter=paint.mColorFilter;
  mMaskFilter=paint.mMaskFilter;
  mPathEffect=paint.mPathEffect;
  mRasterizer=paint.mRasterizer;
  if (paint.mShader != null) {
    mShader=paint.mShader.copy();
  }
  mTypeface=paint.mTypeface;
  mXfermode=paint.mXfermode;
  mHasCompatScaling=paint.mHasCompatScaling;
  mCompatScaling=paint.mCompatScaling;
  mInvCompatScaling=paint.mInvCompatScaling;
  hasShadow=paint.hasShadow;
  shadowDx=paint.shadowDx;
  shadowDy=paint.shadowDy;
  shadowRadius=paint.shadowRadius;
  shadowColor=paint.shadowColor;
  mBidiFlags=paint.mBidiFlags;
  mLocale=paint.mLocale;
}

Fixed version (ground truth):
/** 
 * Set all class variables using current values from the given  {@link Paint}.
 */
private void setClassVariablesFrom(Paint paint){
  mColorFilter=paint.mColorFilter;
  mMaskFilter=paint.mMaskFilter;
  mPathEffect=paint.mPathEffect;
  mRasterizer=paint.mRasterizer;
  if (paint.mShader != null) {
    mShader=paint.mShader.copy();
  }
 else {
    mShader=null;
  }
  mTypeface=paint.mTypeface;
  mXfermode=paint.mXfermode;
  mHasCompatScaling=paint.mHasCompatScaling;
  mCompatScaling=paint.mCompatScaling;
  mInvCompatScaling=paint.mInvCompatScaling;
  hasShadow=paint.hasShadow;
  shadowDx=paint.shadowDx;
  shadowDy=paint.shadowDy;
  shadowRadius=paint.shadowRadius;
  shadowColor=paint.shadowColor;
  mBidiFlags=paint.mBidiFlags;
  mLocale=paint.mLocale;
}
Program: 1757
Project: 1757
Buggy source:
public void setPrimaryClip(ClipData clip,String callingPackage){
synchronized (this) {
    if (clip != null && clip.getItemCount() <= 0) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    if (mAppOps.noteOp(AppOpsManager.OP_WRITE_CLIPBOARD,Binder.getCallingUid(),callingPackage) != AppOpsManager.MODE_ALLOWED) {
      return;
    }
    checkDataOwnerLocked(clip,Binder.getCallingUid());
    clearActiveOwnersLocked();
    PerUserClipboard clipboard=getClipboard();
    clipboard.primaryClip=clip;
    final int n=clipboard.primaryClipListeners.beginBroadcast();
    for (int i=0; i < n; i++) {
      try {
        ListenerInfo li=(ListenerInfo)clipboard.primaryClipListeners.getBroadcastCookie(i);
        if (mAppOps.checkOpNoThrow(AppOpsManager.OP_READ_CLIPBOARD,li.mUid,li.mPackageName) == AppOpsManager.MODE_ALLOWED) {
          clipboard.primaryClipListeners.getBroadcastItem(i).dispatchPrimaryClipChanged();
        }
      }
 catch (      RemoteException e) {
      }
    }
    clipboard.primaryClipListeners.finishBroadcast();
  }
}

Fixed version (ground truth):
public void setPrimaryClip(ClipData clip,String callingPackage){
synchronized (this) {
    if (clip != null && clip.getItemCount() <= 0) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    final int callingUid=Binder.getCallingUid();
    if (mAppOps.noteOp(AppOpsManager.OP_WRITE_CLIPBOARD,callingUid,callingPackage) != AppOpsManager.MODE_ALLOWED) {
      return;
    }
    checkDataOwnerLocked(clip,callingUid);
    clearActiveOwnersLocked();
    PerUserClipboard clipboard=getClipboard();
    clipboard.primaryClip=clip;
    final long ident=Binder.clearCallingIdentity();
    final int n=clipboard.primaryClipListeners.beginBroadcast();
    try {
      for (int i=0; i < n; i++) {
        try {
          ListenerInfo li=(ListenerInfo)clipboard.primaryClipListeners.getBroadcastCookie(i);
          if (mAppOps.checkOpNoThrow(AppOpsManager.OP_READ_CLIPBOARD,li.mUid,li.mPackageName) == AppOpsManager.MODE_ALLOWED) {
            clipboard.primaryClipListeners.getBroadcastItem(i).dispatchPrimaryClipChanged();
          }
        }
 catch (        RemoteException e) {
        }
      }
    }
  finally {
      clipboard.primaryClipListeners.finishBroadcast();
      Binder.restoreCallingIdentity(ident);
    }
  }
}
Program: 1758
Project: 1758
Buggy source:
@Override public final int hashCode(){
  if (!mEntryValid) {
    throw new IllegalStateException("String_Node_Str");
  }
  final Object key=colGetEntry(mIndex,0);
  final Object value=colGetEntry(mIndex,1);
  return (key == null ? 0 : key.hashCode()) ^ (value == null ? 0 : value.hashCode());
}

Fixed version (ground truth):
@Override public int hashCode(){
  int result=0;
  for (int i=colGetSize() - 1; i >= 0; i--) {
    Object obj=colGetEntry(i,0);
    result+=obj == null ? 0 : obj.hashCode();
  }
  return result;
}
Program: 1759
Project: 1759
Buggy source:
@Override public final boolean equals(Object o){
  if (!mEntryValid) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (!(o instanceof Map.Entry)) {
    return false;
  }
  Map.Entry<?,?> e=(Map.Entry<?,?>)o;
  return Objects.equal(e.getKey(),colGetEntry(mIndex,0)) && Objects.equal(e.getValue(),colGetEntry(mIndex,1));
}

Fixed version (ground truth):
@Override public boolean equals(Object object){
  return equalsSetHelper(this,object);
}
Program: 1761
Project: 1761
Buggy source:
@Override public final int hashCode(){
  if (!mEntryValid) {
    throw new IllegalStateException("String_Node_Str");
  }
  final Object key=colGetEntry(mIndex,0);
  final Object value=colGetEntry(mIndex,1);
  return (key == null ? 0 : key.hashCode()) ^ (value == null ? 0 : value.hashCode());
}

Fixed version (ground truth):
@Override public int hashCode(){
  int result=0;
  for (int i=colGetSize() - 1; i >= 0; i--) {
    Object obj=colGetEntry(i,0);
    result+=obj == null ? 0 : obj.hashCode();
  }
  return result;
}
Program: 1762
Project: 1762
Buggy source:
@Override public final boolean equals(Object o){
  if (!mEntryValid) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (!(o instanceof Map.Entry)) {
    return false;
  }
  Map.Entry<?,?> e=(Map.Entry<?,?>)o;
  return Objects.equal(e.getKey(),colGetEntry(mIndex,0)) && Objects.equal(e.getValue(),colGetEntry(mIndex,1));
}

Fixed version (ground truth):
@Override public boolean equals(Object object){
  return equalsSetHelper(this,object);
}
Program: 1764
Project: 1764
Buggy source:
public void setPrimaryClip(ClipData clip,String callingPackage){
synchronized (this) {
    if (clip != null && clip.getItemCount() <= 0) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    if (mAppOps.noteOp(AppOpsManager.OP_WRITE_CLIPBOARD,Binder.getCallingUid(),callingPackage) != AppOpsManager.MODE_ALLOWED) {
      return;
    }
    checkDataOwnerLocked(clip,Binder.getCallingUid());
    clearActiveOwnersLocked();
    PerUserClipboard clipboard=getClipboard();
    clipboard.primaryClip=clip;
    final int n=clipboard.primaryClipListeners.beginBroadcast();
    for (int i=0; i < n; i++) {
      try {
        ListenerInfo li=(ListenerInfo)clipboard.primaryClipListeners.getBroadcastCookie(i);
        if (mAppOps.checkOpNoThrow(AppOpsManager.OP_READ_CLIPBOARD,li.mUid,li.mPackageName) == AppOpsManager.MODE_ALLOWED) {
          clipboard.primaryClipListeners.getBroadcastItem(i).dispatchPrimaryClipChanged();
        }
      }
 catch (      RemoteException e) {
      }
    }
    clipboard.primaryClipListeners.finishBroadcast();
  }
}

Fixed version (ground truth):
public void setPrimaryClip(ClipData clip,String callingPackage){
synchronized (this) {
    if (clip != null && clip.getItemCount() <= 0) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    final int callingUid=Binder.getCallingUid();
    if (mAppOps.noteOp(AppOpsManager.OP_WRITE_CLIPBOARD,callingUid,callingPackage) != AppOpsManager.MODE_ALLOWED) {
      return;
    }
    checkDataOwnerLocked(clip,callingUid);
    clearActiveOwnersLocked();
    PerUserClipboard clipboard=getClipboard();
    clipboard.primaryClip=clip;
    final long ident=Binder.clearCallingIdentity();
    final int n=clipboard.primaryClipListeners.beginBroadcast();
    try {
      for (int i=0; i < n; i++) {
        try {
          ListenerInfo li=(ListenerInfo)clipboard.primaryClipListeners.getBroadcastCookie(i);
          if (mAppOps.checkOpNoThrow(AppOpsManager.OP_READ_CLIPBOARD,li.mUid,li.mPackageName) == AppOpsManager.MODE_ALLOWED) {
            clipboard.primaryClipListeners.getBroadcastItem(i).dispatchPrimaryClipChanged();
          }
        }
 catch (        RemoteException e) {
        }
      }
    }
  finally {
      clipboard.primaryClipListeners.finishBroadcast();
      Binder.restoreCallingIdentity(ident);
    }
  }
}
Program: 1765
Project: 1765
Buggy source:
public void setPrimaryClip(ClipData clip,String callingPackage){
synchronized (this) {
    if (clip != null && clip.getItemCount() <= 0) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    if (mAppOps.noteOp(AppOpsManager.OP_WRITE_CLIPBOARD,Binder.getCallingUid(),callingPackage) != AppOpsManager.MODE_ALLOWED) {
      return;
    }
    checkDataOwnerLocked(clip,Binder.getCallingUid());
    clearActiveOwnersLocked();
    PerUserClipboard clipboard=getClipboard();
    clipboard.primaryClip=clip;
    final int n=clipboard.primaryClipListeners.beginBroadcast();
    for (int i=0; i < n; i++) {
      try {
        ListenerInfo li=(ListenerInfo)clipboard.primaryClipListeners.getBroadcastCookie(i);
        if (mAppOps.checkOpNoThrow(AppOpsManager.OP_READ_CLIPBOARD,li.mUid,li.mPackageName) == AppOpsManager.MODE_ALLOWED) {
          clipboard.primaryClipListeners.getBroadcastItem(i).dispatchPrimaryClipChanged();
        }
      }
 catch (      RemoteException e) {
      }
    }
    clipboard.primaryClipListeners.finishBroadcast();
  }
}

Fixed version (ground truth):
public void setPrimaryClip(ClipData clip,String callingPackage){
synchronized (this) {
    if (clip != null && clip.getItemCount() <= 0) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    final int callingUid=Binder.getCallingUid();
    if (mAppOps.noteOp(AppOpsManager.OP_WRITE_CLIPBOARD,callingUid,callingPackage) != AppOpsManager.MODE_ALLOWED) {
      return;
    }
    checkDataOwnerLocked(clip,callingUid);
    clearActiveOwnersLocked();
    PerUserClipboard clipboard=getClipboard();
    clipboard.primaryClip=clip;
    final long ident=Binder.clearCallingIdentity();
    final int n=clipboard.primaryClipListeners.beginBroadcast();
    try {
      for (int i=0; i < n; i++) {
        try {
          ListenerInfo li=(ListenerInfo)clipboard.primaryClipListeners.getBroadcastCookie(i);
          if (mAppOps.checkOpNoThrow(AppOpsManager.OP_READ_CLIPBOARD,li.mUid,li.mPackageName) == AppOpsManager.MODE_ALLOWED) {
            clipboard.primaryClipListeners.getBroadcastItem(i).dispatchPrimaryClipChanged();
          }
        }
 catch (        RemoteException e) {
        }
      }
    }
  finally {
      clipboard.primaryClipListeners.finishBroadcast();
      Binder.restoreCallingIdentity(ident);
    }
  }
}
Program: 1766
Project: 1766
Buggy source:
public void setPrimaryClip(ClipData clip,String callingPackage){
synchronized (this) {
    if (clip != null && clip.getItemCount() <= 0) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    if (mAppOps.noteOp(AppOpsManager.OP_WRITE_CLIPBOARD,Binder.getCallingUid(),callingPackage) != AppOpsManager.MODE_ALLOWED) {
      return;
    }
    checkDataOwnerLocked(clip,Binder.getCallingUid());
    clearActiveOwnersLocked();
    PerUserClipboard clipboard=getClipboard();
    clipboard.primaryClip=clip;
    final int n=clipboard.primaryClipListeners.beginBroadcast();
    for (int i=0; i < n; i++) {
      try {
        ListenerInfo li=(ListenerInfo)clipboard.primaryClipListeners.getBroadcastCookie(i);
        if (mAppOps.checkOpNoThrow(AppOpsManager.OP_READ_CLIPBOARD,li.mUid,li.mPackageName) == AppOpsManager.MODE_ALLOWED) {
          clipboard.primaryClipListeners.getBroadcastItem(i).dispatchPrimaryClipChanged();
        }
      }
 catch (      RemoteException e) {
      }
    }
    clipboard.primaryClipListeners.finishBroadcast();
  }
}

Fixed version (ground truth):
public void setPrimaryClip(ClipData clip,String callingPackage){
synchronized (this) {
    if (clip != null && clip.getItemCount() <= 0) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    final int callingUid=Binder.getCallingUid();
    if (mAppOps.noteOp(AppOpsManager.OP_WRITE_CLIPBOARD,callingUid,callingPackage) != AppOpsManager.MODE_ALLOWED) {
      return;
    }
    checkDataOwnerLocked(clip,callingUid);
    clearActiveOwnersLocked();
    PerUserClipboard clipboard=getClipboard();
    clipboard.primaryClip=clip;
    final long ident=Binder.clearCallingIdentity();
    final int n=clipboard.primaryClipListeners.beginBroadcast();
    try {
      for (int i=0; i < n; i++) {
        try {
          ListenerInfo li=(ListenerInfo)clipboard.primaryClipListeners.getBroadcastCookie(i);
          if (mAppOps.checkOpNoThrow(AppOpsManager.OP_READ_CLIPBOARD,li.mUid,li.mPackageName) == AppOpsManager.MODE_ALLOWED) {
            clipboard.primaryClipListeners.getBroadcastItem(i).dispatchPrimaryClipChanged();
          }
        }
 catch (        RemoteException e) {
        }
      }
    }
  finally {
      clipboard.primaryClipListeners.finishBroadcast();
      Binder.restoreCallingIdentity(ident);
    }
  }
}
Program: 1767
Project: 1767
Buggy source:
public void setPrimaryClip(ClipData clip,String callingPackage){
synchronized (this) {
    if (clip != null && clip.getItemCount() <= 0) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    if (mAppOps.noteOp(AppOpsManager.OP_WRITE_CLIPBOARD,Binder.getCallingUid(),callingPackage) != AppOpsManager.MODE_ALLOWED) {
      return;
    }
    checkDataOwnerLocked(clip,Binder.getCallingUid());
    clearActiveOwnersLocked();
    PerUserClipboard clipboard=getClipboard();
    clipboard.primaryClip=clip;
    final int n=clipboard.primaryClipListeners.beginBroadcast();
    for (int i=0; i < n; i++) {
      try {
        ListenerInfo li=(ListenerInfo)clipboard.primaryClipListeners.getBroadcastCookie(i);
        if (mAppOps.checkOpNoThrow(AppOpsManager.OP_READ_CLIPBOARD,li.mUid,li.mPackageName) == AppOpsManager.MODE_ALLOWED) {
          clipboard.primaryClipListeners.getBroadcastItem(i).dispatchPrimaryClipChanged();
        }
      }
 catch (      RemoteException e) {
      }
    }
    clipboard.primaryClipListeners.finishBroadcast();
  }
}

Fixed version (ground truth):
public void setPrimaryClip(ClipData clip,String callingPackage){
synchronized (this) {
    if (clip != null && clip.getItemCount() <= 0) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    final int callingUid=Binder.getCallingUid();
    if (mAppOps.noteOp(AppOpsManager.OP_WRITE_CLIPBOARD,callingUid,callingPackage) != AppOpsManager.MODE_ALLOWED) {
      return;
    }
    checkDataOwnerLocked(clip,callingUid);
    clearActiveOwnersLocked();
    PerUserClipboard clipboard=getClipboard();
    clipboard.primaryClip=clip;
    final long ident=Binder.clearCallingIdentity();
    final int n=clipboard.primaryClipListeners.beginBroadcast();
    try {
      for (int i=0; i < n; i++) {
        try {
          ListenerInfo li=(ListenerInfo)clipboard.primaryClipListeners.getBroadcastCookie(i);
          if (mAppOps.checkOpNoThrow(AppOpsManager.OP_READ_CLIPBOARD,li.mUid,li.mPackageName) == AppOpsManager.MODE_ALLOWED) {
            clipboard.primaryClipListeners.getBroadcastItem(i).dispatchPrimaryClipChanged();
          }
        }
 catch (        RemoteException e) {
        }
      }
    }
  finally {
      clipboard.primaryClipListeners.finishBroadcast();
      Binder.restoreCallingIdentity(ident);
    }
  }
}
Program: 1768
Project: 1768
Buggy source:
public void setPrimaryClip(ClipData clip,String callingPackage){
synchronized (this) {
    if (clip != null && clip.getItemCount() <= 0) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    if (mAppOps.noteOp(AppOpsManager.OP_WRITE_CLIPBOARD,Binder.getCallingUid(),callingPackage) != AppOpsManager.MODE_ALLOWED) {
      return;
    }
    checkDataOwnerLocked(clip,Binder.getCallingUid());
    clearActiveOwnersLocked();
    PerUserClipboard clipboard=getClipboard();
    clipboard.primaryClip=clip;
    final int n=clipboard.primaryClipListeners.beginBroadcast();
    for (int i=0; i < n; i++) {
      try {
        ListenerInfo li=(ListenerInfo)clipboard.primaryClipListeners.getBroadcastCookie(i);
        if (mAppOps.checkOpNoThrow(AppOpsManager.OP_READ_CLIPBOARD,li.mUid,li.mPackageName) == AppOpsManager.MODE_ALLOWED) {
          clipboard.primaryClipListeners.getBroadcastItem(i).dispatchPrimaryClipChanged();
        }
      }
 catch (      RemoteException e) {
      }
    }
    clipboard.primaryClipListeners.finishBroadcast();
  }
}

Fixed version (ground truth):
public void setPrimaryClip(ClipData clip,String callingPackage){
synchronized (this) {
    if (clip != null && clip.getItemCount() <= 0) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    final int callingUid=Binder.getCallingUid();
    if (mAppOps.noteOp(AppOpsManager.OP_WRITE_CLIPBOARD,callingUid,callingPackage) != AppOpsManager.MODE_ALLOWED) {
      return;
    }
    checkDataOwnerLocked(clip,callingUid);
    clearActiveOwnersLocked();
    PerUserClipboard clipboard=getClipboard();
    clipboard.primaryClip=clip;
    final long ident=Binder.clearCallingIdentity();
    final int n=clipboard.primaryClipListeners.beginBroadcast();
    try {
      for (int i=0; i < n; i++) {
        try {
          ListenerInfo li=(ListenerInfo)clipboard.primaryClipListeners.getBroadcastCookie(i);
          if (mAppOps.checkOpNoThrow(AppOpsManager.OP_READ_CLIPBOARD,li.mUid,li.mPackageName) == AppOpsManager.MODE_ALLOWED) {
            clipboard.primaryClipListeners.getBroadcastItem(i).dispatchPrimaryClipChanged();
          }
        }
 catch (        RemoteException e) {
        }
      }
    }
  finally {
      clipboard.primaryClipListeners.finishBroadcast();
      Binder.restoreCallingIdentity(ident);
    }
  }
}
Program: 1771
Project: 1771
Buggy source:
private static void printSizeValue(PrintWriter pw,long number){
  float result=number;
  String suffix="String_Node_Str";
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  String value;
  if (result < 1) {
    value=String.format("String_Node_Str",result);
  }
 else   if (result < 10) {
    value=String.format("String_Node_Str",result);
  }
 else   if (result < 100) {
    value=String.format("String_Node_Str",result);
  }
 else {
    value=String.format("String_Node_Str",result);
  }
  pw.print(value);
  pw.print(suffix);
}

Fixed version (ground truth):
static void printSizeValue(PrintWriter pw,long number){
  float result=number;
  String suffix="String_Node_Str";
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  String value;
  if (result < 1) {
    value=String.format("String_Node_Str",result);
  }
 else   if (result < 10) {
    value=String.format("String_Node_Str",result);
  }
 else   if (result < 100) {
    value=String.format("String_Node_Str",result);
  }
 else {
    value=String.format("String_Node_Str",result);
  }
  pw.print(value);
  pw.print(suffix);
}
Program: 1774
Project: 1774
Buggy source:
void print(PrintWriter pw,long overallTime,boolean full){
  double percent=((double)totalTime / (double)overallTime) * 100;
  if (percent < 1) {
    pw.print(String.format("String_Node_Str",percent));
  }
 else   if (percent < 10) {
    pw.print(String.format("String_Node_Str",percent));
  }
 else {
    pw.print(String.format("String_Node_Str",percent));
  }
  pw.print("String_Node_Str");
  if (numPss > 0) {
    pw.print("String_Node_Str");
    printSizeValue(pw,minPss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,avgPss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,maxPss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,minUss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,avgUss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,maxUss * 1024);
    if (full) {
      pw.print("String_Node_Str");
      pw.print(numPss);
    }
    pw.print("String_Node_Str");
  }
}

Fixed version (ground truth):
void print(PrintWriter pw,long overallTime,boolean full){
  printPercent(pw,(double)totalTime / (double)overallTime);
  if (numPss > 0) {
    pw.print("String_Node_Str");
    printSizeValue(pw,minPss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,avgPss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,maxPss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,minUss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,avgUss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,maxUss * 1024);
    if (full) {
      pw.print("String_Node_Str");
      pw.print(numPss);
    }
    pw.print("String_Node_Str");
  }
}
Program: 1775
Project: 1775
Buggy source:
void dumpSummaryLocked(PrintWriter pw,String reqPackage,long now){
  long totalTime=dumpSingleTime(null,null,mMemFactorDurations,mMemFactor,mStartTime,now);
  dumpFilteredSummaryLocked(pw,null,"String_Node_Str",ALL_SCREEN_ADJ,ALL_MEM_ADJ,new int[]{STATE_PERSISTENT,STATE_TOP,STATE_IMPORTANT_FOREGROUND,STATE_IMPORTANT_BACKGROUND,STATE_BACKUP,STATE_HEAVY_WEIGHT,STATE_SERVICE,STATE_RECEIVER,STATE_HOME},now,totalTime,reqPackage);
  pw.println();
  pw.println("String_Node_Str");
  dumpSingleTime(pw,"String_Node_Str",mMemFactorDurations,mMemFactor,mStartTime,now);
  pw.println();
  pw.print("String_Node_Str");
  pw.print(DateFormat.format("String_Node_Str",mTimePeriodStartClock));
  pw.println();
  pw.print("String_Node_Str");
  TimeUtils.formatDuration((mRunning ? SystemClock.elapsedRealtime() : mTimePeriodEndRealtime) - mTimePeriodStartRealtime,pw);
  if ((mFlags & FLAG_COMPLETE) != 0)   pw.print("String_Node_Str");
 else   if ((mFlags & FLAG_SHUTDOWN) != 0)   pw.print("String_Node_Str");
 else   pw.print("String_Node_Str");
  pw.println();
}

Fixed version (ground truth):
void dumpSummaryLocked(PrintWriter pw,String reqPackage,long now){
  long totalTime=dumpSingleTime(null,null,mMemFactorDurations,mMemFactor,mStartTime,now);
  dumpFilteredSummaryLocked(pw,null,"String_Node_Str",ALL_SCREEN_ADJ,ALL_MEM_ADJ,NON_CACHED_PROC_STATES,now,totalTime,reqPackage);
  pw.println();
  dumpTotalsLocked(pw,now);
}
Program: 1778
Project: 1778
Buggy source:
private static void printSizeValue(PrintWriter pw,long number){
  float result=number;
  String suffix="String_Node_Str";
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  String value;
  if (result < 1) {
    value=String.format("String_Node_Str",result);
  }
 else   if (result < 10) {
    value=String.format("String_Node_Str",result);
  }
 else   if (result < 100) {
    value=String.format("String_Node_Str",result);
  }
 else {
    value=String.format("String_Node_Str",result);
  }
  pw.print(value);
  pw.print(suffix);
}

Fixed version (ground truth):
static void printSizeValue(PrintWriter pw,long number){
  float result=number;
  String suffix="String_Node_Str";
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  if (result > 900) {
    suffix="String_Node_Str";
    result=result / 1024;
  }
  String value;
  if (result < 1) {
    value=String.format("String_Node_Str",result);
  }
 else   if (result < 10) {
    value=String.format("String_Node_Str",result);
  }
 else   if (result < 100) {
    value=String.format("String_Node_Str",result);
  }
 else {
    value=String.format("String_Node_Str",result);
  }
  pw.print(value);
  pw.print(suffix);
}
Program: 1781
Project: 1781
Buggy source:
void print(PrintWriter pw,long overallTime,boolean full){
  double percent=((double)totalTime / (double)overallTime) * 100;
  if (percent < 1) {
    pw.print(String.format("String_Node_Str",percent));
  }
 else   if (percent < 10) {
    pw.print(String.format("String_Node_Str",percent));
  }
 else {
    pw.print(String.format("String_Node_Str",percent));
  }
  pw.print("String_Node_Str");
  if (numPss > 0) {
    pw.print("String_Node_Str");
    printSizeValue(pw,minPss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,avgPss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,maxPss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,minUss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,avgUss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,maxUss * 1024);
    if (full) {
      pw.print("String_Node_Str");
      pw.print(numPss);
    }
    pw.print("String_Node_Str");
  }
}

Fixed version (ground truth):
void print(PrintWriter pw,long overallTime,boolean full){
  printPercent(pw,(double)totalTime / (double)overallTime);
  if (numPss > 0) {
    pw.print("String_Node_Str");
    printSizeValue(pw,minPss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,avgPss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,maxPss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,minUss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,avgUss * 1024);
    pw.print("String_Node_Str");
    printSizeValue(pw,maxUss * 1024);
    if (full) {
      pw.print("String_Node_Str");
      pw.print(numPss);
    }
    pw.print("String_Node_Str");
  }
}
Program: 1782
Project: 1782
Buggy source:
void dumpSummaryLocked(PrintWriter pw,String reqPackage,long now){
  long totalTime=dumpSingleTime(null,null,mMemFactorDurations,mMemFactor,mStartTime,now);
  dumpFilteredSummaryLocked(pw,null,"String_Node_Str",ALL_SCREEN_ADJ,ALL_MEM_ADJ,new int[]{STATE_PERSISTENT,STATE_TOP,STATE_IMPORTANT_FOREGROUND,STATE_IMPORTANT_BACKGROUND,STATE_BACKUP,STATE_HEAVY_WEIGHT,STATE_SERVICE,STATE_RECEIVER,STATE_HOME},now,totalTime,reqPackage);
  pw.println();
  pw.println("String_Node_Str");
  dumpSingleTime(pw,"String_Node_Str",mMemFactorDurations,mMemFactor,mStartTime,now);
  pw.println();
  pw.print("String_Node_Str");
  pw.print(DateFormat.format("String_Node_Str",mTimePeriodStartClock));
  pw.println();
  pw.print("String_Node_Str");
  TimeUtils.formatDuration((mRunning ? SystemClock.elapsedRealtime() : mTimePeriodEndRealtime) - mTimePeriodStartRealtime,pw);
  if ((mFlags & FLAG_COMPLETE) != 0)   pw.print("String_Node_Str");
 else   if ((mFlags & FLAG_SHUTDOWN) != 0)   pw.print("String_Node_Str");
 else   pw.print("String_Node_Str");
  pw.println();
}

Fixed version (ground truth):
void dumpSummaryLocked(PrintWriter pw,String reqPackage,long now){
  long totalTime=dumpSingleTime(null,null,mMemFactorDurations,mMemFactor,mStartTime,now);
  dumpFilteredSummaryLocked(pw,null,"String_Node_Str",ALL_SCREEN_ADJ,ALL_MEM_ADJ,NON_CACHED_PROC_STATES,now,totalTime,reqPackage);
  pw.println();
  dumpTotalsLocked(pw,now);
}
Program: 1783
Project: 1783
Buggy source:
private void serviceDoneExecutingLocked(ServiceRecord r,boolean inStopping){
  if (DEBUG_SERVICE)   Slog.v(TAG,"String_Node_Str" + r + "String_Node_Str"+ r.executeNesting+ "String_Node_Str"+ inStopping+ "String_Node_Str"+ r.app);
 else   if (DEBUG_SERVICE_EXECUTING)   Slog.v(TAG,"String_Node_Str" + r.shortName);
  r.executeNesting--;
  if (r.executeNesting <= 0) {
    if (r.app != null) {
      if (DEBUG_SERVICE)       Slog.v(TAG,"String_Node_Str" + r.shortName);
      r.app.executingServices.remove(r);
      if (r.app.executingServices.size() == 0) {
        if (DEBUG_SERVICE || DEBUG_SERVICE_EXECUTING)         Slog.v(TAG,"String_Node_Str" + r.shortName);
        mAm.mHandler.removeMessages(ActivityManagerService.SERVICE_TIMEOUT_MSG,r.app);
      }
      if (inStopping) {
        if (DEBUG_SERVICE)         Slog.v(TAG,"String_Node_Str" + r);
        mStoppingServices.remove(r);
        r.bindings.clear();
      }
      mAm.updateOomAdjLocked(r.app);
    }
    if (r.tracker != null) {
      r.tracker.setExecuting(false,mAm.mProcessTracker.getMemFactorLocked(),SystemClock.uptimeMillis());
    }
  }
}

Fixed version (ground truth):
private void serviceDoneExecutingLocked(ServiceRecord r,boolean inStopping){
  if (DEBUG_SERVICE)   Slog.v(TAG,"String_Node_Str" + r + "String_Node_Str"+ r.executeNesting+ "String_Node_Str"+ inStopping+ "String_Node_Str"+ r.app);
 else   if (DEBUG_SERVICE_EXECUTING)   Slog.v(TAG,"String_Node_Str" + r.shortName);
  r.executeNesting--;
  if (r.executeNesting <= 0) {
    if (r.app != null) {
      if (DEBUG_SERVICE)       Slog.v(TAG,"String_Node_Str" + r.shortName);
      r.app.executingServices.remove(r);
      if (r.app.executingServices.size() == 0) {
        if (DEBUG_SERVICE || DEBUG_SERVICE_EXECUTING)         Slog.v(TAG,"String_Node_Str" + r.shortName);
        mAm.mHandler.removeMessages(ActivityManagerService.SERVICE_TIMEOUT_MSG,r.app);
      }
      if (inStopping) {
        if (DEBUG_SERVICE)         Slog.v(TAG,"String_Node_Str" + r);
        mStoppingServices.remove(r);
        r.bindings.clear();
      }
      mAm.updateOomAdjLocked(r.app);
    }
    if (r.tracker != null) {
      r.tracker.setExecuting(false,mAm.mProcessTracker.getMemFactorLocked(),SystemClock.uptimeMillis());
      if (inStopping) {
        r.tracker.makeInactive();
        r.tracker=null;
      }
    }
  }
}
Program: 1785
Project: 1785
Buggy source:
private final void bumpServiceExecutingLocked(ServiceRecord r,String why){
  if (DEBUG_SERVICE)   Log.v(TAG,"String_Node_Str" + why + "String_Node_Str"+ r+ "String_Node_Str"+ r.app);
 else   if (DEBUG_SERVICE_EXECUTING)   Log.v(TAG,"String_Node_Str" + why + "String_Node_Str"+ r.shortName);
  long now=SystemClock.uptimeMillis();
  if (r.executeNesting == 0) {
    if (r.tracker != null) {
      r.tracker.setExecuting(true,mAm.mProcessTracker.getMemFactorLocked(),now);
    }
    if (r.app != null) {
      if (r.app.executingServices.size() == 0) {
        Message msg=mAm.mHandler.obtainMessage(ActivityManagerService.SERVICE_TIMEOUT_MSG);
        msg.obj=r.app;
        mAm.mHandler.sendMessageAtTime(msg,now + SERVICE_TIMEOUT);
      }
      r.app.executingServices.add(r);
    }
  }
  r.executeNesting++;
  r.executingStart=now;
}

Fixed version (ground truth):
private final void bumpServiceExecutingLocked(ServiceRecord r,String why){
  if (DEBUG_SERVICE)   Log.v(TAG,"String_Node_Str" + why + "String_Node_Str"+ r+ "String_Node_Str"+ r.app);
 else   if (DEBUG_SERVICE_EXECUTING)   Log.v(TAG,"String_Node_Str" + why + "String_Node_Str"+ r.shortName);
  long now=SystemClock.uptimeMillis();
  if (r.executeNesting == 0) {
    ProcessTracker.ServiceState stracker=r.getTracker();
    if (stracker != null) {
      stracker.setExecuting(true,mAm.mProcessTracker.getMemFactorLocked(),now);
    }
    if (r.app != null) {
      if (r.app.executingServices.size() == 0) {
        Message msg=mAm.mHandler.obtainMessage(ActivityManagerService.SERVICE_TIMEOUT_MSG);
        msg.obj=r.app;
        mAm.mHandler.sendMessageAtTime(msg,now + SERVICE_TIMEOUT);
      }
      r.app.executingServices.add(r);
    }
  }
  r.executeNesting++;
  r.executingStart=now;
}