Program: 25525
Project: 25525
Buggy source:
public SlidingUpPanelLayout(Context context,AttributeSet attrs,int defStyle){
  super(context,attrs,defStyle);
  if (isInEditMode()) {
    mShadowDrawable=null;
    mScrollTouchSlop=0;
    mDragHelper=null;
    return;
  }
  if (attrs != null) {
    TypedArray defAttrs=context.obtainStyledAttributes(attrs,DEFAULT_ATTRS);
    if (defAttrs != null) {
      int gravity=defAttrs.getInt(0,Gravity.NO_GRAVITY);
      if (gravity != Gravity.TOP && gravity != Gravity.BOTTOM) {
        throw new IllegalArgumentException("String_Node_Str");
      }
      mIsSlidingUp=gravity == Gravity.BOTTOM;
    }
    defAttrs.recycle();
    TypedArray ta=context.obtainStyledAttributes(attrs,R.styleable.SlidingUpPanelLayout);
    if (ta != null) {
      mPanelHeight=ta.getDimensionPixelSize(R.styleable.SlidingUpPanelLayout_panelHeight,-1);
      mShadowHeight=ta.getDimensionPixelSize(R.styleable.SlidingUpPanelLayout_shadowHeight,-1);
      mParallaxOffset=ta.getDimensionPixelSize(R.styleable.SlidingUpPanelLayout_paralaxOffset,-1);
      mMinFlingVelocity=ta.getInt(R.styleable.SlidingUpPanelLayout_flingVelocity,DEFAULT_MIN_FLING_VELOCITY);
      mCoveredFadeColor=ta.getColor(R.styleable.SlidingUpPanelLayout_fadeColor,DEFAULT_FADE_COLOR);
      mDragViewResId=ta.getResourceId(R.styleable.SlidingUpPanelLayout_dragView,-1);
      mOverlayContent=ta.getBoolean(R.styleable.SlidingUpPanelLayout_overlay,DEFAULT_OVERLAY_FLAG);
      mAnchorPoint=ta.getFloat(R.styleable.SlidingUpPanelLayout_anchorPoint,1.0f);
    }
    ta.recycle();
  }
  final float density=context.getResources().getDisplayMetrics().density;
  if (mPanelHeight == -1) {
    mPanelHeight=(int)(DEFAULT_PANEL_HEIGHT * density + 0.5f);
  }
  if (mShadowHeight == -1) {
    mShadowHeight=(int)(DEFAULT_SHADOW_HEIGHT * density + 0.5f);
  }
  if (mParallaxOffset == -1) {
    mParallaxOffset=(int)(DEFAULT_PARALAX_OFFSET * density);
  }
  if (mShadowHeight > 0) {
    if (mIsSlidingUp) {
      mShadowDrawable=getResources().getDrawable(R.drawable.above_shadow);
    }
 else {
      mShadowDrawable=getResources().getDrawable(R.drawable.below_shadow);
    }
  }
 else {
    mShadowDrawable=null;
  }
  setWillNotDraw(false);
  mDragHelper=ViewDragHelper.create(this,0.5f,new DragHelperCallback());
  mDragHelper.setMinVelocity(mMinFlingVelocity * density);
  mIsSlidingEnabled=true;
  mIsPanelBeingHidden=false;
  ViewConfiguration vc=ViewConfiguration.get(context);
  mScrollTouchSlop=vc.getScaledTouchSlop();
}

Fixed version (ground truth):
public SlidingUpPanelLayout(Context context,AttributeSet attrs,int defStyle){
  super(context,attrs,defStyle);
  if (isInEditMode()) {
    mShadowDrawable=null;
    mScrollTouchSlop=0;
    mDragHelper=null;
    return;
  }
  if (attrs != null) {
    TypedArray defAttrs=context.obtainStyledAttributes(attrs,DEFAULT_ATTRS);
    if (defAttrs != null) {
      int gravity=defAttrs.getInt(0,Gravity.NO_GRAVITY);
      if (gravity != Gravity.TOP && gravity != Gravity.BOTTOM) {
        throw new IllegalArgumentException("String_Node_Str");
      }
      mIsSlidingUp=gravity == Gravity.BOTTOM;
    }
    defAttrs.recycle();
    TypedArray ta=context.obtainStyledAttributes(attrs,R.styleable.SlidingUpPanelLayout);
    if (ta != null) {
      mPanelHeight=ta.getDimensionPixelSize(R.styleable.SlidingUpPanelLayout_panelHeight,-1);
      mShadowHeight=ta.getDimensionPixelSize(R.styleable.SlidingUpPanelLayout_shadowHeight,-1);
      mParallaxOffset=ta.getDimensionPixelSize(R.styleable.SlidingUpPanelLayout_paralaxOffset,-1);
      mMinFlingVelocity=ta.getInt(R.styleable.SlidingUpPanelLayout_flingVelocity,DEFAULT_MIN_FLING_VELOCITY);
      mCoveredFadeColor=ta.getColor(R.styleable.SlidingUpPanelLayout_fadeColor,DEFAULT_FADE_COLOR);
      mDragViewResId=ta.getResourceId(R.styleable.SlidingUpPanelLayout_dragView,-1);
      mOverlayContent=ta.getBoolean(R.styleable.SlidingUpPanelLayout_overlay,DEFAULT_OVERLAY_FLAG);
      mAnchorPoint=ta.getFloat(R.styleable.SlidingUpPanelLayout_anchorPoint,1.0f);
    }
    ta.recycle();
  }
  final float density=context.getResources().getDisplayMetrics().density;
  if (mPanelHeight == -1) {
    mPanelHeight=(int)(DEFAULT_PANEL_HEIGHT * density + 0.5f);
  }
  if (mShadowHeight == -1) {
    mShadowHeight=(int)(DEFAULT_SHADOW_HEIGHT * density + 0.5f);
  }
  if (mParallaxOffset == -1) {
    mParallaxOffset=(int)(DEFAULT_PARALAX_OFFSET * density);
  }
  if (mShadowHeight > 0) {
    if (mIsSlidingUp) {
      mShadowDrawable=getResources().getDrawable(R.drawable.above_shadow);
    }
 else {
      mShadowDrawable=getResources().getDrawable(R.drawable.below_shadow);
    }
  }
 else {
    mShadowDrawable=null;
  }
  setWillNotDraw(false);
  mDragHelper=ViewDragHelper.create(this,0.5f,new DragHelperCallback());
  mDragHelper.setMinVelocity(mMinFlingVelocity * density);
  mIsSlidingEnabled=true;
  ViewConfiguration vc=ViewConfiguration.get(context);
  mScrollTouchSlop=vc.getScaledTouchSlop();
}