Program: 62851
Project: 62851
Buggy source:
@Override @TargetApi(11) protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.player);
  SharedPreferences pref=PreferenceManager.getDefaultSharedPreferences(this);
  if (Util.isICSOrLater())   getWindow().getDecorView().findViewById(android.R.id.content).setOnSystemUiVisibilityChangeListener(new OnSystemUiVisibilityChangeListener(){
    @Override public void onSystemUiVisibilityChange(    int visibility){
      if (visibility == mUiVisibility)       return;
      setSurfaceSize(mVideoWidth,mVideoHeight,mSarNum,mSarDen);
      if (visibility == View.SYSTEM_UI_FLAG_VISIBLE && !mShowing) {
        showOverlay();
        mHandler.sendMessageDelayed(mHandler.obtainMessage(HIDE_NAV),OVERLAY_TIMEOUT);
      }
      mUiVisibility=visibility;
    }
  }
);
  mOverlayHeader=findViewById(R.id.player_overlay_header);
  mOverlay=findViewById(R.id.player_overlay);
  mOverlaySlider=(SlidingPanel)findViewById(R.id.player_overlay_slider);
  View sliderContent=findViewById(R.id.slider_content);
  sliderContent.setOnTouchListener(new OnTouchListener(){
    @Override public boolean onTouch(    View v,    MotionEvent event){
      return true;
    }
  }
);
  mOverlaySlider.setOnDrawerScrollListener(new OnDrawerScrollListener(){
    @Override public void onScrollStarted(){
      showOverlay(OVERLAY_INFINITE);
    }
    @Override public void onScrollEnded(){
      if (mOverlaySlider.isOpened()) {
        mOverlaySlider.ExpandHandle();
        showOverlay(OVERLAY_INFINITE);
      }
 else {
        mOverlaySlider.CollapseHandle();
        showOverlay(OVERLAY_TIMEOUT);
      }
    }
  }
);
  mOverlaySlider.setOnDrawerOpenListener(new OnDrawerOpenListener(){
    @Override public void onDrawerOpened(){
      mOverlaySlider.ExpandHandle();
      showOverlay(OVERLAY_INFINITE);
    }
  }
);
  mOverlaySlider.setOnDrawerCloseListener(new OnDrawerCloseListener(){
    @Override public void onDrawerClosed(){
      mOverlaySlider.CollapseHandle();
      showOverlay(OVERLAY_TIMEOUT);
    }
  }
);
  mTitle=(TextView)findViewById(R.id.player_overlay_title);
  mSysTime=(TextView)findViewById(R.id.player_overlay_systime);
  mBattery=(TextView)findViewById(R.id.player_overlay_battery);
  mTime=(TextView)findViewById(R.id.player_overlay_time);
  mLength=(TextView)findViewById(R.id.player_overlay_length);
  mInfo=(TextView)findViewById(R.id.player_overlay_info);
  mEnableWheelbar=pref.getBoolean("String_Node_Str",false);
  mEnableBrightnessGesture=pref.getBoolean("String_Node_Str",true);
  mControls=mEnableWheelbar ? new PlayerControlWheel(this) : new PlayerControlClassic(this);
  mControls.setOnPlayerControlListener(mPlayerControlListener);
  FrameLayout mControlContainer=(FrameLayout)findViewById(R.id.player_control);
  mControlContainer.addView((View)mControls);
  mAudio=(Spinner)findViewById(R.id.player_overlay_audio);
  mSubtitles=(Spinner)findViewById(R.id.player_overlay_subtitle);
  mLock=(ImageButton)findViewById(R.id.player_overlay_lock);
  mLock.setOnClickListener(mLockListener);
  mSize=(ImageButton)findViewById(R.id.player_overlay_size);
  mSize.setOnClickListener(mSizeListener);
  mSpeedLabel=(TextView)findViewById(R.id.player_overlay_speed);
  mSpeedLabel.setOnClickListener(mSpeedLabelListener);
  mSurface=(SurfaceView)findViewById(R.id.player_surface);
  mSurfaceHolder=mSurface.getHolder();
  mSurfaceHolder.setFormat(PixelFormat.RGBX_8888);
  mSurfaceHolder.addCallback(mSurfaceCallback);
  mSeekbar=(SeekBar)findViewById(R.id.player_overlay_seekbar);
  mSeekbar.setOnSeekBarChangeListener(mSeekListener);
  mAudioManager=(AudioManager)getSystemService(AUDIO_SERVICE);
  mAudioMax=mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
  mSwitchingView=false;
  mEndReached=false;
  registerReceiver(mBatteryReceiver,new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
  try {
    LibVLC.useIOMX(this);
    mLibVLC=LibVLC.getInstance();
  }
 catch (  LibVlcException e) {
    e.printStackTrace();
  }
  EventManager em=EventManager.getInstance();
  em.addHandler(eventHandler);
  this.setVolumeControlStream(AudioManager.STREAM_MUSIC);
  setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
}

