Program: 53335
Project: 53335
Buggy source:
/** 
 * Creates the tables, views, triggers and indices. TODO: move all strings to separate final static variables.
 */
@Override public void onCreate(SQLiteDatabase db){
  db.execSQL(SQL_CREATE_LISTS_TABLE);
  db.execSQL("String_Node_Str" + Tables.LISTS + "String_Node_Str"+ Tables.TASKS+ "String_Node_Str"+ TaskContract.Tasks.LIST_ID+ "String_Node_Str"+ TaskContract.TaskLists._ID+ "String_Node_Str");
  db.execSQL(SQL_CREATE_TASKS_TABLE);
  db.execSQL("String_Node_Str" + Tables.TASKS + "String_Node_Str"+ Tables.LISTS+ "String_Node_Str"+ TaskContract.TaskLists._DIRTY+ "String_Node_Str"+ TaskContract.TaskLists._DIRTY+ "String_Node_Str"+ "String_Node_Str"+ TaskContract.Tasks._DIRTY+ "String_Node_Str"+ "String_Node_Str"+ TaskContract.Tasks._DELETED+ "String_Node_Str"+ TaskContract.TaskLists._ID+ "String_Node_Str"+ TaskContract.Tasks.LIST_ID+ "String_Node_Str");
  db.execSQL("String_Node_Str" + Tables.TASKS + "String_Node_Str"+ Tables.LISTS+ "String_Node_Str"+ TaskContract.TaskLists._DIRTY+ "String_Node_Str"+ TaskContract.TaskLists._DIRTY+ "String_Node_Str"+ "String_Node_Str"+ TaskContract.Tasks._DIRTY+ "String_Node_Str"+ "String_Node_Str"+ TaskContract.Tasks._DELETED+ "String_Node_Str"+ TaskContract.TaskLists._ID+ "String_Node_Str"+ TaskContract.Tasks.LIST_ID+ "String_Node_Str");
  db.execSQL(SQL_CREATE_INSTANCES_TABLE);
  db.execSQL(SQL_CREATE_CATEGORIES_TABLE);
  db.execSQL(SQL_CREATE_CATEGORIES_MAPPING_TABLE);
  db.execSQL(SQL_CREATE_ALARMS_TABLE);
  db.execSQL(SQL_CREATE_PROPERTIES_TABLE);
  db.execSQL(SQL_CREATE_TASK_VIEW);
  db.execSQL(SQL_CREATE_TASK_PROPERTY_VIEW);
  db.execSQL(SQL_CREATE_INSTANCE_VIEW);
  db.execSQL(SQL_CREATE_INSTANCE_PROPERTY_VIEW);
  db.execSQL(SQL_CREATE_INSTANCE_CATEGORY_VIEW);
  db.execSQL(createIndexString(Tables.INSTANCES,false,TaskContract.Instances.TASK_ID,TaskContract.Instances.INSTANCE_START,TaskContract.Instances.INSTANCE_DUE));
  db.execSQL(createIndexString(Tables.LISTS,false,TaskContract.TaskLists.ACCOUNT_NAME,TaskContract.TaskLists.ACCOUNT_TYPE));
  db.execSQL(createIndexString(Tables.TASKS,false,TaskContract.Tasks.STATUS,TaskContract.Tasks.LIST_ID,TaskContract.Tasks._SYNC_ID));
  db.execSQL(createIndexString(Tables.PROPERTIES,false,TaskContract.Properties.MIMETYPE,TaskContract.Properties.TASK_ID));
  db.execSQL(createIndexString(Tables.PROPERTIES,false,TaskContract.Properties.TASK_ID));
  db.execSQL(createIndexString(Tables.CATEGORIES,false,TaskContract.Categories.ACCOUNT_NAME,TaskContract.Categories.ACCOUNT_TYPE,TaskContract.Categories.NAME));
  db.execSQL(createIndexString(Tables.CATEGORIES,false,TaskContract.Categories.NAME));
  db.execSQL(SQL_CREATE_TASKS_CLEANUP_TRIGGER);
  db.execSQL(SQL_CREATE_ALARM_PROPERTY_CLEANUP_TRIGGER);
  db.execSQL(SQL_CREATE_LISTS_CLEANUP_TRIGGER);
  db.execSQL(SQL_CREATE_ALARM_COUNT_CREATE_TRIGGER);
  db.execSQL(SQL_CREATE_ALARM_COUNT_UPDATE_TRIGGER);
  db.execSQL(SQL_CREATE_ALARM_COUNT_DELETE_TRIGGER);
  FTSDatabaseHelper.onCreate(db);
  if (mCreateLocalList) {
    db.execSQL("String_Node_Str" + Tables.LISTS + "String_Node_Str"+ TaskLists.ACCOUNT_TYPE+ "String_Node_Str"+ TaskLists.ACCOUNT_NAME+ "String_Node_Str"+ TaskLists.LIST_NAME+ "String_Node_Str"+ TaskLists.LIST_COLOR+ "String_Node_Str"+ TaskLists.VISIBLE+ "String_Node_Str"+ TaskLists.SYNC_ENABLED+ "String_Node_Str"+ TaskLists.OWNER+ "String_Node_Str",new Object[]{TaskContract.LOCAL_ACCOUNT,"String_Node_Str","String_Node_Str",Color.rgb(30,136,229),1,1,"String_Node_Str"});
  }
}

