Program: 78200
Project: 78200
Buggy source:
/** 
 * MotionEvent总处理函数
 */
public void handleMotionEvent(final MotionEvent event,int windowHeight){
switch (event.getAction() & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_DOWN:
    startRawX=event.getRawX();
  startRawY=event.getRawY();
fingerCount=1;
break;
case MotionEvent.ACTION_POINTER_UP:
--fingerCount;
break;
case MotionEvent.ACTION_POINTER_DOWN:
++fingerCount;
oldDistance=distance(event);
break;
case MotionEvent.ACTION_MOVE:
float distanceX=startRawX - event.getRawX();
float distanceY=startRawY - event.getRawY();
if (LoggerConfig.ON) {
Log.d(TAG,"String_Node_Str" + "String_Node_Str" + event.getRawX() + '\t'+ "String_Node_Str"+ event.getRawY()+ "String_Node_Str"+ "String_Node_Str"+ event.getX()+ '\t'+ "String_Node_Str"+ event.getY());
}
distanceY=0.1f * (distanceY) / windowHeight;
yFlingAngleTemp=distanceY * 180 / (Math.PI * 3);
if (yFlingAngleTemp + yFlingAngle > Math.PI / 2) {
yFlingAngleTemp=Math.PI / 2 - yFlingAngle;
}
if (yFlingAngleTemp + yFlingAngle < -Math.PI / 2) {
yFlingAngleTemp=-Math.PI / 2 - yFlingAngle;
}
distanceX=0.1f * (-distanceX) / windowHeight;
xFlingAngleTemp=distanceX * 180 / (Math.PI * 3);
mAngleX=(float)(3 * Math.cos(yFlingAngle + yFlingAngleTemp) * Math.sin(xFlingAngle + xFlingAngleTemp));
mAngleY=(float)(3 * Math.sin(yFlingAngle + yFlingAngleTemp));
mAngleZ=(float)(3 * Math.cos(yFlingAngle + yFlingAngleTemp) * Math.cos(xFlingAngle + xFlingAngleTemp));
if (fingerCount >= 2) {
newDistance=distance(event);
if ((newDistance > (oldDistance + SCALE_DISTANCE_VALUE)) || (newDistance < (oldDistance - SCALE_DISTANCE_VALUE))) {
sphereRadius*=getScaleRatio(newDistance,oldDistance);
oldDistance=newDistance;
PanoViewActivity.glSurfaceView.requestRender();
}
}
break;
case MotionEvent.ACTION_UP:
xFlingAngle+=xFlingAngleTemp;
yFlingAngle+=yFlingAngleTemp;
fingerCount=0;
break;
}
if (LoggerConfig.ON) {
}
}

Fixed version (ground truth):
/** 
 * MotionEvent总处理函数
 */
public void handleMotionEvent(final MotionEvent event,int windowHeight){
switch (event.getAction() & MotionEvent.ACTION_MASK) {
case MotionEvent.ACTION_DOWN:
    startRawX=event.getRawX();
  startRawY=event.getRawY();
fingerCount=1;
break;
case MotionEvent.ACTION_MOVE:
if (fingerCount >= 2) {
newDistance=distance(event);
if ((newDistance > (oldDistance + SCALE_DISTANCE_VALUE)) || (newDistance < (oldDistance - SCALE_DISTANCE_VALUE))) {
sphereRadius*=getScaleRatio(newDistance,oldDistance);
oldDistance=newDistance;
PanoViewActivity.glSurfaceView.requestRender();
}
}
 else {
float distanceX=startRawX - event.getRawX();
float distanceY=startRawY - event.getRawY();
if (LoggerConfig.ON) {
Log.d(TAG,"String_Node_Str" + "String_Node_Str" + event.getRawX() + '\t'+ "String_Node_Str"+ event.getRawY()+ "String_Node_Str"+ "String_Node_Str"+ event.getX()+ '\t'+ "String_Node_Str"+ event.getY());
}
distanceY=0.1f * (distanceY) / windowHeight;
yFlingAngleTemp=distanceY * 180 / (Math.PI * 3);
if (yFlingAngleTemp + yFlingAngle > Math.PI / 2) {
yFlingAngleTemp=Math.PI / 2 - yFlingAngle;
}
if (yFlingAngleTemp + yFlingAngle < -Math.PI / 2) {
yFlingAngleTemp=-Math.PI / 2 - yFlingAngle;
}
distanceX=0.1f * (-distanceX) / windowHeight;
xFlingAngleTemp=distanceX * 180 / (Math.PI * 3);
mAngleX=(float)(3 * Math.cos(yFlingAngle + yFlingAngleTemp) * Math.sin(xFlingAngle + xFlingAngleTemp));
mAngleY=(float)(3 * Math.sin(yFlingAngle + yFlingAngleTemp));
mAngleZ=(float)(3 * Math.cos(yFlingAngle + yFlingAngleTemp) * Math.cos(xFlingAngle + xFlingAngleTemp));
PanoViewActivity.glSurfaceView.requestRender();
}
break;
case MotionEvent.ACTION_UP:
xFlingAngle+=xFlingAngleTemp;
yFlingAngle+=yFlingAngleTemp;
fingerCount=0;
break;
case MotionEvent.ACTION_POINTER_UP:
--fingerCount;
break;
case MotionEvent.ACTION_POINTER_DOWN:
++fingerCount;
oldDistance=distance(event);
break;
}
if (LoggerConfig.ON) {
}
}