Program: 2408
Project: 2408
Buggy source:
Drawable loadDrawable(TypedValue value,int id) throws NotFoundException {
  if (TRACE_FOR_PRELOAD) {
    if ((id >>> 24) == 0x1) {
      final String name=getResourceName(id);
      if (name != null)       android.util.Log.d("String_Node_Str",name);
    }
  }
  boolean isColorDrawable=false;
  if (value.type >= TypedValue.TYPE_FIRST_COLOR_INT && value.type <= TypedValue.TYPE_LAST_COLOR_INT) {
    isColorDrawable=true;
  }
  final long key=isColorDrawable ? value.data : (((long)value.assetCookie) << 32) | value.data;
  Drawable dr=getCachedDrawable(isColorDrawable ? mColorDrawableCache : mDrawableCache,key);
  if (dr != null) {
    return dr;
  }
  Drawable.ConstantState cs=isColorDrawable ? sPreloadedColorDrawables.get(key) : (sPreloadedDensity == mConfiguration.densityDpi ? sPreloadedDrawables.get(key) : null);
  if (cs != null) {
    dr=cs.newDrawable(this);
  }
 else {
    if (isColorDrawable) {
      dr=new ColorDrawable(value.data);
    }
    if (dr == null) {
      if (value.string == null) {
        throw new NotFoundException("String_Node_Str" + value);
      }
      String file=value.string.toString();
      if (TRACE_FOR_MISS_PRELOAD) {
        if ((id >>> 24) == 0x1) {
          final String name=getResourceName(id);
          if (name != null)           android.util.Log.d(TAG,"String_Node_Str" + Integer.toHexString(id) + "String_Node_Str"+ name+ "String_Node_Str"+ file);
        }
      }
      if (DEBUG_LOAD)       Log.v(TAG,"String_Node_Str" + value.assetCookie + "String_Node_Str"+ file);
      if (file.endsWith("String_Node_Str")) {
        try {
          XmlResourceParser rp=loadXmlResourceParser(file,id,value.assetCookie,"String_Node_Str");
          dr=Drawable.createFromXml(this,rp);
          rp.close();
        }
 catch (        Exception e) {
          NotFoundException rnf=new NotFoundException("String_Node_Str" + file + "String_Node_Str"+ Integer.toHexString(id));
          rnf.initCause(e);
          throw rnf;
        }
      }
 else {
        try {
          InputStream is=mAssets.openNonAsset(value.assetCookie,file,AssetManager.ACCESS_STREAMING);
          dr=Drawable.createFromResourceStream(this,value,is,file,null);
          is.close();
        }
 catch (        Exception e) {
          NotFoundException rnf=new NotFoundException("String_Node_Str" + file + "String_Node_Str"+ Integer.toHexString(id));
          rnf.initCause(e);
          throw rnf;
        }
      }
    }
  }
  if (dr != null) {
    dr.setChangingConfigurations(value.changingConfigurations);
    cs=dr.getConstantState();
    if (cs != null) {
      if (mPreloading) {
        if (verifyPreloadConfig(value,"String_Node_Str")) {
          if (isColorDrawable) {
            sPreloadedColorDrawables.put(key,cs);
          }
 else {
            sPreloadedDrawables.put(key,cs);
          }
        }
      }
 else {
synchronized (mAccessLock) {
          if (isColorDrawable) {
            mColorDrawableCache.put(key,new WeakReference<Drawable.ConstantState>(cs));
          }
 else {
            mDrawableCache.put(key,new WeakReference<Drawable.ConstantState>(cs));
          }
        }
      }
    }
  }
  return dr;
}

Fixed version (ground truth):
Drawable loadDrawable(TypedValue value,int id) throws NotFoundException {
  if (TRACE_FOR_PRELOAD) {
    if ((id >>> 24) == 0x1) {
      final String name=getResourceName(id);
      if (name != null)       android.util.Log.d("String_Node_Str",name);
    }
  }
  boolean isColorDrawable=false;
  if (value.type >= TypedValue.TYPE_FIRST_COLOR_INT && value.type <= TypedValue.TYPE_LAST_COLOR_INT) {
    isColorDrawable=true;
  }
  final long key=isColorDrawable ? value.data : (((long)value.assetCookie) << 32) | value.data;
  Drawable dr=getCachedDrawable(isColorDrawable ? mColorDrawableCache : mDrawableCache,key);
  if (dr != null) {
    return dr;
  }
  Drawable.ConstantState cs=isColorDrawable ? sPreloadedColorDrawables.get(key) : (sPreloadedDensity == mConfiguration.densityDpi ? sPreloadedDrawables.get(key) : null);
  if (cs != null) {
    dr=cs.newDrawable(this);
  }
 else {
    if (isColorDrawable) {
      dr=new ColorDrawable(value.data);
    }
    if (dr == null) {
      if (value.string == null) {
        throw new NotFoundException("String_Node_Str" + value);
      }
      String file=value.string.toString();
      if (TRACE_FOR_MISS_PRELOAD) {
        if ((id >>> 24) == 0x1) {
          final String name=getResourceName(id);
          if (name != null)           android.util.Log.d(TAG,"String_Node_Str" + Integer.toHexString(id) + "String_Node_Str"+ name+ "String_Node_Str"+ file);
        }
      }
      if (DEBUG_LOAD)       Log.v(TAG,"String_Node_Str" + value.assetCookie + "String_Node_Str"+ file);
      if (file.endsWith("String_Node_Str")) {
        try {
          XmlResourceParser rp=loadXmlResourceParser(file,id,value.assetCookie,"String_Node_Str");
          dr=Drawable.createFromXml(this,rp);
          rp.close();
        }
 catch (        Exception e) {
          NotFoundException rnf=new NotFoundException("String_Node_Str" + file + "String_Node_Str"+ Integer.toHexString(id));
          rnf.initCause(e);
          throw rnf;
        }
      }
 else {
        try {
          InputStream is=mAssets.openNonAsset(value.assetCookie,file,AssetManager.ACCESS_STREAMING);
          dr=Drawable.createFromResourceStream(this,value,is,file,null);
          is.close();
        }
 catch (        Exception e) {
          NotFoundException rnf=new NotFoundException("String_Node_Str" + file + "String_Node_Str"+ Integer.toHexString(id));
          rnf.initCause(e);
          throw rnf;
        }
      }
    }
  }
  if (dr != null) {
    dr.setChangingConfigurations(value.changingConfigurations);
    cs=dr.getConstantState();
    if (cs != null) {
      if (mPreloading) {
        if (verifyPreloadConfig(cs.getChangingConfigurations(),value.resourceId,"String_Node_Str")) {
          if (isColorDrawable) {
            sPreloadedColorDrawables.put(key,cs);
          }
 else {
            sPreloadedDrawables.put(key,cs);
          }
        }
      }
 else {
synchronized (mAccessLock) {
          if (isColorDrawable) {
            mColorDrawableCache.put(key,new WeakReference<Drawable.ConstantState>(cs));
          }
 else {
            mDrawableCache.put(key,new WeakReference<Drawable.ConstantState>(cs));
          }
        }
      }
    }
  }
  return dr;
}