Fixed version (ground truth):
/** 
 * Creates the tables, views, triggers and indices. TODO: move all strings to separate final static variables.
 */
@Override public void onCreate(SQLiteDatabase db){
  db.execSQL(SQL_CREATE_LISTS_TABLE);
  db.execSQL("String_Node_Str" + Tables.LISTS + "String_Node_Str"+ Tables.TASKS+ "String_Node_Str"+ TaskContract.Tasks.LIST_ID+ "String_Node_Str"+ TaskContract.TaskLists._ID+ "String_Node_Str");
  db.execSQL(SQL_CREATE_TASKS_TABLE);
  db.execSQL("String_Node_Str" + Tables.TASKS + "String_Node_Str"+ Tables.LISTS+ "String_Node_Str"+ TaskContract.TaskLists._DIRTY+ "String_Node_Str"+ TaskContract.TaskLists._DIRTY+ "String_Node_Str"+ "String_Node_Str"+ TaskContract.Tasks._DIRTY+ "String_Node_Str"+ "String_Node_Str"+ TaskContract.Tasks._DELETED+ "String_Node_Str"+ TaskContract.TaskLists._ID+ "String_Node_Str"+ TaskContract.Tasks.LIST_ID+ "String_Node_Str");
  db.execSQL("String_Node_Str" + Tables.TASKS + "String_Node_Str"+ Tables.LISTS+ "String_Node_Str"+ TaskContract.TaskLists._DIRTY+ "String_Node_Str"+ TaskContract.TaskLists._DIRTY+ "String_Node_Str"+ "String_Node_Str"+ TaskContract.Tasks._DIRTY+ "String_Node_Str"+ "String_Node_Str"+ TaskContract.Tasks._DELETED+ "String_Node_Str"+ TaskContract.TaskLists._ID+ "String_Node_Str"+ TaskContract.Tasks.LIST_ID+ "String_Node_Str");
  db.execSQL(SQL_CREATE_INSTANCES_TABLE);
  db.execSQL(SQL_CREATE_CATEGORIES_TABLE);
  db.execSQL(SQL_CREATE_CATEGORIES_MAPPING_TABLE);
  db.execSQL(SQL_CREATE_ALARMS_TABLE);
  db.execSQL(SQL_CREATE_PROPERTIES_TABLE);
  db.execSQL(SQL_CREATE_TASK_VIEW);
  db.execSQL(SQL_CREATE_TASK_PROPERTY_VIEW);
  db.execSQL(SQL_CREATE_INSTANCE_VIEW);
  db.execSQL(SQL_CREATE_INSTANCE_PROPERTY_VIEW);
  db.execSQL(SQL_CREATE_INSTANCE_CATEGORY_VIEW);
  db.execSQL(createIndexString(Tables.INSTANCES,false,TaskContract.Instances.TASK_ID,TaskContract.Instances.INSTANCE_START,TaskContract.Instances.INSTANCE_DUE));
  db.execSQL(createIndexString(Tables.LISTS,false,TaskContract.TaskLists.ACCOUNT_NAME,TaskContract.TaskLists.ACCOUNT_TYPE));
  db.execSQL(createIndexString(Tables.TASKS,false,TaskContract.Tasks.STATUS,TaskContract.Tasks.LIST_ID,TaskContract.Tasks._SYNC_ID));
  db.execSQL(createIndexString(Tables.PROPERTIES,false,TaskContract.Properties.MIMETYPE,TaskContract.Properties.TASK_ID));
  db.execSQL(createIndexString(Tables.PROPERTIES,false,TaskContract.Properties.TASK_ID));
  db.execSQL(createIndexString(Tables.CATEGORIES,false,TaskContract.Categories.ACCOUNT_NAME,TaskContract.Categories.ACCOUNT_TYPE,TaskContract.Categories.NAME));
  db.execSQL(createIndexString(Tables.CATEGORIES,false,TaskContract.Categories.NAME));
  db.execSQL(SQL_CREATE_TASKS_CLEANUP_TRIGGER);
  db.execSQL(SQL_CREATE_ALARM_PROPERTY_CLEANUP_TRIGGER);
  db.execSQL(SQL_CREATE_LISTS_CLEANUP_TRIGGER);
  db.execSQL(SQL_CREATE_ALARM_COUNT_CREATE_TRIGGER);
  db.execSQL(SQL_CREATE_ALARM_COUNT_UPDATE_TRIGGER);
  db.execSQL(SQL_CREATE_ALARM_COUNT_DELETE_TRIGGER);
  db.execSQL(SQL_CREATE_TASK_PROPERTY_CLEANUP_TRIGGER);
  FTSDatabaseHelper.onCreate(db);
  if (mCreateLocalList) {
    db.execSQL("String_Node_Str" + Tables.LISTS + "String_Node_Str"+ TaskLists.ACCOUNT_TYPE+ "String_Node_Str"+ TaskLists.ACCOUNT_NAME+ "String_Node_Str"+ TaskLists.LIST_NAME+ "String_Node_Str"+ TaskLists.LIST_COLOR+ "String_Node_Str"+ TaskLists.VISIBLE+ "String_Node_Str"+ TaskLists.SYNC_ENABLED+ "String_Node_Str"+ TaskLists.OWNER+ "String_Node_Str",new Object[]{TaskContract.LOCAL_ACCOUNT,"String_Node_Str","String_Node_Str",Color.rgb(30,136,229),1,1,"String_Node_Str"});
  }
}