Buggy code:
public static final String DATABASE_NAME = "smarthome" ; public static final String DEVICES_TABLE = "devices" ; public static final String SCENE_TABLE = "scene_table" ; public static final String SCENE_DEVICES_TABLE = "scene_devices_table" ; public static final String VIDEO_TABLE = "video" ; public static final String MESSAGE_TABLE = "message_table" ; public static final String ROOMINFO_TABLE = "roominfo_table" ; public static final String BIND_TABLE = "bind_table" ; public static final String GATEWAY_TABLE = "gateway_table" ; public static final String LINKAGE_TABLE = "linkage_table" ; public static final String TIMINGACTION_TABLE = "timingaction_table" ; public static final String IPC_LINKAGE_TABLE = "ipc_linkage_table" ; public static final String RF_DEVICES_TABLE = "rf_devices_table" ; public static final int DATEBASE_VERSTION = 6 ; public StringBuilder deviceStringBuilder ; public StringBuilder sceneStringBuilder ; public StringBuilder sceneDevicesStringBuilder ; public StringBuilder videoStringBuilder ; public StringBuilder messageStringBuilder ; public StringBuilder roominfoStringBuilder ; public StringBuilder bindStringBuilder ; public StringBuilder gatewayStringBuilder ; public StringBuilder linkageStringBuilder ; public StringBuilder timingactionStringBuilder ; public StringBuilder ipc_linkageStringBuilder ; public StringBuilder rfdeviceStringBuilder ; public DataHelper ( Context contex ) { } private void initStringBuilder ( ) { } @ Override public void onCreate ( SQLiteDatabase db ) { } @ Override public void onUpgrade ( SQLiteDatabase db , int oldVersion , int newVersion ) { } public static List < DevicesModel > convertToDevicesModel ( ArrayList < ResponseParamsEndPoint > r ) { } public long insertDevice ( SQLiteDatabase db , String table , String nullColumnHack , DevicesModel values ) { } public long insertDevList ( SQLiteDatabase db , String table , String nullColumnHack , List < DevicesModel > values ) { } public long insertEndPointList ( SQLiteDatabase db , String table , String nullColumnHack , ArrayList < ResponseParamsEndPoint > r ) { } private boolean isFilterDevice ( DevicesModel devicesModel ) { } public long insertVideoList ( SQLiteDatabase db , String table , String nullColumnHack , ArrayList < VideoNode > arrayList ) { } public long insertMessageList ( SQLiteDatabase db , String table , String nullColumnHack , ArrayList < CallbackWarnMessage > arrayList ) { } public void emptyTable ( SQLiteDatabase db , String table ) { } public long insertAddRoomInfo ( SQLiteDatabase db , String table , String nullColumnHack , ArrayList < Room > r ) { } public long insertRoomInfoList ( SQLiteDatabase db , String table , String nullColumnHack , ArrayList < GetRoomInfo_response > r ) { } public long insertLinkage ( SQLiteDatabase db , String table , String nullColumnHack , Linkage values ) { } public long insertLinkageList ( SQLiteDatabase db , String table , String nullColumnHack , List < Linkage > values ) { } public int delete ( SQLiteDatabase db , String table , String whereClause , String [ ] whereArgs ) { } public int update ( SQLiteDatabase db , String table , ContentValues values , String whereClause , String [ ] whereArgs ) { } public void execSQL ( SQLiteDatabase db , String sql ) { } public Cursor query ( SQLiteDatabase db , String table , String [ ] columns , String selection , String [ ] selectionArgs , String groupBy , String having , String orderBy , String limit ) { } public static List < VideoNode > getVideoList ( Context c , DataHelper dh ) { List < VideoNode > mList = new ArrayList < VideoNode > ( ) ; Cursor cursor = null ; SQLiteDatabase db = dh . getSQLiteDatabase ( ) ; <START_BUG> cursor = db . query ( DataHelper . VIDEO_TABLE , null , null , null , null , null , null , null ) ; <END_BUG> VideoNode mVideoNode ; while ( cursor . moveToNext ( ) ) { mVideoNode = new VideoNode ( ) ; mVideoNode . setAliases ( cursor . getString ( cursor . getColumnIndex ( ALIAS ) ) ) ; mVideoNode . setHttpport ( cursor . getString ( cursor . getColumnIndex ( HTTPPORT ) ) ) ; mVideoNode . setId ( cursor . getString ( cursor . getColumnIndex ( ID ) ) ) ; mVideoNode . setIpc_ipaddr ( cursor . getString ( cursor . getColumnIndex ( IPC_IPADDR ) ) ) ; mVideoNode . setName ( cursor . getString ( cursor . getColumnIndex ( NAME ) ) ) ; mVideoNode . setPassword ( cursor . getString ( cursor . getColumnIndex ( PASSWORD ) ) ) ; mVideoNode . setRtspport ( cursor . getString ( cursor . getColumnIndex ( RTSPORT ) ) ) ; mVideoNode . setIndex ( cursor . getInt ( cursor . getColumnIndex ( IPC_INDEX ) ) ) ; mVideoNode . setRoomId ( cursor . getInt ( cursor . getColumnIndex ( ROOMID ) ) ) ; mVideoNode . setIpc_status ( cursor . getString ( cursor . getColumnIndex ( IPC_STATUS ) ) ) ; mVideoNode . setDomainName ( cursor . getString ( cursor . getColumnIndex ( DOMAIN_NAME ) ) ) ; mVideoNode . setSerialNum ( cursor . getString ( cursor . getColumnIndex ( SERIAL_NUM ) ) ) ; mList . add ( mVideoNode ) ; } cursor . close ( ) ; return mList ; } public static List < Linkage > queryForLinkageList ( SQLiteDatabase db , String table , String selection , String [ ] selectionArgs ) { } public List < DevicesModel > queryForBindDevicesList ( SQLiteDatabase db , String table , String selection , String [ ] selectionArgs ) { } public List < DevicesModel > queryForDevicesList ( SQLiteDatabase db , String table , String [ ] columns , String selection , String [ ] selectionArgs , String groupBy , String having , String orderBy , String limit ) { } public List < SceneInfo > queryForSceneInfoList ( SQLiteDatabase db , String [ ] columns , String selection , String [ ] selectionArgs , String groupBy , String having , String orderBy , String limit ) { } public List < SceneDevice > queryForSceneDevicesList ( SQLiteDatabase db , String [ ] columns , String selection , String [ ] selectionArgs , String groupBy , String having , String orderBy , String limit ) { }

Fix:
cursor = db . query ( DataHelper . VIDEO_TABLE , null , null , null , null , null , ID , null ) ;