Program: 13904
Project: 13904
Buggy source:
public WordPressDB(Context ctx){
  db=ctx.openOrCreateDatabase(DATABASE_NAME,0,null);
  db.execSQL(CREATE_TABLE_QUICKPRESS_SHORTCUTS);
  db.execSQL(CREATE_TABLE_THEMES);
  SiteSettingsTable.createTable(db);
  SuggestionTable.createTables(db);
  NotificationsTable.createTables(db);
  int currentVersion=db.getVersion();
  boolean isNewInstall=(currentVersion == 0);
  if (!isNewInstall && currentVersion != DATABASE_VERSION) {
    AppLog.d(T.DB,"String_Node_Str" + currentVersion + "String_Node_Str"+ DATABASE_VERSION);
  }
switch (currentVersion) {
case 0:
    currentVersion++;
case 1:
  currentVersion=9;
case 9:
currentVersion++;
case 10:
currentVersion++;
case 11:
currentVersion++;
case 12:
currentVersion++;
case 13:
currentVersion++;
case 14:
currentVersion++;
case 15:
currentVersion++;
case 16:
currentVersion++;
case 17:
currentVersion++;
case 18:
currentVersion++;
case 19:
currentVersion++;
case 20:
currentVersion++;
case 21:
currentVersion++;
case 22:
currentVersion++;
case 23:
currentVersion++;
case 24:
currentVersion++;
case 25:
currentVersion++;
case 26:
db.execSQL(DROP_TABLE_PREFIX + NOTES_TABLE);
currentVersion++;
case 27:
currentVersion++;
case 28:
currentVersion++;
case 29:
currentVersion++;
case 30:
currentVersion++;
case 31:
currentVersion++;
case 32:
currentVersion++;
case 33:
currentVersion++;
case 34:
currentVersion++;
case 35:
ctx.deleteDatabase("String_Node_Str");
currentVersion++;
case 36:
ctx.deleteDatabase("String_Node_Str");
currentVersion++;
case 37:
resetThemeTable();
currentVersion++;
case 38:
currentVersion++;
case 39:
currentVersion++;
case 40:
currentVersion++;
case 41:
currentVersion++;
case 42:
currentVersion++;
case 43:
currentVersion++;
case 44:
PeopleTable.createTables(db);
currentVersion++;
case 45:
currentVersion++;
case 46:
AppPrefs.setVisualEditorAvailable(true);
AppPrefs.setVisualEditorEnabled(true);
currentVersion++;
case 47:
PeopleTable.reset(db);
currentVersion++;
case 48:
PeopleTable.createViewersTable(db);
currentVersion++;
case 49:
ctx.deleteDatabase("String_Node_Str");
currentVersion++;
case 51:
SiteSettingsTable.addOptimizedImageToSiteSettingsTable(db);
currentVersion++;
}
db.setVersion(DATABASE_VERSION);
}

Fixed version (ground truth):
public WordPressDB(Context ctx){
  db=ctx.openOrCreateDatabase(DATABASE_NAME,0,null);
  db.execSQL(CREATE_TABLE_QUICKPRESS_SHORTCUTS);
  db.execSQL(CREATE_TABLE_THEMES);
  SiteSettingsTable.createTable(db);
  SuggestionTable.createTables(db);
  NotificationsTable.createTables(db);
  int currentVersion=db.getVersion();
  boolean isNewInstall=(currentVersion == 0);
  if (!isNewInstall && currentVersion != DATABASE_VERSION) {
    AppLog.d(T.DB,"String_Node_Str" + currentVersion + "String_Node_Str"+ DATABASE_VERSION);
  }
switch (currentVersion) {
case 0:
    currentVersion++;
case 1:
  currentVersion=9;
case 9:
currentVersion++;
case 10:
currentVersion++;
case 11:
currentVersion++;
case 12:
currentVersion++;
case 13:
currentVersion++;
case 14:
currentVersion++;
case 15:
currentVersion++;
case 16:
currentVersion++;
case 17:
currentVersion++;
case 18:
currentVersion++;
case 19:
currentVersion++;
case 20:
currentVersion++;
case 21:
currentVersion++;
case 22:
currentVersion++;
case 23:
currentVersion++;
case 24:
currentVersion++;
case 25:
currentVersion++;
case 26:
db.execSQL(DROP_TABLE_PREFIX + NOTES_TABLE);
currentVersion++;
case 27:
currentVersion++;
case 28:
currentVersion++;
case 29:
currentVersion++;
case 30:
currentVersion++;
case 31:
currentVersion++;
case 32:
currentVersion++;
case 33:
currentVersion++;
case 34:
currentVersion++;
case 35:
ctx.deleteDatabase("String_Node_Str");
currentVersion++;
case 36:
ctx.deleteDatabase("String_Node_Str");
currentVersion++;
case 37:
resetThemeTable();
currentVersion++;
case 38:
currentVersion++;
case 39:
currentVersion++;
case 40:
currentVersion++;
case 41:
currentVersion++;
case 42:
currentVersion++;
case 43:
currentVersion++;
case 44:
PeopleTable.createTables(db);
currentVersion++;
case 45:
currentVersion++;
case 46:
AppPrefs.setVisualEditorAvailable(true);
AppPrefs.setVisualEditorEnabled(true);
currentVersion++;
case 47:
PeopleTable.reset(db);
currentVersion++;
case 48:
PeopleTable.createViewersTable(db);
currentVersion++;
case 49:
ctx.deleteDatabase("String_Node_Str");
currentVersion++;
case 50:
currentVersion++;
case 51:
SiteSettingsTable.addOptimizedImageToSiteSettingsTable(db);
currentVersion++;
case 52:
try {
SiteSettingsTable.addOptimizedImageToSiteSettingsTable(db);
}
 catch (SQLiteException e) {
}
currentVersion++;
}
db.setVersion(DATABASE_VERSION);
}