Buggy code:
class MPDbAdapter { private static final String LOGTAG = "MixpanelAPI.Database" ; public enum Table { EVENTS ( "events" ) , PEOPLE ( "people" ) ; Table ( String name ) { } public String getName ( ) { } private final String mTableName ; } private static final String DATABASE_NAME = "mixpanel" ; private static final int DATABASE_VERSION = 4 ; public static final String KEY_DATA = "data" ; public static final String KEY_CREATED_AT = "created_at" ; private static final String CREATE_EVENTS_TABLE = ( ( ( ( ( "CREATE<seq2seq4repair_space>TABLE<seq2seq4repair_space>" + ( MPDbAdapter . Table . EVENTS . getName ( ) ) ) + "<seq2seq4repair_space>(_id<seq2seq4repair_space>INTEGER<seq2seq4repair_space>PRIMARY<seq2seq4repair_space>KEY<seq2seq4repair_space>AUTOINCREMENT,<seq2seq4repair_space>" ) + ( MPDbAdapter . KEY_DATA ) ) + "<seq2seq4repair_space>STRING<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL,<seq2seq4repair_space>" ) + ( MPDbAdapter . KEY_CREATED_AT ) ) + "<seq2seq4repair_space>INTEGER<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL);" ; private static final String CREATE_PEOPLE_TABLE = ( ( ( ( ( "CREATE<seq2seq4repair_space>TABLE<seq2seq4repair_space>" + ( MPDbAdapter . Table . PEOPLE . getName ( ) ) ) + "<seq2seq4repair_space>(_id<seq2seq4repair_space>INTEGER<seq2seq4repair_space>PRIMARY<seq2seq4repair_space>KEY<seq2seq4repair_space>AUTOINCREMENT,<seq2seq4repair_space>" ) + ( MPDbAdapter . KEY_DATA ) ) + "<seq2seq4repair_space>STRING<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL,<seq2seq4repair_space>" ) + ( MPDbAdapter . KEY_CREATED_AT ) ) + "<seq2seq4repair_space>INTEGER<seq2seq4repair_space>NOT<seq2seq4repair_space>NULL);" ; private static final String EVENTS_TIME_INDEX = ( ( ( "CREATE<seq2seq4repair_space>INDEX<seq2seq4repair_space>IF<seq2seq4repair_space>NOT<seq2seq4repair_space>EXISTS<seq2seq4repair_space>time_idx<seq2seq4repair_space>ON<seq2seq4repair_space>" + ( MPDbAdapter . Table . EVENTS . getName ( ) ) ) + "<seq2seq4repair_space>(" ) + ( MPDbAdapter . KEY_CREATED_AT ) ) + ");" ; private static final String PEOPLE_TIME_INDEX = ( ( ( "CREATE<seq2seq4repair_space>INDEX<seq2seq4repair_space>IF<seq2seq4repair_space>NOT<seq2seq4repair_space>EXISTS<seq2seq4repair_space>time_idx<seq2seq4repair_space>ON<seq2seq4repair_space>" + ( MPDbAdapter . Table . PEOPLE . getName ( ) ) ) + "<seq2seq4repair_space>(" ) + ( MPDbAdapter . KEY_CREATED_AT ) ) + ");" ; private final MPDbAdapter . MPDatabaseHelper mDb ; private static class MPDatabaseHelper extends SQLiteOpenHelper { MPDatabaseHelper ( Context context , String dbName ) { } public void deleteDatabase ( ) { } @ Override public void onCreate ( SQLiteDatabase db ) { } @ Override public void onUpgrade ( SQLiteDatabase db , int oldVersion , int newVersion ) { } public boolean belowMemThreshold ( ) { if ( mDatabaseFile . exists ( ) ) { <START_BUG> return ( mDatabaseFile . getUsableSpace ( ) ) >= ( mDatabaseFile . length ( ) ) ; <END_BUG> } return true ; } private final File mDatabaseFile ; } public MPDbAdapter ( Context context ) { } public MPDbAdapter ( Context context , String dbName ) { } public int addJSON ( JSONObject j , MPDbAdapter . Table table ) { } public void cleanupEvents ( String last_id , MPDbAdapter . Table table ) { } public void cleanupEvents ( long time , MPDbAdapter . Table table ) { } public void deleteDB ( ) { } public String [ ] generateDataString ( MPDbAdapter . Table table ) { } public boolean belowMemThreshold ( ) { return mDb . belowMemThreshold ( ) ; } }

Fix:
return ( mDatabaseFile . getUsableSpace ( ) ) >= ( Math . min ( mDatabaseFile . length ( ) , ( ( 20 * 1024 ) * 1024 ) ) ) ;