nus-yam/ex-repair huggingface dataset:
Program: 1789
Project: 1789
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: 1791
Project: 1791
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;
}
Program: 1795
Project: 1795
Buggy source:
private Method getMethod(View view,String methodName,Class<?> paramType){
  Method method;
  Class<? extends View> klass=view.getClass();
synchronized (sMethodsLock) {
    ArrayMap<MutablePair<String,Class<?>>,Method> methods=sMethods.get(klass);
    if (methods == null) {
      methods=new ArrayMap<MutablePair<String,Class<?>>,Method>();
      sMethods.put(klass,methods);
    }
    mPair.first=methodName;
    mPair.second=paramType;
    method=methods.get(mPair);
    if (method == null) {
      try {
        method=klass.getMethod(methodName,paramType);
      }
 catch (      NoSuchMethodException ex) {
        throw new ActionException("String_Node_Str" + klass.getName() + "String_Node_Str"+ methodName+ getParameters(paramType));
      }
      if (!method.isAnnotationPresent(RemotableViewMethod.class)) {
        throw new ActionException("String_Node_Str" + klass.getName() + "String_Node_Str"+ methodName+ getParameters(paramType));
      }
      methods.put(new MutablePair<String,Class<?>>(methodName,paramType),method);
    }
  }
  return method;
}

Fixed version (ground truth):
private Method getMethod(View view,String methodName,Class<?> paramType){
  Method method;
  Class<? extends View> klass=view.getClass();
synchronized (sMethodsLock) {
    ArrayMap<MutablePair<String,Class<?>>,Method> methods=sMethods.get(klass);
    if (methods == null) {
      methods=new ArrayMap<MutablePair<String,Class<?>>,Method>();
      sMethods.put(klass,methods);
    }
    mPair.first=methodName;
    mPair.second=paramType;
    method=methods.get(mPair);
    if (method == null) {
      try {
        if (paramType == null) {
          method=klass.getMethod(methodName);
        }
 else {
          method=klass.getMethod(methodName,paramType);
        }
      }
 catch (      NoSuchMethodException ex) {
        throw new ActionException("String_Node_Str" + klass.getName() + "String_Node_Str"+ methodName+ getParameters(paramType));
      }
      if (!method.isAnnotationPresent(RemotableViewMethod.class)) {
        throw new ActionException("String_Node_Str" + klass.getName() + "String_Node_Str"+ methodName+ getParameters(paramType));
      }
      methods.put(new MutablePair<String,Class<?>>(methodName,paramType),method);
    }
  }
  return method;
}
Program: 1796
Project: 1796
Buggy source:
/** 
 * If the underlying data are stored as a Parcel, unparcel them using the currently assigned class loader.
 */
synchronized void unparcel(){
  if (mParcelledData == null) {
    return;
  }
  int N=mParcelledData.readInt();
  if (N < 0) {
    return;
  }
  if (mMap == null) {
    mMap=new ArrayMap<String,Object>(N);
  }
 else {
    mMap.ensureCapacity(N);
  }
  mParcelledData.readArrayMapInternal(mMap,N,mClassLoader);
  mParcelledData.recycle();
  mParcelledData=null;
}

Fixed version (ground truth):
/** 
 * If the underlying data are stored as a Parcel, unparcel them using the currently assigned class loader.
 */
synchronized void unparcel(){
  if (mParcelledData == null) {
    return;
  }
  int N=mParcelledData.readInt();
  if (N < 0) {
    return;
  }
  if (mMap == null) {
    mMap=new ArrayMap<String,Object>(N);
  }
 else {
    mMap.erase();
    mMap.ensureCapacity(N);
  }
  mParcelledData.readArrayMapInternal(mMap,N,mClassLoader);
  mParcelledData.recycle();
  mParcelledData=null;
}
Program: 1797
Project: 1797
Buggy source:
/** 
 * Special fast path for appending items to the end of the array without validation. The array must already be large enough to contain the item.
 * @hide
 */
public void append(K key,V value){
  int index=mSize;
  final int hash=key.hashCode();
  if (index >= mHashes.length) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (index > 0 && mHashes[index - 1] > hash) {
    throw new IllegalArgumentException("String_Node_Str" + hash + "String_Node_Str"+ mHashes[index - 1]);
  }
  mSize=index + 1;
  mHashes[index]=hash;
  index<<=1;
  mArray[index]=key;
  mArray[index + 1]=value;
}

Fixed version (ground truth):
/** 
 * Special fast path for appending items to the end of the array without validation. The array must already be large enough to contain the item.
 * @hide
 */
public void append(K key,V value){
  int index=mSize;
  final int hash=key.hashCode();
  if (index >= mHashes.length) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (index > 0 && mHashes[index - 1] > hash) {
    RuntimeException e=new RuntimeException("String_Node_Str");
    e.fillInStackTrace();
    Log.w(TAG,"String_Node_Str" + hash + "String_Node_Str"+ mHashes[index - 1]+ "String_Node_Str"+ index+ "String_Node_Str"+ key,e);
    put(key,value);
    return;
  }
  mSize=index + 1;
  mHashes[index]=hash;
  index<<=1;
  mArray[index]=key;
  mArray[index + 1]=value;
}
Program: 1798
Project: 1798
Buggy source:
@Override public SharedPreferences getSharedPreferences(String name,int mode){
  SharedPreferencesImpl sp;
synchronized (mSync) {
    if (sSharedPrefs == null) {
      sSharedPrefs=new ArrayMap<String,ArrayMap<String,SharedPreferencesImpl>>();
    }
    final String packageName=getPackageName();
    ArrayMap<String,SharedPreferencesImpl> packagePrefs=sSharedPrefs.get(packageName);
    if (packagePrefs == null) {
      packagePrefs=new ArrayMap<String,SharedPreferencesImpl>();
      sSharedPrefs.put(packageName,packagePrefs);
    }
    sp=packagePrefs.get(name);
    if (sp == null) {
      File prefsFile=getSharedPrefsFile(name);
      sp=new SharedPreferencesImpl(prefsFile,mode);
      packagePrefs.put(name,sp);
      return sp;
    }
  }
  if ((mode & Context.MODE_MULTI_PROCESS) != 0 || getApplicationInfo().targetSdkVersion < android.os.Build.VERSION_CODES.HONEYCOMB) {
    sp.startReloadIfChangedUnexpectedly();
  }
  return sp;
}

