Program: 175428
Project: 175428
Buggy source:
@Override public boolean onDrag(View v,DragEvent event){
  AnimationSet set=new AnimationSet(true);
  set.setInterpolator(new DecelerateInterpolator());
  Animation scale=new ScaleAnimation(1.2f,3f,1.2f,3f,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
  scale.setDuration(500);
  set.addAnimation(scale);
  Animation alpha=new AlphaAnimation(1.0f,0.3f);
  alpha.setDuration(350);
  set.addAnimation(alpha);
switch (event.getAction()) {
case DragEvent.ACTION_DRAG_STARTED:
    break;
case DragEvent.ACTION_DRAG_ENTERED:
  MainActivity.getInstance().feedbackVibration();
Animation anim=new ScaleAnimation(1f,1.2f,1f,1.2f,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
anim.setDuration(350);
anim.setInterpolator(new BounceInterpolator());
anim.setFillAfter(true);
v.startAnimation(anim);
break;
case DragEvent.ACTION_DRAG_EXITED:
v.clearAnimation();
break;
case DragEvent.ACTION_DRAG_LOCATION:
break;
case DragEvent.ACTION_DRAG_ENDED:
mScreenDim.setAlpha(0f);
final View droppedView=(View)event.getLocalState();
droppedView.post(new Runnable(){
@Override public void run(){
droppedView.setVisibility(View.VISIBLE);
}
}
);
break;
case DragEvent.ACTION_DROP:
v.startAnimation(set);
MainActivity main=MainActivity.getInstance();
switch (mActionId) {
default :
main.newIdeaDialog(mActionId);
}
break;
default :
break;
}
return true;
}

Fixed version (ground truth):
@Override public boolean onDrag(View v,DragEvent event){
  AnimationSet set=new AnimationSet(true);
  set.setInterpolator(new DecelerateInterpolator());
  set.setAnimationListener(new Animation.AnimationListener(){
    @Override public void onAnimationStart(    Animation animation){
    }
    @Override public void onAnimationEnd(    Animation animation){
      MainActivity.getInstance().rebootIdeaMenuItems();
      dropping=false;
    }
    @Override public void onAnimationRepeat(    Animation animation){
    }
  }
);
  Animation scale=new ScaleAnimation(1.2f,3f,1.2f,3f,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
  scale.setDuration(300);
  set.addAnimation(scale);
  Animation alpha=new AlphaAnimation(1.0f,0.2f);
  alpha.setDuration(350);
  set.addAnimation(alpha);
switch (event.getAction()) {
case DragEvent.ACTION_DRAG_STARTED:
    dragging=true;
  break;
case DragEvent.ACTION_DRAG_ENTERED:
if (ready) {
  MainActivity.getInstance().feedbackVibration();
  Animation anim=new ScaleAnimation(1f,1.2f,1f,1.2f,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
  anim.setDuration(350);
  anim.setInterpolator(new BounceInterpolator());
  anim.setFillAfter(true);
  v.startAnimation(anim);
}
break;
case DragEvent.ACTION_DRAG_EXITED:
if (ready) {
v.clearAnimation();
}
break;
case DragEvent.ACTION_DRAG_LOCATION:
break;
case DragEvent.ACTION_DROP:
if (ready) {
dropping=true;
v.startAnimation(set);
MainActivity main=MainActivity.getInstance();
switch (mActionId) {
default :
main.newIdeaDialog(mActionId);
}
}
break;
case DragEvent.ACTION_DRAG_ENDED:
if (dragging && !dropping) {
final View droppedView=(View)event.getLocalState();
droppedView.post(new Runnable(){
@Override public void run(){
MainActivity.getInstance().rebootIdeaMenuItems();
}
}
);
dragging=false;
}
break;
default :
break;
}
return true;
}