Program: 33652
Project: 33652
Buggy source:
@Override public void onUpgrade(SQLiteDatabase db,int oldVersion,int newVersion){
  Log.w(Constants.LOG_TAG,"String_Node_Str" + oldVersion + "String_Node_Str"+ newVersion);
  int upgradeTo=oldVersion + 1;
  while (upgradeTo <= newVersion) {
switch (upgradeTo) {
case 14:
      db.execSQL(CREATE_DISTRICTS);
    db.execSQL(CREATE_DISTRICTTEAMS);
  db.execSQL("String_Node_Str" + TABLE_EVENTS + "String_Node_Str"+ EventsTable.DISTRICT_POINTS+ "String_Node_Str");
break;
case 15:
db.execSQL(CREATE_FAVORITES);
db.execSQL(CREATE_SUBSCRIPTIONS);
break;
case 16:
Cursor sub=db.rawQuery("String_Node_Str" + TABLE_SUBSCRIPTIONS + "String_Node_Str",null);
if (sub.getColumnIndex(SubscriptionsTable.NOTIFICATION_SETTINGS) == -1) {
db.execSQL("String_Node_Str" + TABLE_SUBSCRIPTIONS + "String_Node_Str"+ SubscriptionsTable.NOTIFICATION_SETTINGS+ "String_Node_Str");
}
if (sub.getColumnIndex(SubscriptionsTable.MODEL_ENUM) == -1) {
db.execSQL("String_Node_Str" + TABLE_SUBSCRIPTIONS + "String_Node_Str"+ SubscriptionsTable.MODEL_ENUM+ "String_Node_Str");
}
sub.close();
Cursor fav=db.rawQuery("String_Node_Str" + TABLE_FAVORITES + "String_Node_Str",null);
if (fav.getColumnIndex(FavoritesTable.MODEL_ENUM) == -1) {
db.execSQL("String_Node_Str" + TABLE_FAVORITES + "String_Node_Str"+ FavoritesTable.MODEL_ENUM+ "String_Node_Str");
}
fav.close();
break;
case 17:
Cursor dist=db.rawQuery("String_Node_Str" + TABLE_DISTRICTS + "String_Node_Str",null);
if (dist.getColumnIndex(DistrictsTable.NAME) == -1) {
db.execSQL("String_Node_Str" + TABLE_DISTRICTS + "String_Node_Str"+ DistrictsTable.NAME+ "String_Node_Str");
}
dist.close();
break;
case 18:
Cursor event=db.rawQuery("String_Node_Str" + TABLE_EVENTS + "String_Node_Str",null);
if (event.getColumnIndex(EventsTable.SHORTNAME) == -1) {
db.execSQL("String_Node_Str" + TABLE_EVENTS + "String_Node_Str"+ EventsTable.SHORTNAME+ "String_Node_Str");
}
event.close();
break;
case 20:
db.execSQL(CREATE_NOTIFICATIONS);
break;
case 23:
case 24:
db.execSQL("String_Node_Str" + TABLE_SEARCH_TEAMS);
db.execSQL("String_Node_Str" + TABLE_SEARCH_EVENTS);
onCreate(db);
break;
case 25:
db.execSQL("String_Node_Str" + TABLE_API);
break;
case 28:
db.beginTransaction();
try {
db.execSQL("String_Node_Str" + TABLE_NOTIFICATIONS);
db.execSQL(CREATE_NOTIFICATIONS);
db.setTransactionSuccessful();
}
  finally {
db.endTransaction();
}
break;
case 29:
db.beginTransaction();
Cursor motto=null;
try {
motto=db.rawQuery("String_Node_Str" + TABLE_TEAMS + "String_Node_Str",null);
if (motto.getColumnIndex(TeamsTable.MOTTO) == -1) {
db.execSQL("String_Node_Str" + TABLE_TEAMS + "String_Node_Str"+ TeamsTable.MOTTO+ "String_Node_Str");
}
}
  finally {
motto.close();
break;
}
}
upgradeTo++;
}
}

