Buggy code:
public class Godot extends Activity implements SensorEventListener , IDownloaderClient { static final int MAX_SINGLETONS = 64 ; private IStub mDownloaderClientStub ; private IDownloaderService mRemoteService ; private TextView mStatusText ; private TextView mProgressFraction ; private TextView mProgressPercent ; private TextView mAverageSpeed ; private TextView mTimeRemaining ; private ProgressBar mPB ; private View mDashboard ; private View mCellMessage ; private Button mPauseButton ; private Button mWiFiSettingsButton ; private boolean use_32_bits = false ; private boolean use_immersive = false ; private boolean mStatePaused ; private int mState ; private void setState ( int newState ) { } private void setButtonPausedState ( boolean paused ) { } public static class SingletonBase { protected void registerClass ( String p_name , String [ ] p_methods ) { } protected void onMainActivityResult ( int requestCode , int resultCode , Intent data ) { } protected void onMainPause ( ) { } protected void onMainResume ( ) { } protected void onMainDestroy ( ) { } protected void onGLDrawFrame ( GL10 gl ) { } protected void onGLSurfaceChanged ( GL10 gl , int width , int height ) { } public void registerMethods ( ) { } } private String [ ] command_line ; public GodotView mView ; private boolean godot_initialized = false ; private SensorManager mSensorManager ; private Sensor mAccelerometer ; public FrameLayout layout ; public RelativeLayout adLayout ; public static GodotIO io ; public static void setWindowTitle ( String title ) { } static Godot . SingletonBase [ ] singletons = new Godot . SingletonBase [ Godot . MAX_SINGLETONS ] ; static int singleton_count = 0 ; public interface ResultCallback { public void callback ( int requestCode , int resultCode , Intent data ) { } } public Godot . ResultCallback result_callback ; private PaymentsManager mPaymentsManager = null ; @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } public void onVideoInit ( boolean use_gl2 ) { } private static Godot _self ; public static Godot getInstance ( ) { } private String [ ] getCommandLine ( ) { } String expansion_pack_path ; private void initializeGodot ( ) { } @ Override public void onServiceConnected ( Messenger m ) { } @ Override protected void onCreate ( Bundle icicle ) { } @ Override protected void onDestroy ( ) { } @ Override protected void onPause ( ) { } @ Override protected void onResume ( ) { } public void UiChangeListener ( ) { } @ Override public void onSensorChanged ( SensorEvent event ) { } @ Override public final void onAccuracyChanged ( Sensor sensor , int accuracy ) { } @ Override public void onBackPressed ( ) { } public void forceQuit ( ) { } private boolean obbIsCorrupted ( String f , String main_pack_md5 ) { } public boolean gotTouchEvent ( MotionEvent event ) { super . onTouchEvent ( event ) ; int evcount = event . getPointerCount ( ) ; if ( evcount == 0 ) return true ; int [ ] arr = new int [ ( event . getPointerCount ( ) ) * 3 ] ; for ( int i = 0 ; i < ( event . getPointerCount ( ) ) ; i ++ ) { arr [ ( ( i * 3 ) + 0 ) ] = ( ( int ) ( event . getPointerId ( i ) ) ) ; arr [ ( ( i * 3 ) + 1 ) ] = ( ( int ) ( event . getX ( i ) ) ) ; arr [ ( ( i * 3 ) + 2 ) ] = ( ( int ) ( event . getY ( i ) ) ) ; } switch ( ( event . getAction ( ) ) & ( MotionEvent . ACTION_MASK ) ) { case MotionEvent . ACTION_DOWN : { GodotLib . touch ( 0 , 0 , evcount , arr ) ; } break ; case MotionEvent . ACTION_MOVE : { GodotLib . touch ( 1 , 0 , evcount , arr ) ; } break ; case MotionEvent . ACTION_POINTER_UP : { <START_BUG> final int indexPointUp = ( event . getAction ( ) ) > > ( MotionEvent . ACTION_POINTER_INDEX_SHIFT ) ; <END_BUG> final int pointer_idx = event . getPointerId ( indexPointUp ) ; GodotLib . touch ( 4 , pointer_idx , evcount , arr ) ; } break ; case MotionEvent . ACTION_POINTER_DOWN : { int pointer_idx = event . getActionIndex ( ) ; GodotLib . touch ( 3 , pointer_idx , evcount , arr ) ; } break ; case MotionEvent . ACTION_CANCEL : case MotionEvent . ACTION_UP : { GodotLib . touch ( 2 , 0 , evcount , arr ) ; } break ; } return true ; } @ Override public boolean onKeyMultiple ( final int inKeyCode , int repeatCount , KeyEvent event ) { } private void queueEvent ( Runnable runnable ) { } public PaymentsManager getPaymentsManager ( ) { } @ Override public void onDownloadStateChanged ( int newState ) { } @ Override public void onDownloadProgress ( DownloadProgressInfo progress ) { } }

Fix:
final int indexPointUp = event . getActionIndex ( ) ;