Buggy code:
private static final String A_CREATE = ( ( ( ( ( ( ( "create<seq2seq4repair_space>table<seq2seq4repair_space>" + ( DBAdapter . TABLE_ATTENDANCE ) ) + "<seq2seq4repair_space>(_id<seq2seq4repair_space>integer<seq2seq4repair_space>primary<seq2seq4repair_space>key<seq2seq4repair_space>autoincrement,<seq2seq4repair_space>" ) + ( DBAdapter . A_FK_STUDENT ) ) + "<seq2seq4repair_space>integer<seq2seq4repair_space>not<seq2seq4repair_space>null,<seq2seq4repair_space>" ) + ( DBAdapter . A_DATE ) ) + "<seq2seq4repair_space>integer<seq2seq4repair_space>not<seq2seq4repair_space>null,<seq2seq4repair_space>" ) + ( DBAdapter . A_FK_COURSE ) ) + "<seq2seq4repair_space>integer<seq2seq4repair_space>not<seq2seq4repair_space>null<seq2seq4repair_space>);" ; public boolean createAttendance ( long fkStudent , Date date , long fkCourseId ) { } public Cursor allAttendanceFromStudent ( long courseId , long studentId ) { } public Cursor allAttendances ( ) { } public static final String TABLE_CONCEPT_TEST = "contept_test" ; public static final String CT_KEY_ROWID = "_id" ; public static final String CT_FK_CTT = "fk_ctt" ; public static final String CT_DATE = "date" ; public static final String CT_RESULT_A = "result_a" ; public static final String CT_RESULT_B = "result_b" ; public static final String CT_RESULT_C = "result_c" ; public static final String CT_RESULT_D = "result_d" ; private static final String CT_CREATE = ( ( ( ( ( ( ( ( ( ( ( ( ( "create<seq2seq4repair_space>table<seq2seq4repair_space>" + ( DBAdapter . TABLE_CONCEPT_TEST ) ) + "<seq2seq4repair_space>(_id<seq2seq4repair_space>integer<seq2seq4repair_space>primary<seq2seq4repair_space>key<seq2seq4repair_space>autoincrement,<seq2seq4repair_space>" ) + ( DBAdapter . CT_FK_CTT ) ) + "<seq2seq4repair_space>integer<seq2seq4repair_space>not<seq2seq4repair_space>null,<seq2seq4repair_space>" ) + ( DBAdapter . CT_DATE ) ) + "<seq2seq4repair_space>integer<seq2seq4repair_space>not<seq2seq4repair_space>null,<seq2seq4repair_space>" ) + ( DBAdapter . CT_RESULT_A ) ) + "<seq2seq4repair_space>integer<seq2seq4repair_space>not<seq2seq4repair_space>null,<seq2seq4repair_space>" ) + ( DBAdapter . CT_RESULT_C ) ) + "<seq2seq4repair_space>integer<seq2seq4repair_space>not<seq2seq4repair_space>null,<seq2seq4repair_space>" ) + ( DBAdapter . CT_RESULT_B ) ) + "<seq2seq4repair_space>integer<seq2seq4repair_space>not<seq2seq4repair_space>null,<seq2seq4repair_space>" ) + ( DBAdapter . CT_RESULT_D ) ) + "<seq2seq4repair_space>integer<seq2seq4repair_space>not<seq2seq4repair_space>null<seq2seq4repair_space>);" ; public boolean createConceptTest ( long fkCTT , Date date , int result_a , int result_b , int result_c , int result_d ) { } public Cursor allConceptTestWithFkId ( long fkCourseId ) { } public Cursor allConceptTest ( ) { } public Cursor fetchConceptTest ( long rowId ) { } public static final String TABLE_CONCEPT_TEST_TEMPLATE = "contept_test_template" ; public static final String CTT_KEY_ROWID = "_id" ; public static final String CTT_FK_C = "fk_course" ; public static final String CTT_TITLE = "title" ; public static final String CTT_DESCRIPTION = "description" ; public static final String CTT_OPTION_A = "option_a" ; public static final String CTT_OPTION_B = "option_b" ; public static final String CTT_OPTION_C = "option_c" ; public static final String CTT_OPTION_D = "option_d" ; public static final String CTT_CORRECT = "correct" ; private static final String CTT_CREATE = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "create<seq2seq4repair_space>table<seq2seq4repair_space>" + ( DBAdapter . TABLE_CONCEPT_TEST_TEMPLATE ) ) + "<seq2seq4repair_space>(_id<seq2seq4repair_space>integer<seq2seq4repair_space>primary<seq2seq4repair_space>key<seq2seq4repair_space>autoincrement,<seq2seq4repair_space>" ) + ( DBAdapter . CTT_FK_C ) ) + "<seq2seq4repair_space>integer<seq2seq4repair_space>not<seq2seq4repair_space>null,<seq2seq4repair_space>" ) + ( DBAdapter . CTT_TITLE ) ) + "<seq2seq4repair_space>text<seq2seq4repair_space>not<seq2seq4repair_space>null,<seq2seq4repair_space>" ) + ( DBAdapter . CTT_DESCRIPTION ) ) + "<seq2seq4repair_space>text<seq2seq4repair_space>not<seq2seq4repair_space>null,<seq2seq4repair_space>" ) + ( DBAdapter . CTT_OPTION_A ) ) + "<seq2seq4repair_space>text<seq2seq4repair_space>not<seq2seq4repair_space>null,<seq2seq4repair_space>" ) + ( DBAdapter . CTT_OPTION_C ) ) + "<seq2seq4repair_space>text<seq2seq4repair_space>not<seq2seq4repair_space>null,<seq2seq4repair_space>" ) + ( DBAdapter . CTT_OPTION_B ) ) + "<seq2seq4repair_space>text<seq2seq4repair_space>not<seq2seq4repair_space>null,<seq2seq4repair_space>" ) + ( DBAdapter . CTT_OPTION_D ) ) + "<seq2seq4repair_space>text<seq2seq4repair_space>not<seq2seq4repair_space>null,<seq2seq4repair_space>" ) + ( DBAdapter . CTT_CORRECT ) ) + "<seq2seq4repair_space>integer<seq2seq4repair_space>not<seq2seq4repair_space>null);" ; public long createConceptTestTemplate ( long fkCourse , String title , String description , String option_a , String option_b , String option_c , String option_d , int correct ) { } public Cursor allConceptTestTemplates ( long fkCourse ) { } public Cursor allConceptTestTemplates ( ) { } public Cursor fetchConceptTestTemplate ( long rowId ) { } public static final String TABLE_COURSE = "course" ; public static final String C_KEY_ROWID = "_id" ; public static final String C_TITLE = "ctitle" ; public static final String C_DESCRIPTION = "cdescription" ; public static final String C_LOCATION = "location" ; public static final String C_MAIL = "cmail" ; public static final String C_APPROVAL_CRITERIA = "approval_criteria" ; private static final String C_CREATE = ( ( ( ( ( ( ( ( ( ( ( "create<seq2seq4repair_space>table<seq2seq4repair_space>" + ( DBAdapter . TABLE_COURSE ) ) + "<seq2seq4repair_space>(_id<seq2seq4repair_space>integer<seq2seq4repair_space>primary<seq2seq4repair_space>key<seq2seq4repair_space>autoincrement,<seq2seq4repair_space>" ) + ( DBAdapter . C_TITLE ) ) + "<seq2seq4repair_space>text<seq2seq4repair_space>not<seq2seq4repair_space>null,<seq2seq4repair_space>" ) + ( DBAdapter . C_DESCRIPTION ) ) + "<seq2seq4repair_space>text<seq2seq4repair_space>not<seq2seq4repair_space>null,<seq2seq4repair_space>" ) + ( DBAdapter . C_LOCATION ) ) + "<seq2seq4repair_space>text<seq2seq4repair_space>not<seq2seq4repair_space>null,<seq2seq4repair_space>" ) + ( DBAdapter . C_MAIL ) ) + "<seq2seq4repair_space>text<seq2seq4repair_space>not<seq2seq4repair_space>null,<seq2seq4repair_space>" ) + ( DBAdapter . C_APPROVAL_CRITERIA ) ) + "<seq2seq4repair_space>integer<seq2seq4repair_space>not<seq2seq4repair_space>null<seq2seq4repair_space>);" ; public long createCourse ( String title , String description , String location , String teacherMail , long approvalCriteria ) { } public Cursor allCourses ( ) { } public List < HomeDrawerItem > allCoursesWithLabels ( ) { } public Cursor fetchCourse ( long rowId ) { <START_BUG> Cursor mCursor = database . query ( true , DBAdapter . TABLE_COURSE , new String [ ] { DBAdapter . C_TITLE , DBAdapter . C_DESCRIPTION , DBAdapter . C_LOCATION , DBAdapter . C_MAIL , DBAdapter . C_APPROVAL_CRITERIA } , ( ( DBAdapter . C_KEY_ROWID ) + "=?" ) , new String [ ] { String . valueOf ( rowId ) } , null , null , null , null ) ; <END_BUG>

Fix:
Cursor mCursor = database . query ( true , DBAdapter . TABLE_COURSE , new String [ ] { DBAdapter . C_KEY_ROWID , DBAdapter . C_TITLE , DBAdapter . C_DESCRIPTION , DBAdapter . C_LOCATION , DBAdapter . C_MAIL , DBAdapter . C_APPROVAL_CRITERIA } , ( ( DBAdapter . C_KEY_ROWID ) + "=?" ) , new String [ ] { String . valueOf ( rowId ) } , null , null , null , null ) ;