Program: 187919
Project: 187919
Buggy source:
@Override protected Uri insertInternal(Uri uri,ContentValues values){
  int match=URL_MATCHER.match(uri);
  Log.d(this.TAG,"String_Node_Str" + match + "String_Node_Str");
  long rowID=0;
switch (match) {
case ALERT_GENERIC:
    if (!values.containsKey(Alert.Generic.NATURE)) {
      values.put(Alert.Generic.NATURE,Alert.NATURE_USER);
    }
  rowID=getDatabase().insert(TABLE_ALERTS,"String_Node_Str",values);
if (rowID > 0) {
  Uri nUri=ContentUris.withAppendedId(Alert.Generic.CONTENT_URI,rowID);
  getContext().getContentResolver().notifyChange(nUri,null);
  return nUri;
}
throw new SQLException("String_Node_Str" + uri);
case ALERT_LOCATION:
if (!values.containsKey(Alert.Generic.NATURE)) {
values.put(Alert.Generic.NATURE,Alert.NATURE_USER);
}
if (!values.containsKey(Alert.Location.TYPE)) {
values.put(Alert.Location.TYPE,Alert.TYPE_LOCATION);
}
rowID=getDatabase().insert(TABLE_ALERTS,"String_Node_Str",values);
if (rowID > 0) {
Uri nUri=ContentUris.withAppendedId(Alert.Location.CONTENT_URI,rowID);
getContext().getContentResolver().notifyChange(nUri,null);
return nUri;
}
throw new SQLException("String_Node_Str" + uri);
case MANAGED_SERVICE:
rowID=getDatabase().insert(TABLE_SERVICES,"String_Node_Str",values);
if (rowID > 0) {
Uri nUri=ContentUris.withAppendedId(Alert.ManagedService.CONTENT_URI,rowID);
getContext().getContentResolver().notifyChange(nUri,null);
return nUri;
}
throw new SQLException("String_Node_Str" + uri);
}
return null;
}

Fixed version (ground truth):
@Override protected Uri insertInternal(Uri uri,ContentValues values){
  int match=URL_MATCHER.match(uri);
  Log.d(this.TAG,"String_Node_Str" + match + "String_Node_Str");
  long rowID=0;
switch (match) {
case ALERT_GENERIC:
    if (!values.containsKey(Alert.Generic.NATURE)) {
      values.put(Alert.Generic.NATURE,Alert.NATURE_USER);
    }
  rowID=getDatabase().insert(TABLE_ALERTS,"String_Node_Str",values);
if (rowID > 0) {
  Uri nUri=ContentUris.withAppendedId(Alert.Generic.CONTENT_URI,rowID);
  getContext().getContentResolver().notifyChange(nUri,null);
  return nUri;
}
throw new SQLException("String_Node_Str" + uri);
case ALERT_LOCATION:
if (!values.containsKey(Alert.Generic.NATURE)) {
values.put(Alert.Generic.NATURE,Alert.NATURE_USER);
}
if (!values.containsKey(Alert.Location.TYPE)) {
values.put(Alert.Location.TYPE,Alert.TYPE_LOCATION);
}
rowID=getDatabase().insert(TABLE_ALERTS,"String_Node_Str",values);
if (rowID > 0) {
Uri nUri=ContentUris.withAppendedId(Alert.Location.CONTENT_URI,rowID);
getContext().getContentResolver().notifyChange(nUri,null);
return nUri;
}
throw new SQLException("String_Node_Str" + uri);
case ALERT_DATE_TIME:
if (!values.containsKey(Alert.Generic.NATURE)) {
values.put(Alert.Generic.NATURE,Alert.NATURE_USER);
}
if (!values.containsKey(Alert.Location.TYPE)) {
values.put(Alert.Location.TYPE,Alert.TYPE_LOCATION);
}
rowID=getDatabase().insert(TABLE_ALERTS,"String_Node_Str",values);
if (rowID > 0) {
Uri nUri=ContentUris.withAppendedId(Alert.DateTime.CONTENT_URI,rowID);
getContext().getContentResolver().notifyChange(nUri,null);
return nUri;
}
throw new SQLException("String_Node_Str" + uri);
case MANAGED_SERVICE:
rowID=getDatabase().insert(TABLE_SERVICES,"String_Node_Str",values);
if (rowID > 0) {
Uri nUri=ContentUris.withAppendedId(Alert.ManagedService.CONTENT_URI,rowID);
getContext().getContentResolver().notifyChange(nUri,null);
return nUri;
}
throw new SQLException("String_Node_Str" + uri);
}
return null;
}