Buggy code:
public class OrgDatabase extends SQLiteOpenHelper { private static final String DATABASE_NAME = "MobileOrg.db" ; private static final int DATABASE_VERSION = 3 ; private static final String [ ] nodeFields = new String [ ] { "_id" , "name" , "todo" , "tags" , "priority" , "payload" , "parent_id" , "file_id" } ; @ SuppressWarnings ( "unused" ) private int orgdata_idColumn ; private int orgdata_nameColumn ; private int orgdata_todoColumn ; private int orgdata_tagsColumn ; private int orgdata_priorityColumn ; @ SuppressWarnings ( "unused" ) private int orgdata_payloadColumn ; private int orgdata_parentidColumn ; private int orgdata_fileidColumn ; private Context context ; private SQLiteDatabase db ; private InsertHelper orgdataInsertHelper ; private SQLiteStatement addPayloadStatement ; public OrgDatabase ( Context context ) { } public SQLiteDatabase getDB ( ) { } @ Override public void onCreate ( SQLiteDatabase db ) { } public Cursor getFileCursor ( ) { <START_BUG> return db . rawQuery ( ( "SELECT<seq2seq4repair_space>data.*<seq2seq4repair_space>FROM<seq2seq4repair_space>orgdata<seq2seq4repair_space>data<seq2seq4repair_space>JOIN" + "(SELECT<seq2seq4repair_space>f.node_id<seq2seq4repair_space>FROM<seq2seq4repair_space>files<seq2seq4repair_space>f)<seq2seq4repair_space>file<seq2seq4repair_space>on<seq2seq4repair_space>file.node_id<seq2seq4repair_space>=<seq2seq4repair_space>data._id<seq2seq4repair_space>ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>data.name<seq2seq4repair_space>ASC;" ) , null ) ; <END_BUG> } public long getFileNodeId ( String filename ) { } public String getFilenameFromNodeId ( Long node_id ) { } public String getFilename ( Long file_id ) { } public long getFileId ( String filename ) { } public void removeFile ( String filename ) { } public void removeFile ( Long node_id ) { } public long addOrUpdateFile ( String filename , String name , String checksum , boolean includeInOutline ) { } public HashMap < String , String > getFiles ( ) { } public HashMap < String , String > getFileChecksums ( ) { } public long addNode ( Long parentid , String name , String todo , String priority , String tags , long file_id ) { } private void prepareOrgdataInsert ( ) { } public void addNodePayload ( Long id , final String payload ) { } public Cursor getNode ( Long id ) { } public void updateNodeField ( NodeWrapper node , String entry , String value ) { } public String getNodePayloadReal ( String nodeId ) { } public Cursor getNodeChildren ( Long id ) { } public boolean hasNodeChildren ( Long id ) { } public boolean isNodeEditable ( Long node_id ) { } public boolean deleteNode ( Long node_id ) { } public void cloneNode ( Long node_id , Long parent_id , Long target_file_id ) { } public Cursor getFileSchedule ( String filename ) { } public void addEdit ( String edittype , String nodeId , String nodeTitle , String oldValue , String newValue ) { } public String fileToString ( String filename ) { } private String nodeToString ( Cursor cursor ) { } public String editsToString ( ) { } private static String editToString ( String nodeId , String title , String editType , String oldVal , String newVal ) { } public void clearEdits ( ) { } public void setTodos ( ArrayList < HashMap < String , Boolean > > todos ) { } public ArrayList < String > getTodos ( ) { } public boolean isTodoActive ( String todo ) { } public ArrayList < HashMap < String , Integer > > getGroupedTodos ( ) { } public ArrayList < String > getPriorities ( ) { } public void setPriorities ( ArrayList < String > priorities ) { } public ArrayList < String > getTags ( ) { } public void setTags ( ArrayList < String > priorities ) { } public void clearDB ( ) { } public Cursor search ( String query ) { } public long getNodeFromPath ( String path ) { } @ SuppressWarnings ( "unused" ) private long findNodeWithName ( Cursor nodes , String name ) { } @ Override public void onUpgrade ( SQLiteDatabase db , int oldVersion , int newVersion ) { } private ArrayList < String > cursorToArrayList ( Cursor cursor ) { } No newline ; at end ; of file ; }

Fix:
return db . rawQuery ( ( "SELECT<seq2seq4repair_space>data.*<seq2seq4repair_space>FROM<seq2seq4repair_space>orgdata<seq2seq4repair_space>data<seq2seq4repair_space>JOIN" + "(SELECT<seq2seq4repair_space>node_id<seq2seq4repair_space>FROM<seq2seq4repair_space>files)<seq2seq4repair_space>file<seq2seq4repair_space>on<seq2seq4repair_space>file.node_id<seq2seq4repair_space>=<seq2seq4repair_space>data._id<seq2seq4repair_space>ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>data.name<seq2seq4repair_space>ASC;" ) , null ) ;