Fixed version (ground truth):
@Override @TargetApi(11) protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.player);
  SharedPreferences pref=PreferenceManager.getDefaultSharedPreferences(this);
  if (Util.isICSOrLater())   getWindow().getDecorView().findViewById(android.R.id.content).setOnSystemUiVisibilityChangeListener(new OnSystemUiVisibilityChangeListener(){
    @Override public void onSystemUiVisibilityChange(    int visibility){
      if (visibility == mUiVisibility)       return;
      setSurfaceSize(mVideoWidth,mVideoHeight,mSarNum,mSarDen);
      if (visibility == View.SYSTEM_UI_FLAG_VISIBLE && !mShowing) {
        showOverlay();
        mHandler.sendMessageDelayed(mHandler.obtainMessage(HIDE_NAV),OVERLAY_TIMEOUT);
      }
      mUiVisibility=visibility;
    }
  }
);
  mOverlayHeader=findViewById(R.id.player_overlay_header);
  mOverlay=findViewById(R.id.player_overlay);
  mOverlaySlider=(SlidingPanel)findViewById(R.id.player_overlay_slider);
  View sliderContent=findViewById(R.id.slider_content);
  sliderContent.setOnTouchListener(new OnTouchListener(){
    @Override public boolean onTouch(    View v,    MotionEvent event){
      return true;
    }
  }
);
  mOverlaySlider.setOnDrawerScrollListener(new OnDrawerScrollListener(){
    @Override public void onScrollStarted(){
      showOverlay(OVERLAY_INFINITE);
      setTracksAndSubtitles();
    }
    @Override public void onScrollEnded(){
      if (mOverlaySlider.isOpened()) {
        mOverlaySlider.ExpandHandle();
        showOverlay(OVERLAY_INFINITE);
      }
 else {
        mOverlaySlider.CollapseHandle();
        showOverlay(OVERLAY_TIMEOUT);
      }
    }
  }
);
  mOverlaySlider.setOnDrawerOpenListener(new OnDrawerOpenListener(){
    @Override public void onDrawerOpened(){
      mOverlaySlider.ExpandHandle();
      showOverlay(OVERLAY_INFINITE);
    }
  }
);
  mOverlaySlider.setOnDrawerCloseListener(new OnDrawerCloseListener(){
    @Override public void onDrawerClosed(){
      mOverlaySlider.CollapseHandle();
      showOverlay(OVERLAY_TIMEOUT);
    }
  }
);
  mTitle=(TextView)findViewById(R.id.player_overlay_title);
  mSysTime=(TextView)findViewById(R.id.player_overlay_systime);
  mBattery=(TextView)findViewById(R.id.player_overlay_battery);
  mTime=(TextView)findViewById(R.id.player_overlay_time);
  mLength=(TextView)findViewById(R.id.player_overlay_length);
  mInfo=(TextView)findViewById(R.id.player_overlay_info);
  mEnableWheelbar=pref.getBoolean("String_Node_Str",false);
  mEnableBrightnessGesture=pref.getBoolean("String_Node_Str",true);
  mControls=mEnableWheelbar ? new PlayerControlWheel(this) : new PlayerControlClassic(this);
  mControls.setOnPlayerControlListener(mPlayerControlListener);
  FrameLayout mControlContainer=(FrameLayout)findViewById(R.id.player_control);
  mControlContainer.addView((View)mControls);
  mAudio=(Spinner)findViewById(R.id.player_overlay_audio);
  mSubtitles=(Spinner)findViewById(R.id.player_overlay_subtitle);
  mLock=(ImageButton)findViewById(R.id.player_overlay_lock);
  mLock.setOnClickListener(mLockListener);
  mSize=(ImageButton)findViewById(R.id.player_overlay_size);
  mSize.setOnClickListener(mSizeListener);
  mSpeedLabel=(TextView)findViewById(R.id.player_overlay_speed);
  mSpeedLabel.setOnClickListener(mSpeedLabelListener);
  mSurface=(SurfaceView)findViewById(R.id.player_surface);
  mSurfaceHolder=mSurface.getHolder();
  mSurfaceHolder.setFormat(PixelFormat.RGBX_8888);
  mSurfaceHolder.addCallback(mSurfaceCallback);
  mSeekbar=(SeekBar)findViewById(R.id.player_overlay_seekbar);
  mSeekbar.setOnSeekBarChangeListener(mSeekListener);
  mAudioManager=(AudioManager)getSystemService(AUDIO_SERVICE);
  mAudioMax=mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
  mSwitchingView=false;
  mEndReached=false;
  registerReceiver(mBatteryReceiver,new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
  try {
    LibVLC.useIOMX(this);
    mLibVLC=LibVLC.getInstance();
  }
 catch (  LibVlcException e) {
    e.printStackTrace();
  }
  EventManager em=EventManager.getInstance();
  em.addHandler(eventHandler);
  this.setVolumeControlStream(AudioManager.STREAM_MUSIC);
  setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);
}