Fixed version (ground truth):
@Override public SharedPreferences getSharedPreferences(String name,int mode){
  SharedPreferencesImpl sp;
synchronized (mSync) {
    if (sSharedPrefs == null) {
      sSharedPrefs=new ArrayMap<String,ArrayMap<String,SharedPreferencesImpl>>();
    }
    final String packageName=getPackageName();
    ArrayMap<String,SharedPreferencesImpl> packagePrefs=sSharedPrefs.get(packageName);
    if (packagePrefs == null) {
      packagePrefs=new ArrayMap<String,SharedPreferencesImpl>();
      sSharedPrefs.put(packageName,packagePrefs);
    }
    if (mPackageInfo.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.KEY_LIME_PIE) {
      if (name == null) {
        name="String_Node_Str";
      }
    }
    sp=packagePrefs.get(name);
    if (sp == null) {
      File prefsFile=getSharedPrefsFile(name);
      sp=new SharedPreferencesImpl(prefsFile,mode);
      packagePrefs.put(name,sp);
      return sp;
    }
  }
  if ((mode & Context.MODE_MULTI_PROCESS) != 0 || getApplicationInfo().targetSdkVersion < android.os.Build.VERSION_CODES.HONEYCOMB) {
    sp.startReloadIfChangedUnexpectedly();
  }
  return sp;
}
Program: 1799
Project: 1799
Buggy source:
@Override public SharedPreferences getSharedPreferences(String name,int mode){
  SharedPreferencesImpl sp;
synchronized (mSync) {
    if (sSharedPrefs == null) {
      sSharedPrefs=new ArrayMap<String,ArrayMap<String,SharedPreferencesImpl>>();
    }
    final String packageName=getPackageName();
    ArrayMap<String,SharedPreferencesImpl> packagePrefs=sSharedPrefs.get(packageName);
    if (packagePrefs == null) {
      packagePrefs=new ArrayMap<String,SharedPreferencesImpl>();
      sSharedPrefs.put(packageName,packagePrefs);
    }
    sp=packagePrefs.get(name);
    if (sp == null) {
      File prefsFile=getSharedPrefsFile(name);
      sp=new SharedPreferencesImpl(prefsFile,mode);
      packagePrefs.put(name,sp);
      return sp;
    }
  }
  if ((mode & Context.MODE_MULTI_PROCESS) != 0 || getApplicationInfo().targetSdkVersion < android.os.Build.VERSION_CODES.HONEYCOMB) {
    sp.startReloadIfChangedUnexpectedly();
  }
  return sp;
}

Fixed version (ground truth):
@Override public SharedPreferences getSharedPreferences(String name,int mode){
  SharedPreferencesImpl sp;
synchronized (mSync) {
    if (sSharedPrefs == null) {
      sSharedPrefs=new ArrayMap<String,ArrayMap<String,SharedPreferencesImpl>>();
    }
    final String packageName=getPackageName();
    ArrayMap<String,SharedPreferencesImpl> packagePrefs=sSharedPrefs.get(packageName);
    if (packagePrefs == null) {
      packagePrefs=new ArrayMap<String,SharedPreferencesImpl>();
      sSharedPrefs.put(packageName,packagePrefs);
    }
    if (mPackageInfo.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.KEY_LIME_PIE) {
      if (name == null) {
        name="String_Node_Str";
      }
    }
    sp=packagePrefs.get(name);
    if (sp == null) {
      File prefsFile=getSharedPrefsFile(name);
      sp=new SharedPreferencesImpl(prefsFile,mode);
      packagePrefs.put(name,sp);
      return sp;
    }
  }
  if ((mode & Context.MODE_MULTI_PROCESS) != 0 || getApplicationInfo().targetSdkVersion < android.os.Build.VERSION_CODES.HONEYCOMB) {
    sp.startReloadIfChangedUnexpectedly();
  }
  return sp;
}
Program: 1802
Project: 1802
Buggy source:
public String toString(){
  if (stringName != null) {
    return stringName;
  }
  StringBuilder sb=new StringBuilder(128);
  sb.append("String_Node_Str");
  sb.append(Integer.toHexString(System.identityHashCode(this)));
  sb.append("String_Node_Str");
  sb.append(binding.client.userId);
  sb.append(' ');
  if ((flags & Context.BIND_AUTO_CREATE) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_DEBUG_UNBIND) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_NOT_FOREGROUND) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_ABOVE_CLIENT) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_ALLOW_OOM_MANAGEMENT) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_WAIVE_PRIORITY) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_IMPORTANT) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_ADJUST_WITH_ACTIVITY) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_NOT_VISIBLE) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_VISIBLE) != 0) {
    sb.append("String_Node_Str");
  }
  if (serviceDead) {
    sb.append("String_Node_Str");
  }
  sb.append(binding.service.shortName);
  sb.append("String_Node_Str");
  sb.append(Integer.toHexString(System.identityHashCode(conn.asBinder())));
  sb.append('}');
  return stringName=sb.toString();
}

