Program: 62852
Project: 62852
Buggy source:
/** 
 * show/hide the overlay
 */
@Override public boolean onTouchEvent(MotionEvent event){
  if (mAudioDisplayRange == 0)   mAudioDisplayRange=Math.min(getWindowManager().getDefaultDisplay().getWidth(),getWindowManager().getDefaultDisplay().getHeight());
  float y_changed=event.getRawY() - mTouchY;
  float x_changed=event.getRawX() - mTouchX;
  float coef=Math.abs(y_changed / x_changed);
  Log.i(TAG,"String_Node_Str" + Float.toString(coef));
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
    mTouchY=event.getRawY();
  mVol=mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
mIsAudioChanged=false;
mTouchX=event.getRawX();
break;
case MotionEvent.ACTION_MOVE:
if ((Math.abs(y_changed) > Math.abs(x_changed)) && (coef > 2)) {
int delta=-(int)((y_changed / mAudioDisplayRange) * mAudioMax);
int vol=(int)Math.min(Math.max(mVol + delta,0),mAudioMax);
if (delta != 0) {
mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC,vol,AudioManager.FLAG_SHOW_UI);
mIsAudioChanged=true;
}
}
break;
case MotionEvent.ACTION_UP:
if (!mIsAudioChanged) {
if (!mShowing) {
showOverlay();
}
 else {
hideOverlay(true);
if (Util.isICSOrLater()) mHandler.sendMessageDelayed(mHandler.obtainMessage(HIDE_NAV),OVERLAY_TIMEOUT);
}
}
if ((Math.abs(y_changed) < Math.abs(x_changed)) && (coef < 0.5)) {
DisplayMetrics screen=new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(screen);
int jump=(int)(600000 * Math.pow((x_changed / screen.widthPixels),3));
mPlayerControlListener.onSeek(jump);
showInfo(String.format("String_Node_Str",jump >= 0 ? "String_Node_Str" : "String_Node_Str",Util.millisToString(jump)),1000);
}
break;
}
return mIsAudioChanged;
}

Fixed version (ground truth):
/** 
 * show/hide the overlay
 */
@SuppressWarnings("String_Node_Str") @Override public boolean onTouchEvent(MotionEvent event){
  if (mAudioDisplayRange == 0)   mAudioDisplayRange=Math.min(getWindowManager().getDefaultDisplay().getWidth(),getWindowManager().getDefaultDisplay().getHeight());
  float y_changed=event.getRawY() - mTouchY;
  float x_changed=event.getRawX() - mTouchX;
  float coef=Math.abs(y_changed / x_changed);
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
    mTouchY=event.getRawY();
  mVol=mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
mIsAudioChanged=false;
mTouchX=event.getRawX();
break;
case MotionEvent.ACTION_MOVE:
if ((Math.abs(y_changed) > Math.abs(x_changed)) && (coef > 2)) {
int delta=-(int)((y_changed / mAudioDisplayRange) * mAudioMax);
int vol=(int)Math.min(Math.max(mVol + delta,0),mAudioMax);
if (delta != 0) {
mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC,vol,AudioManager.FLAG_SHOW_UI);
mIsAudioChanged=true;
}
}
break;
case MotionEvent.ACTION_UP:
if (!mIsAudioChanged) {
if (!mShowing) {
showOverlay();
}
 else {
hideOverlay(true);
if (Util.isICSOrLater()) mHandler.sendMessageDelayed(mHandler.obtainMessage(HIDE_NAV),OVERLAY_TIMEOUT);
}
}
DisplayMetrics screen=new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(screen);
float gesturesize=(float)((x_changed / screen.xdpi) * 2.54);
if ((Math.abs(y_changed) < Math.abs(x_changed)) && (coef < 0.5) && (Math.abs(gesturesize) > 1)) {
int jump=(int)(Math.signum(gesturesize) * ((600000 * Math.pow((gesturesize / 8),4)) + 3000));
if ((jump > 0) && ((mLibVLC.getTime() + jump) > mLibVLC.getLength())) jump=(int)(mLibVLC.getLength() - mLibVLC.getTime());
if ((jump < 0) && ((mLibVLC.getTime() + jump) < 0)) jump=(int)-mLibVLC.getTime();
mPlayerControlListener.onSeek(jump);
showInfo(String.format("String_Node_Str",jump >= 0 ? "String_Node_Str" : "String_Node_Str",Util.millisToString(jump)),1000);
}
break;
}
return mIsAudioChanged;
}