Program: 164985
Project: 164985
Buggy source:
/** 
 * Paint the passed color (non-resource value) on the object
 * @param cloneDrawable - whether we want to reuse a drawable globally, or clone it for the specific object
 * @param viewObject - ImageView, MenuItem's Icon, TextView's first available CompoundDrawables
 * @param paint
 */
private void paint(boolean cloneDrawable,Object viewObject,int paint){
  if (viewObject != null) {
    Drawable drawable=null;
    if (viewObject instanceof ImageView) {
      drawable=((ImageView)viewObject).getDrawable();
      if (cloneDrawable) {
        drawable=drawable.getConstantState().newDrawable();
        ((ImageView)viewObject).setImageDrawable(drawable);
      }
    }
 else     if (viewObject instanceof TextView) {
      Drawable[] drawables=((TextView)viewObject).getCompoundDrawables();
      for (int i=0; i < drawables.length; i++) {
        Drawable d=drawables[i];
        if (d != null) {
          drawable=d;
          if (cloneDrawable) {
            drawable=d.getConstantState().newDrawable();
            drawables[i]=drawable;
          }
          break;
        }
      }
      if (cloneDrawable) {
        ((TextView)viewObject).setCompoundDrawables(drawables[0],drawables[1],drawables[2],drawables[3]);
      }
    }
 else     if (viewObject instanceof MenuItem) {
      drawable=((MenuItem)viewObject).getIcon();
      if (cloneDrawable) {
        drawable=drawable.getConstantState().newDrawable();
        ((MenuItem)viewObject).setIcon(drawable);
      }
    }
    if (drawable != null) {
      drawable.setColorFilter(paint,mMode);
    }
 else {
      throw new RuntimeException("String_Node_Str" + viewObject.getClass().getName());
    }
  }
 else {
    throw new InvalidParameterException(getClass());
  }
}

Fixed version (ground truth):
/** 
 * Paint the passed color (non-resource value) on the object
 * @param cloneDrawable - whether we want to reuse a drawable globally, or clone it for the specific object
 * @param viewObject - ImageView, MenuItem's Icon, TextView's first available CompoundDrawables
 * @param paint
 */
private void paint(boolean cloneDrawable,Object viewObject,int paint){
  if (viewObject != null) {
    Drawable drawable=null;
    if (viewObject instanceof ImageView) {
      drawable=PainterUtils.getDrawable(cloneDrawable,paint,((ImageView)viewObject).getDrawable());
      ((ImageView)viewObject).setImageDrawable(drawable);
    }
 else     if (viewObject instanceof TextView) {
      Drawable[] drawables=((TextView)viewObject).getCompoundDrawables();
      for (int i=0; i < drawables.length; i++) {
        Drawable d=drawables[i];
        if (d != null) {
          drawable=d;
          drawables[i]=PainterUtils.getDrawable(cloneDrawable,paint,d);
          break;
        }
      }
      ((TextView)viewObject).setCompoundDrawables(drawables[0],drawables[1],drawables[2],drawables[3]);
    }
 else     if (viewObject instanceof MenuItem) {
      drawable=PainterUtils.getDrawable(cloneDrawable,paint,((MenuItem)viewObject).getIcon());
      ((MenuItem)viewObject).setIcon(drawable);
    }
    if (drawable != null) {
      drawable.setColorFilter(paint,mMode);
    }
 else {
      throw new RuntimeException("String_Node_Str" + viewObject.getClass().getName());
    }
  }
 else {
    throw new InvalidParameterException(getClass());
  }
}