Fixed version (ground truth):
public String toString(){
  if (stringName != null) {
    return stringName;
  }
  StringBuilder sb=new StringBuilder(128);
  sb.append("String_Node_Str");
  sb.append(Integer.toHexString(System.identityHashCode(this)));
  sb.append("String_Node_Str");
  sb.append(binding.client.userId);
  sb.append(' ');
  if ((flags & Context.BIND_AUTO_CREATE) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_DEBUG_UNBIND) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_NOT_FOREGROUND) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_ABOVE_CLIENT) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_ALLOW_OOM_MANAGEMENT) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_WAIVE_PRIORITY) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_IMPORTANT) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_ADJUST_WITH_ACTIVITY) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_VISIBLE) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_SHOWING_UI) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_NOT_VISIBLE) != 0) {
    sb.append("String_Node_Str");
  }
  if (serviceDead) {
    sb.append("String_Node_Str");
  }
  sb.append(binding.service.shortName);
  sb.append("String_Node_Str");
  sb.append(Integer.toHexString(System.identityHashCode(conn.asBinder())));
  sb.append('}');
  return stringName=sb.toString();
}
Program: 1804
Project: 1804
Buggy source:
@Override public SharedPreferences getSharedPreferences(String name,int mode){
  SharedPreferencesImpl sp;
synchronized (mSync) {
    if (sSharedPrefs == null) {
      sSharedPrefs=new ArrayMap<String,ArrayMap<String,SharedPreferencesImpl>>();
    }
    final String packageName=getPackageName();
    ArrayMap<String,SharedPreferencesImpl> packagePrefs=sSharedPrefs.get(packageName);
    if (packagePrefs == null) {
      packagePrefs=new ArrayMap<String,SharedPreferencesImpl>();
      sSharedPrefs.put(packageName,packagePrefs);
    }
    sp=packagePrefs.get(name);
    if (sp == null) {
      File prefsFile=getSharedPrefsFile(name);
      sp=new SharedPreferencesImpl(prefsFile,mode);
      packagePrefs.put(name,sp);
      return sp;
    }
  }
  if ((mode & Context.MODE_MULTI_PROCESS) != 0 || getApplicationInfo().targetSdkVersion < android.os.Build.VERSION_CODES.HONEYCOMB) {
    sp.startReloadIfChangedUnexpectedly();
  }
  return sp;
}

Fixed version (ground truth):
@Override public SharedPreferences getSharedPreferences(String name,int mode){
  SharedPreferencesImpl sp;
synchronized (mSync) {
    if (sSharedPrefs == null) {
      sSharedPrefs=new ArrayMap<String,ArrayMap<String,SharedPreferencesImpl>>();
    }
    final String packageName=getPackageName();
    ArrayMap<String,SharedPreferencesImpl> packagePrefs=sSharedPrefs.get(packageName);
    if (packagePrefs == null) {
      packagePrefs=new ArrayMap<String,SharedPreferencesImpl>();
      sSharedPrefs.put(packageName,packagePrefs);
    }
    if (mPackageInfo.getApplicationInfo().targetSdkVersion < Build.VERSION_CODES.KEY_LIME_PIE) {
      if (name == null) {
        name="String_Node_Str";
      }
    }
    sp=packagePrefs.get(name);
    if (sp == null) {
      File prefsFile=getSharedPrefsFile(name);
      sp=new SharedPreferencesImpl(prefsFile,mode);
      packagePrefs.put(name,sp);
      return sp;
    }
  }
  if ((mode & Context.MODE_MULTI_PROCESS) != 0 || getApplicationInfo().targetSdkVersion < android.os.Build.VERSION_CODES.HONEYCOMB) {
    sp.startReloadIfChangedUnexpectedly();
  }
  return sp;
}
Program: 1807
Project: 1807
Buggy source:
public String toString(){
  if (stringName != null) {
    return stringName;
  }
  StringBuilder sb=new StringBuilder(128);
  sb.append("String_Node_Str");
  sb.append(Integer.toHexString(System.identityHashCode(this)));
  sb.append("String_Node_Str");
  sb.append(binding.client.userId);
  sb.append(' ');
  if ((flags & Context.BIND_AUTO_CREATE) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_DEBUG_UNBIND) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_NOT_FOREGROUND) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_ABOVE_CLIENT) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_ALLOW_OOM_MANAGEMENT) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_WAIVE_PRIORITY) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_IMPORTANT) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_ADJUST_WITH_ACTIVITY) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_NOT_VISIBLE) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_VISIBLE) != 0) {
    sb.append("String_Node_Str");
  }
  if (serviceDead) {
    sb.append("String_Node_Str");
  }
  sb.append(binding.service.shortName);
  sb.append("String_Node_Str");
  sb.append(Integer.toHexString(System.identityHashCode(conn.asBinder())));
  sb.append('}');
  return stringName=sb.toString();
}