Fixed version (ground truth):
@Override public void onUpgrade(SQLiteDatabase db,int oldVersion,int newVersion){
  Log.w(Constants.LOG_TAG,"String_Node_Str" + oldVersion + "String_Node_Str"+ newVersion);
  int upgradeTo=oldVersion + 1;
  while (upgradeTo <= newVersion) {
switch (upgradeTo) {
case 14:
      db.execSQL(CREATE_DISTRICTS);
    db.execSQL(CREATE_DISTRICTTEAMS);
  db.execSQL("String_Node_Str" + TABLE_EVENTS + "String_Node_Str"+ EventsTable.DISTRICT_POINTS+ "String_Node_Str");
break;
case 15:
db.execSQL(CREATE_FAVORITES);
db.execSQL(CREATE_SUBSCRIPTIONS);
break;
case 16:
Cursor sub=db.rawQuery("String_Node_Str" + TABLE_SUBSCRIPTIONS + "String_Node_Str",null);
if (sub.getColumnIndex(SubscriptionsTable.NOTIFICATION_SETTINGS) == -1) {
db.execSQL("String_Node_Str" + TABLE_SUBSCRIPTIONS + "String_Node_Str"+ SubscriptionsTable.NOTIFICATION_SETTINGS+ "String_Node_Str");
}
if (sub.getColumnIndex(SubscriptionsTable.MODEL_ENUM) == -1) {
db.execSQL("String_Node_Str" + TABLE_SUBSCRIPTIONS + "String_Node_Str"+ SubscriptionsTable.MODEL_ENUM+ "String_Node_Str");
}
sub.close();
Cursor fav=db.rawQuery("String_Node_Str" + TABLE_FAVORITES + "String_Node_Str",null);
if (fav.getColumnIndex(FavoritesTable.MODEL_ENUM) == -1) {
db.execSQL("String_Node_Str" + TABLE_FAVORITES + "String_Node_Str"+ FavoritesTable.MODEL_ENUM+ "String_Node_Str");
}
fav.close();
break;
case 17:
Cursor dist=db.rawQuery("String_Node_Str" + TABLE_DISTRICTS + "String_Node_Str",null);
if (dist.getColumnIndex(DistrictsTable.NAME) == -1) {
db.execSQL("String_Node_Str" + TABLE_DISTRICTS + "String_Node_Str"+ DistrictsTable.NAME+ "String_Node_Str");
}
dist.close();
break;
case 18:
Cursor event=db.rawQuery("String_Node_Str" + TABLE_EVENTS + "String_Node_Str",null);
if (event.getColumnIndex(EventsTable.SHORTNAME) == -1) {
db.execSQL("String_Node_Str" + TABLE_EVENTS + "String_Node_Str"+ EventsTable.SHORTNAME+ "String_Node_Str");
}
event.close();
break;
case 20:
db.execSQL(CREATE_NOTIFICATIONS);
break;
case 23:
case 24:
db.execSQL("String_Node_Str" + TABLE_SEARCH_TEAMS);
db.execSQL("String_Node_Str" + TABLE_SEARCH_EVENTS);
onCreate(db);
break;
case 25:
db.execSQL("String_Node_Str" + TABLE_API);
break;
case 28:
db.beginTransaction();
try {
db.execSQL("String_Node_Str" + TABLE_NOTIFICATIONS);
db.execSQL(CREATE_NOTIFICATIONS);
db.setTransactionSuccessful();
}
  finally {
db.endTransaction();
}
break;
case 29:
db.beginTransaction();
Cursor motto=null;
try {
motto=db.rawQuery("String_Node_Str" + TABLE_TEAMS + "String_Node_Str",null);
if (motto.getColumnIndex(TeamsTable.MOTTO) == -1) {
db.execSQL("String_Node_Str" + TABLE_TEAMS + "String_Node_Str"+ TeamsTable.MOTTO+ "String_Node_Str");
}
db.setTransactionSuccessful();
}
  finally {
motto.close();
db.endTransaction();
break;
}
}
upgradeTo++;
}
}