Program: 87003
Project: 87003
Buggy source:
@Override public int update(Uri uri,ContentValues values,String selection,String[] selectionArgs){
  int returnValue;
  SQLiteDatabase db=mEnvironmentDbHelper.getWritableDatabase();
switch (sUriMatcher.match(uri)) {
case ENVIRONMENT_WITH_ID:
    selection=EnvironmentEntry._ID + "String_Node_Str";
  selectionArgs=new String[]{getIdFromUriAsString(uri)};
case ENVIRONMENT:
returnValue=db.update(EnvironmentEntry.TABLE_NAME,values,selection,selectionArgs);
break;
case ENVIRONMENT_WITH_ID_AND_GEOFENCES:
long environmentId=Long.parseLong(uri.getPathSegments().get(1));
long newGeofenceId=db.insert(GeoFenceEntry.TABLE_NAME,null,values);
long oldGeofenceId=changeEnvironmentVariableValue(EnvironmentEntry.COLUMN_IS_LOCATION_ENABLED,1,EnvironmentEntry.COLUMN_GEOFENCE_ID,newGeofenceId,environmentId,db);
selection=GeoFenceEntry._ID + "String_Node_Str";
selectionArgs=new String[]{String.valueOf(oldGeofenceId)};
returnValue=(newGeofenceId != oldGeofenceId) ? 1 : 0;
returnValue+=deleteEnvironmentVariableWithUsageSearch(EnvironmentEntry.COLUMN_GEOFENCE_ID,GeoFenceEntry._ID,GeoFenceEntry.TABLE_NAME,selection,selectionArgs,db);
break;
case ENVIRONMENT_WITH_ID_AND_WIFI_NETWORKS:
environmentId=Long.parseLong(uri.getPathSegments().get(1));
long newWifiId=db.insert(WiFiNetworksEntry.TABLE_NAME,null,values);
long oldWifiId=changeEnvironmentVariableValue(EnvironmentEntry.COLUMN_IS_WIFI_ENABLED,1,EnvironmentEntry.COLUMN_WIFI_ID,newWifiId,environmentId,db);
selection=WiFiNetworksEntry._ID + "String_Node_Str";
selectionArgs=new String[]{String.valueOf(oldWifiId)};
returnValue=(newWifiId != oldWifiId) ? 1 : 0;
returnValue+=deleteEnvironmentVariableWithUsageSearch(EnvironmentEntry.COLUMN_WIFI_ID,WiFiNetworksEntry._ID,WiFiNetworksEntry.TABLE_NAME,selection,selectionArgs,db);
break;
case USER_WITH_ID_ENVIRONMENT_AND_PASSWORD:
returnValue=updatePasswordForUserAndEnvironment(db,uri,values);
break;
default :
throw new UnsupportedOperationException("String_Node_Str" + uri);
}
getContext().getContentResolver().notifyChange(uri,null);
return returnValue;
}

Fixed version (ground truth):
@Override public int update(Uri uri,ContentValues values,String selection,String[] selectionArgs){
  int returnValue;
  SQLiteDatabase db=mEnvironmentDbHelper.getWritableDatabase();
switch (sUriMatcher.match(uri)) {
case ENVIRONMENT_WITH_ID:
    selection=EnvironmentEntry._ID + "String_Node_Str";
  selectionArgs=new String[]{getIdFromUriAsString(uri)};
case ENVIRONMENT:
returnValue=db.update(EnvironmentEntry.TABLE_NAME,values,selection,selectionArgs);
break;
case ENVIRONMENT_WITH_ID_AND_GEOFENCES:
long[] geofenceIds=insertEnvironmentLocation(uri,db,values);
long newGeofenceId=geofenceIds[1];
long oldGeofenceId=geofenceIds[0];
selection=GeoFenceEntry._ID + "String_Node_Str";
selectionArgs=new String[]{String.valueOf(oldGeofenceId)};
returnValue=(newGeofenceId != oldGeofenceId) ? 1 : 0;
returnValue+=deleteEnvironmentVariableWithUsageSearch(EnvironmentEntry.COLUMN_GEOFENCE_ID,GeoFenceEntry._ID,GeoFenceEntry.TABLE_NAME,selection,selectionArgs,db);
break;
case ENVIRONMENT_WITH_ID_AND_WIFI_NETWORKS:
long[] wifiIds=insertEnvironmentWifiNetwork(uri,db,values);
long newWifiId=wifiIds[1];
long oldWifiId=wifiIds[0];
selection=WiFiNetworksEntry._ID + "String_Node_Str";
selectionArgs=new String[]{String.valueOf(oldWifiId)};
returnValue=(newWifiId != oldWifiId) ? 1 : 0;
returnValue+=deleteEnvironmentVariableWithUsageSearch(EnvironmentEntry.COLUMN_WIFI_ID,WiFiNetworksEntry._ID,WiFiNetworksEntry.TABLE_NAME,selection,selectionArgs,db);
break;
case USER_WITH_ID_ENVIRONMENT_AND_PASSWORD:
returnValue=updatePasswordForUserAndEnvironment(db,uri,values);
break;
default :
throw new UnsupportedOperationException("String_Node_Str" + uri);
}
getContext().getContentResolver().notifyChange(uri,null);
return returnValue;
}