Fixed version (ground truth):
public String toString(){
  if (stringName != null) {
    return stringName;
  }
  StringBuilder sb=new StringBuilder(128);
  sb.append("String_Node_Str");
  sb.append(Integer.toHexString(System.identityHashCode(this)));
  sb.append("String_Node_Str");
  sb.append(binding.client.userId);
  sb.append(' ');
  if ((flags & Context.BIND_AUTO_CREATE) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_DEBUG_UNBIND) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_NOT_FOREGROUND) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_ABOVE_CLIENT) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_ALLOW_OOM_MANAGEMENT) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_WAIVE_PRIORITY) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_IMPORTANT) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_ADJUST_WITH_ACTIVITY) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_VISIBLE) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_SHOWING_UI) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_NOT_VISIBLE) != 0) {
    sb.append("String_Node_Str");
  }
  if (serviceDead) {
    sb.append("String_Node_Str");
  }
  sb.append(binding.service.shortName);
  sb.append("String_Node_Str");
  sb.append(Integer.toHexString(System.identityHashCode(conn.asBinder())));
  sb.append('}');
  return stringName=sb.toString();
}
Program: 1811
Project: 1811
Buggy source:
public String toString(){
  if (stringName != null) {
    return stringName;
  }
  StringBuilder sb=new StringBuilder(128);
  sb.append("String_Node_Str");
  sb.append(Integer.toHexString(System.identityHashCode(this)));
  sb.append("String_Node_Str");
  sb.append(binding.client.userId);
  sb.append(' ');
  if ((flags & Context.BIND_AUTO_CREATE) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_DEBUG_UNBIND) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_NOT_FOREGROUND) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_ABOVE_CLIENT) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_ALLOW_OOM_MANAGEMENT) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_WAIVE_PRIORITY) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_IMPORTANT) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_ADJUST_WITH_ACTIVITY) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_NOT_VISIBLE) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_VISIBLE) != 0) {
    sb.append("String_Node_Str");
  }
  if (serviceDead) {
    sb.append("String_Node_Str");
  }
  sb.append(binding.service.shortName);
  sb.append("String_Node_Str");
  sb.append(Integer.toHexString(System.identityHashCode(conn.asBinder())));
  sb.append('}');
  return stringName=sb.toString();
}

Fixed version (ground truth):
public String toString(){
  if (stringName != null) {
    return stringName;
  }
  StringBuilder sb=new StringBuilder(128);
  sb.append("String_Node_Str");
  sb.append(Integer.toHexString(System.identityHashCode(this)));
  sb.append("String_Node_Str");
  sb.append(binding.client.userId);
  sb.append(' ');
  if ((flags & Context.BIND_AUTO_CREATE) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_DEBUG_UNBIND) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_NOT_FOREGROUND) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_ABOVE_CLIENT) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_ALLOW_OOM_MANAGEMENT) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_WAIVE_PRIORITY) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_IMPORTANT) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_ADJUST_WITH_ACTIVITY) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_VISIBLE) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_SHOWING_UI) != 0) {
    sb.append("String_Node_Str");
  }
  if ((flags & Context.BIND_NOT_VISIBLE) != 0) {
    sb.append("String_Node_Str");
  }
  if (serviceDead) {
    sb.append("String_Node_Str");
  }
  sb.append(binding.service.shortName);
  sb.append("String_Node_Str");
  sb.append(Integer.toHexString(System.identityHashCode(conn.asBinder())));
  sb.append('}');
  return stringName=sb.toString();
}
Program: 1815
Project: 1815
Buggy source:
/** 
 * This is called internally once all animations have been set up by the transition hierarchy. \
 * @hide
 */
protected void runAnimations(){
  startTransition();
  for (int i=0; i < mPlayStartValuesList.size(); ++i) {
    TransitionValues start=mPlayStartValuesList.get(i);
    TransitionValues end=mPlayEndValuesList.get(i);
    startTransition();
    runAnimator(mAnimatorMap.get(new Pair(start,end)));
  }
  mPlayStartValuesList.clear();
  mPlayEndValuesList.clear();
  mAnimatorMap.clear();
  endTransition();
}

Fixed version (ground truth):
/** 
 * This is called internally once all animations have been set up by the transition hierarchy. \
 * @hide
 */
protected void runAnimations(){
  if (DBG && mPlayStartValuesList.size() > 0) {
    Log.d(LOG_TAG,"String_Node_Str" + mPlayStartValuesList.size() + "String_Node_Str"+ this);
  }
  startTransition();
  for (int i=0; i < mPlayStartValuesList.size(); ++i) {
    TransitionValues start=mPlayStartValuesList.get(i);
    TransitionValues end=mPlayEndValuesList.get(i);
    Animator anim=mAnimatorMap.get(new Pair(start,end));
    if (DBG) {
      Log.d(LOG_TAG,"String_Node_Str" + anim);
    }
    startTransition();
    runAnimator(anim);
  }
  mPlayStartValuesList.clear();
  mPlayEndValuesList.clear();
  mAnimatorMap.clear();
  endTransition();
}
Program: 1816
Project: 1816
Buggy source:
String toString(String indent){
  String result=indent + getClass().getSimpleName() + "String_Node_Str"+ Integer.toHexString(hashCode())+ "String_Node_Str";
  result+="String_Node_Str" + mDuration + "String_Node_Str";
  result+="String_Node_Str" + mStartDelay + "String_Node_Str";
  result+="String_Node_Str" + mInterpolator + "String_Node_Str";
  result+="String_Node_Str";
  if (mTargetIds != null) {
    for (int i=0; i < mTargetIds.length; ++i) {
      if (i > 0) {
        result+="String_Node_Str";
      }
      result+=mTargetIds[i];
    }
  }
  if (mTargets != null) {
    for (int i=0; i < mTargets.length; ++i) {
      if (i > 0) {
        result+="String_Node_Str";
      }
      result+=mTargets[i];
    }
  }
  result+="String_Node_Str";
  return result;
}

Fixed version (ground truth):
String toString(String indent){
  String result=indent + getClass().getSimpleName() + "String_Node_Str"+ Integer.toHexString(hashCode())+ "String_Node_Str";
  if (mDuration != -1) {
    result+="String_Node_Str" + mDuration + "String_Node_Str";
  }
  if (mStartDelay != -1) {
    result+="String_Node_Str" + mStartDelay + "String_Node_Str";
  }
  if (mInterpolator != null) {
    result+="String_Node_Str" + mInterpolator + "String_Node_Str";
  }
  if (mTargetIds != null || mTargets != null) {
    result+="String_Node_Str";
    if (mTargetIds != null) {
      for (int i=0; i < mTargetIds.length; ++i) {
        if (i > 0) {
          result+="String_Node_Str";
        }
        result+=mTargetIds[i];
      }
    }
    if (mTargets != null) {
      for (int i=0; i < mTargets.length; ++i) {
        if (i > 0) {
          result+="String_Node_Str";
        }
        result+=mTargets[i];
      }
    }
    result+="String_Node_Str";
  }
  return result;
}
Program: 1817
Project: 1817
Buggy source:
private static void sceneChangeRunTransition(final ViewGroup sceneRoot,final Transition transition){
  if (transition != null) {
    final ViewTreeObserver observer=sceneRoot.getViewTreeObserver();
    observer.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener(){
      public boolean onPreDraw(){
        sceneRoot.getViewTreeObserver().removeOnPreDrawListener(this);
        sRunningTransitions.put(sceneRoot,transition);
        transition.addListener(new Transition.TransitionListenerAdapter(){
          @Override public void onTransitionEnd(          Transition transition){
            sRunningTransitions.remove(sceneRoot);
          }
        }
);
        transition.captureValues(sceneRoot,false);
        transition.playTransition(sceneRoot);
        return true;
      }
    }
);
  }
}

Fixed version (ground truth):
private static void sceneChangeRunTransition(final ViewGroup sceneRoot,final Transition transition){
  if (transition != null) {
    final ViewTreeObserver observer=sceneRoot.getViewTreeObserver();
    observer.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener(){
      public boolean onPreDraw(){
        sceneRoot.getViewTreeObserver().removeOnPreDrawListener(this);
        sPendingTransitions.remove(sceneRoot);
        sRunningTransitions.put(sceneRoot,transition);
        transition.addListener(new Transition.TransitionListenerAdapter(){
          @Override public void onTransitionEnd(          Transition transition){
            sRunningTransitions.remove(sceneRoot);
          }
        }
);
        transition.captureValues(sceneRoot,false);
        transition.playTransition(sceneRoot);
        return true;
      }
    }
);
  }
}
Program: 1819
Project: 1819
Buggy source:
public boolean onPreDraw(){
  sceneRoot.getViewTreeObserver().removeOnPreDrawListener(this);
  sRunningTransitions.put(sceneRoot,transition);
  transition.addListener(new Transition.TransitionListenerAdapter(){
    @Override public void onTransitionEnd(    Transition transition){
      sRunningTransitions.remove(sceneRoot);
    }
  }
);
  transition.captureValues(sceneRoot,false);
  transition.playTransition(sceneRoot);
  return true;
}

Fixed version (ground truth):
public boolean onPreDraw(){
  sceneRoot.getViewTreeObserver().removeOnPreDrawListener(this);
  sPendingTransitions.remove(sceneRoot);
  sRunningTransitions.put(sceneRoot,transition);
  transition.addListener(new Transition.TransitionListenerAdapter(){
    @Override public void onTransitionEnd(    Transition transition){
      sRunningTransitions.remove(sceneRoot);
    }
  }
);
  transition.captureValues(sceneRoot,false);
  transition.playTransition(sceneRoot);
  return true;
}
Program: 1822
Project: 1822
Buggy source:
/** 
 * This is called internally once all animations have been set up by the transition hierarchy. \
 * @hide
 */
protected void runAnimations(){
  startTransition();
  for (int i=0; i < mPlayStartValuesList.size(); ++i) {
    TransitionValues start=mPlayStartValuesList.get(i);
    TransitionValues end=mPlayEndValuesList.get(i);
    startTransition();
    runAnimator(mAnimatorMap.get(new Pair(start,end)));
  }
  mPlayStartValuesList.clear();
  mPlayEndValuesList.clear();
  mAnimatorMap.clear();
  endTransition();
}

Fixed version (ground truth):
/** 
 * This is called internally once all animations have been set up by the transition hierarchy. \
 * @hide
 */
protected void runAnimations(){
  if (DBG && mPlayStartValuesList.size() > 0) {
    Log.d(LOG_TAG,"String_Node_Str" + mPlayStartValuesList.size() + "String_Node_Str"+ this);
  }
  startTransition();
  for (int i=0; i < mPlayStartValuesList.size(); ++i) {
    TransitionValues start=mPlayStartValuesList.get(i);
    TransitionValues end=mPlayEndValuesList.get(i);
    Animator anim=mAnimatorMap.get(new Pair(start,end));
    if (DBG) {
      Log.d(LOG_TAG,"String_Node_Str" + anim);
    }
    startTransition();
    runAnimator(anim);
  }
  mPlayStartValuesList.clear();
  mPlayEndValuesList.clear();
  mAnimatorMap.clear();
  endTransition();
}
Program: 1823
Project: 1823
Buggy source:
String toString(String indent){
  String result=indent + getClass().getSimpleName() + "String_Node_Str"+ Integer.toHexString(hashCode())+ "String_Node_Str";
  result+="String_Node_Str" + mDuration + "String_Node_Str";
  result+="String_Node_Str" + mStartDelay + "String_Node_Str";
  result+="String_Node_Str" + mInterpolator + "String_Node_Str";
  result+="String_Node_Str";
  if (mTargetIds != null) {
    for (int i=0; i < mTargetIds.length; ++i) {
      if (i > 0) {
        result+="String_Node_Str";
      }
      result+=mTargetIds[i];
    }
  }
  if (mTargets != null) {
    for (int i=0; i < mTargets.length; ++i) {
      if (i > 0) {
        result+="String_Node_Str";
      }
      result+=mTargets[i];
    }
  }
  result+="String_Node_Str";
  return result;
}

Fixed version (ground truth):
String toString(String indent){
  String result=indent + getClass().getSimpleName() + "String_Node_Str"+ Integer.toHexString(hashCode())+ "String_Node_Str";
  if (mDuration != -1) {
    result+="String_Node_Str" + mDuration + "String_Node_Str";
  }
  if (mStartDelay != -1) {
    result+="String_Node_Str" + mStartDelay + "String_Node_Str";
  }
  if (mInterpolator != null) {
    result+="String_Node_Str" + mInterpolator + "String_Node_Str";
  }
  if (mTargetIds != null || mTargets != null) {
    result+="String_Node_Str";
    if (mTargetIds != null) {
      for (int i=0; i < mTargetIds.length; ++i) {
        if (i > 0) {
          result+="String_Node_Str";
        }
        result+=mTargetIds[i];
      }
    }
    if (mTargets != null) {
      for (int i=0; i < mTargets.length; ++i) {
        if (i > 0) {
          result+="String_Node_Str";
        }
        result+=mTargets[i];
      }
    }
    result+="String_Node_Str";
  }
  return result;
}
Program: 1824
Project: 1824
Buggy source:
private static void sceneChangeRunTransition(final ViewGroup sceneRoot,final Transition transition){
  if (transition != null) {
    final ViewTreeObserver observer=sceneRoot.getViewTreeObserver();
    observer.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener(){
      public boolean onPreDraw(){
        sceneRoot.getViewTreeObserver().removeOnPreDrawListener(this);
        sRunningTransitions.put(sceneRoot,transition);
        transition.addListener(new Transition.TransitionListenerAdapter(){
          @Override public void onTransitionEnd(          Transition transition){
            sRunningTransitions.remove(sceneRoot);
          }
        }
);
        transition.captureValues(sceneRoot,false);
        transition.playTransition(sceneRoot);
        return true;
      }
    }
);
  }
}

Fixed version (ground truth):
private static void sceneChangeRunTransition(final ViewGroup sceneRoot,final Transition transition){
  if (transition != null) {
    final ViewTreeObserver observer=sceneRoot.getViewTreeObserver();
    observer.addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener(){
      public boolean onPreDraw(){
        sceneRoot.getViewTreeObserver().removeOnPreDrawListener(this);
        sPendingTransitions.remove(sceneRoot);
        sRunningTransitions.put(sceneRoot,transition);
        transition.addListener(new Transition.TransitionListenerAdapter(){
          @Override public void onTransitionEnd(          Transition transition){
            sRunningTransitions.remove(sceneRoot);
          }
        }
);
        transition.captureValues(sceneRoot,false);
        transition.playTransition(sceneRoot);
        return true;
      }
    }
);
  }
}
Program: 1826
Project: 1826
Buggy source:
public boolean onPreDraw(){
  sceneRoot.getViewTreeObserver().removeOnPreDrawListener(this);
  sRunningTransitions.put(sceneRoot,transition);
  transition.addListener(new Transition.TransitionListenerAdapter(){
    @Override public void onTransitionEnd(    Transition transition){
      sRunningTransitions.remove(sceneRoot);
    }
  }
);
  transition.captureValues(sceneRoot,false);
  transition.playTransition(sceneRoot);
  return true;
}

Fixed version (ground truth):
public boolean onPreDraw(){
  sceneRoot.getViewTreeObserver().removeOnPreDrawListener(this);
  sPendingTransitions.remove(sceneRoot);
  sRunningTransitions.put(sceneRoot,transition);
  transition.addListener(new Transition.TransitionListenerAdapter(){
    @Override public void onTransitionEnd(    Transition transition){
      sRunningTransitions.remove(sceneRoot);
    }
  }
);
  transition.captureValues(sceneRoot,false);
  transition.playTransition(sceneRoot);
  return true;
}
Program: 1827
Project: 1827
Buggy source:
public void run(){
  mLastEventTimeMillis=SystemClock.uptimeMillis();
  AccessibilityEvent event=AccessibilityEvent.obtain();
  event.setEventType(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
  event.setContentChangeType(AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE);
  mSource.sendAccessibilityEventUnchecked(event);
  mSource.resetSubtreeAccessibilityStateChanged();
  mSource=null;
}

Fixed version (ground truth):
public void run(){
  if (AccessibilityManager.getInstance(mContext).isEnabled()) {
    mLastEventTimeMillis=SystemClock.uptimeMillis();
    AccessibilityEvent event=AccessibilityEvent.obtain();
    event.setEventType(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
    event.setContentChangeType(AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE);
    mSource.sendAccessibilityEventUnchecked(event);
  }
 else {
    mLastEventTimeMillis=0;
  }
  mSource.resetSubtreeAccessibilityStateChanged();
  mSource=null;
}
Program: 1828
Project: 1828
Buggy source:
/** 
 * Caches an   {@link AccessibilityNodeInfo} given its accessibility node id.
 * @param info The {@link AccessibilityNodeInfo} to cache.
 */
public void add(AccessibilityNodeInfo info){
  if (ENABLED) {
synchronized (mLock) {
      if (DEBUG) {
      }
      final long sourceId=info.getSourceNodeId();
      AccessibilityNodeInfo oldInfo=mCacheImpl.get(sourceId);
      if (oldInfo != null) {
        SparseLongArray oldChildrenIds=oldInfo.getChildNodeIds();
        SparseLongArray newChildrenIds=info.getChildNodeIds();
        final int oldChildCount=oldChildrenIds.size();
        for (int i=0; i < oldChildCount; i++) {
          final long oldChildId=oldChildrenIds.valueAt(i);
          if (newChildrenIds.indexOfValue(oldChildId) < 0) {
            clearSubTreeLocked(oldChildId);
          }
        }
        final long oldParentId=oldInfo.getParentNodeId();
        if (info.getParentNodeId() != oldParentId) {
          clearSubTreeLocked(oldParentId);
        }
      }
      AccessibilityNodeInfo clone=AccessibilityNodeInfo.obtain(info);
      mCacheImpl.put(sourceId,clone);
    }
  }
}

Fixed version (ground truth):
/** 
 * Caches an   {@link AccessibilityNodeInfo} given its accessibility node id.
 * @param info The {@link AccessibilityNodeInfo} to cache.
 */
public void add(AccessibilityNodeInfo info){
  if (ENABLED) {
synchronized (mLock) {
      if (DEBUG) {
        Log.i(LOG_TAG,"String_Node_Str" + info + "String_Node_Str");
      }
      final long sourceId=info.getSourceNodeId();
      AccessibilityNodeInfo oldInfo=mCacheImpl.get(sourceId);
      if (oldInfo != null) {
        SparseLongArray oldChildrenIds=oldInfo.getChildNodeIds();
        SparseLongArray newChildrenIds=info.getChildNodeIds();
        final int oldChildCount=oldChildrenIds.size();
        for (int i=0; i < oldChildCount; i++) {
          final long oldChildId=oldChildrenIds.valueAt(i);
          if (newChildrenIds.indexOfValue(oldChildId) < 0) {
            clearSubTreeLocked(oldChildId);
          }
        }
        final long oldParentId=oldInfo.getParentNodeId();
        if (info.getParentNodeId() != oldParentId) {
          clearSubTreeLocked(oldParentId);
        }
      }
      AccessibilityNodeInfo clone=AccessibilityNodeInfo.obtain(info);
      mCacheImpl.put(sourceId,clone);
    }
  }
}
Program: 1829
Project: 1829
Buggy source:
private void refreshCachedNode(long sourceId){
  if (DEBUG) {
    Log.i(LOG_TAG,"String_Node_Str");
  }
synchronized (mLock) {
    AccessibilityNodeInfo cachedInfo=mCacheImpl.get(sourceId);
    if (cachedInfo == null) {
      return;
    }
    if (cachedInfo.refresh(false)) {
      return;
    }
    clearSubTreeLocked(sourceId);
  }
}

Fixed version (ground truth):
private void refreshCachedNode(long sourceId){
  if (DEBUG) {
    Log.i(LOG_TAG,"String_Node_Str");
  }
synchronized (mLock) {
    AccessibilityNodeInfo cachedInfo=mCacheImpl.get(sourceId);
    if (cachedInfo == null) {
      return;
    }
    if (cachedInfo.refresh(true)) {
      return;
    }
    clearSubTreeLocked(sourceId);
  }
}
Program: 1830
Project: 1830
Buggy source:
/** 
 * Gets a cached   {@link AccessibilityNodeInfo} given its accessibility node id.
 * @param accessibilityNodeId The info accessibility node id.
 * @return The cached {@link AccessibilityNodeInfo} or null if such not found.
 */
public AccessibilityNodeInfo get(long accessibilityNodeId){
  if (ENABLED) {
synchronized (mLock) {
      AccessibilityNodeInfo info=mCacheImpl.get(accessibilityNodeId);
      if (info != null) {
        info=AccessibilityNodeInfo.obtain(info);
      }
      if (DEBUG) {
      }
      return info;
    }
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Gets a cached   {@link AccessibilityNodeInfo} given its accessibility node id.
 * @param accessibilityNodeId The info accessibility node id.
 * @return The cached {@link AccessibilityNodeInfo} or null if such not found.
 */
public AccessibilityNodeInfo get(long accessibilityNodeId){
  if (ENABLED) {
synchronized (mLock) {
      AccessibilityNodeInfo info=mCacheImpl.get(accessibilityNodeId);
      if (info != null) {
        info=AccessibilityNodeInfo.obtain(info);
      }
      if (DEBUG) {
        Log.i(LOG_TAG,"String_Node_Str" + accessibilityNodeId + "String_Node_Str"+ info);
      }
      return info;
    }
  }
 else {
    return null;
  }
}
Program: 1832
Project: 1832
Buggy source:
public void run(){
  mLastEventTimeMillis=SystemClock.uptimeMillis();
  AccessibilityEvent event=AccessibilityEvent.obtain();
  event.setEventType(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
  event.setContentChangeType(AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE);
  mSource.sendAccessibilityEventUnchecked(event);
  mSource.resetSubtreeAccessibilityStateChanged();
  mSource=null;
}

Fixed version (ground truth):
public void run(){
  if (AccessibilityManager.getInstance(mContext).isEnabled()) {
    mLastEventTimeMillis=SystemClock.uptimeMillis();
    AccessibilityEvent event=AccessibilityEvent.obtain();
    event.setEventType(AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED);
    event.setContentChangeType(AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE);
    mSource.sendAccessibilityEventUnchecked(event);
  }
 else {
    mLastEventTimeMillis=0;
  }
  mSource.resetSubtreeAccessibilityStateChanged();
  mSource=null;
}
Program: 1833
Project: 1833
Buggy source:
/** 
 * Caches an   {@link AccessibilityNodeInfo} given its accessibility node id.
 * @param info The {@link AccessibilityNodeInfo} to cache.
 */
public void add(AccessibilityNodeInfo info){
  if (ENABLED) {
synchronized (mLock) {
      if (DEBUG) {
      }
      final long sourceId=info.getSourceNodeId();
      AccessibilityNodeInfo oldInfo=mCacheImpl.get(sourceId);
      if (oldInfo != null) {
        SparseLongArray oldChildrenIds=oldInfo.getChildNodeIds();
        SparseLongArray newChildrenIds=info.getChildNodeIds();
        final int oldChildCount=oldChildrenIds.size();
        for (int i=0; i < oldChildCount; i++) {
          final long oldChildId=oldChildrenIds.valueAt(i);
          if (newChildrenIds.indexOfValue(oldChildId) < 0) {
            clearSubTreeLocked(oldChildId);
          }
        }
        final long oldParentId=oldInfo.getParentNodeId();
        if (info.getParentNodeId() != oldParentId) {
          clearSubTreeLocked(oldParentId);
        }
      }
      AccessibilityNodeInfo clone=AccessibilityNodeInfo.obtain(info);
      mCacheImpl.put(sourceId,clone);
    }
  }
}

Fixed version (ground truth):
/** 
 * Caches an   {@link AccessibilityNodeInfo} given its accessibility node id.
 * @param info The {@link AccessibilityNodeInfo} to cache.
 */
public void add(AccessibilityNodeInfo info){
  if (ENABLED) {
synchronized (mLock) {
      if (DEBUG) {
        Log.i(LOG_TAG,"String_Node_Str" + info + "String_Node_Str");
      }
      final long sourceId=info.getSourceNodeId();
      AccessibilityNodeInfo oldInfo=mCacheImpl.get(sourceId);
      if (oldInfo != null) {
        SparseLongArray oldChildrenIds=oldInfo.getChildNodeIds();
        SparseLongArray newChildrenIds=info.getChildNodeIds();
        final int oldChildCount=oldChildrenIds.size();
        for (int i=0; i < oldChildCount; i++) {
          final long oldChildId=oldChildrenIds.valueAt(i);
          if (newChildrenIds.indexOfValue(oldChildId) < 0) {
            clearSubTreeLocked(oldChildId);
          }
        }
        final long oldParentId=oldInfo.getParentNodeId();
        if (info.getParentNodeId() != oldParentId) {
          clearSubTreeLocked(oldParentId);
        }
      }
      AccessibilityNodeInfo clone=AccessibilityNodeInfo.obtain(info);
      mCacheImpl.put(sourceId,clone);
    }
  }
}
Program: 1834
Project: 1834
Buggy source:
private void refreshCachedNode(long sourceId){
  if (DEBUG) {
    Log.i(LOG_TAG,"String_Node_Str");
  }
synchronized (mLock) {
    AccessibilityNodeInfo cachedInfo=mCacheImpl.get(sourceId);
    if (cachedInfo == null) {
      return;
    }
    if (cachedInfo.refresh(false)) {
      return;
    }
    clearSubTreeLocked(sourceId);
  }
}

Fixed version (ground truth):
private void refreshCachedNode(long sourceId){
  if (DEBUG) {
    Log.i(LOG_TAG,"String_Node_Str");
  }
synchronized (mLock) {
    AccessibilityNodeInfo cachedInfo=mCacheImpl.get(sourceId);
    if (cachedInfo == null) {
      return;
    }
    if (cachedInfo.refresh(true)) {
      return;
    }
    clearSubTreeLocked(sourceId);
  }
}
Program: 1835
Project: 1835
Buggy source:
/** 
 * Gets a cached   {@link AccessibilityNodeInfo} given its accessibility node id.
 * @param accessibilityNodeId The info accessibility node id.
 * @return The cached {@link AccessibilityNodeInfo} or null if such not found.
 */
public AccessibilityNodeInfo get(long accessibilityNodeId){
  if (ENABLED) {
synchronized (mLock) {
      AccessibilityNodeInfo info=mCacheImpl.get(accessibilityNodeId);
      if (info != null) {
        info=AccessibilityNodeInfo.obtain(info);
      }
      if (DEBUG) {
      }
      return info;
    }
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Gets a cached   {@link AccessibilityNodeInfo} given its accessibility node id.
 * @param accessibilityNodeId The info accessibility node id.
 * @return The cached {@link AccessibilityNodeInfo} or null if such not found.
 */
public AccessibilityNodeInfo get(long accessibilityNodeId){
  if (ENABLED) {
synchronized (mLock) {
      AccessibilityNodeInfo info=mCacheImpl.get(accessibilityNodeId);
      if (info != null) {
        info=AccessibilityNodeInfo.obtain(info);
      }
      if (DEBUG) {
        Log.i(LOG_TAG,"String_Node_Str" + accessibilityNodeId + "String_Node_Str"+ info);
      }
      return info;
    }
  }
 else {
    return null;
  }
}
Program: 1837
Project: 1837
Buggy source:
@Override protected Animator appear(ViewGroup sceneRoot,TransitionValues startValues,int startVisibility,TransitionValues endValues,int endVisibility){
  View endView=(endValues != null) ? endValues.view : null;
  if ((mFadingMode & IN) != IN) {
    return null;
  }
  endView.setAlpha(0);
  return runAnimation(endView,0,1,null);
}

Fixed version (ground truth):
@Override protected Animator appear(ViewGroup sceneRoot,TransitionValues startValues,int startVisibility,TransitionValues endValues,int endVisibility){
  if ((mFadingMode & IN) != IN || endValues == null) {
    return null;
  }
  final View endView=endValues.view;
  endView.setAlpha(0);
  final Animator.AnimatorListener endListener=new AnimatorListenerAdapter(){
    @Override public void onAnimationEnd(    Animator animation){
      endView.setAlpha(1);
    }
  }
;
  return runAnimation(endView,0,1,endListener);
}