Program: 187917
Project: 187917
Buggy source:
@Override protected Cursor queryInternal(Uri uri,String[] projection,String selection,String[] selectionArgs,String sortOrder){
  int match=URL_MATCHER.match(uri);
  Log.d(this.TAG,"String_Node_Str" + uri + "String_Node_Str");
  Log.d(this.TAG,"String_Node_Str" + match + "String_Node_Str");
  SQLiteQueryBuilder qb=new SQLiteQueryBuilder();
  String orderBy=null;
  boolean didMatch=false;
  long rowID=0;
switch (match) {
case ALERT_GENERIC:
    qb.setTables(TABLE_ALERTS);
  qb.setProjectionMap(GENERIC_PROJECTION_MAP);
if (TextUtils.isEmpty(sortOrder)) {
  orderBy=Alert.Generic.DEFAULT_SORT_ORDER;
}
 else {
  orderBy=sortOrder;
}
break;
case ALERT_LOCATION:
qb.setTables(TABLE_ALERTS);
qb.setProjectionMap(GENERIC_PROJECTION_MAP);
if (TextUtils.isEmpty(sortOrder)) {
orderBy=Alert.Generic.DEFAULT_SORT_ORDER;
}
 else {
orderBy=sortOrder;
}
break;
case ALERT_COMBINED:
qb.setTables(TABLE_ALERTS);
qb.setProjectionMap(GENERIC_PROJECTION_MAP);
if (TextUtils.isEmpty(sortOrder)) {
orderBy=Alert.Generic.DEFAULT_SORT_ORDER;
}
 else {
orderBy=sortOrder;
}
break;
case ALERT_GENERIC_ID:
qb.setTables(TABLE_ALERTS);
qb.setProjectionMap(GENERIC_PROJECTION_MAP);
qb.appendWhere("String_Node_Str" + uri.getLastPathSegment());
if (TextUtils.isEmpty(sortOrder)) {
orderBy=Alert.Location.DEFAULT_SORT_ORDER;
}
 else {
orderBy=sortOrder;
}
break;
case ALERT_LOCATION_ID:
qb.setTables(TABLE_ALERTS);
qb.setProjectionMap(GENERIC_PROJECTION_MAP);
qb.appendWhere("String_Node_Str" + uri.getLastPathSegment());
if (TextUtils.isEmpty(sortOrder)) {
orderBy=Alert.Location.DEFAULT_SORT_ORDER;
}
 else {
orderBy=sortOrder;
}
break;
case ALERT_COMBINED_ID:
qb.setTables(TABLE_ALERTS);
qb.setProjectionMap(GENERIC_PROJECTION_MAP);
qb.appendWhere("String_Node_Str" + uri.getLastPathSegment());
if (TextUtils.isEmpty(sortOrder)) {
orderBy=Alert.Location.DEFAULT_SORT_ORDER;
}
 else {
orderBy=sortOrder;
}
break;
case MANAGED_SERVICE:
qb.setTables(TABLE_SERVICES);
qb.setProjectionMap(SERVICE_PROJECTION_MAP);
if (TextUtils.isEmpty(sortOrder)) {
orderBy=Alert.Location.DEFAULT_SORT_ORDER;
}
 else {
orderBy=sortOrder;
}
break;
case MANAGED_SERVICE_ID:
qb.setTables(TABLE_SERVICES);
qb.setProjectionMap(SERVICE_PROJECTION_MAP);
qb.appendWhere("String_Node_Str" + uri.getLastPathSegment());
if (TextUtils.isEmpty(sortOrder)) {
orderBy=Alert.Location.DEFAULT_SORT_ORDER;
}
 else {
orderBy=sortOrder;
}
break;
default :
throw new IllegalArgumentException("String_Node_Str" + uri);
}
Cursor c=qb.query(getDatabase(),projection,selection,selectionArgs,null,null,orderBy);
Log.v(TAG,"String_Node_Str" + selection + "String_Node_Str"+ (selectionArgs != null && selectionArgs.length > 0 ? selectionArgs[0] : selectionArgs)+ "String_Node_Str"+ c.count());
c.setNotificationUri(getContext().getContentResolver(),uri);
return c;
}

Fixed version (ground truth):
@Override protected Cursor queryInternal(Uri uri,String[] projection,String selection,String[] selectionArgs,String sortOrder){
  int match=URL_MATCHER.match(uri);
  Log.d(this.TAG,"String_Node_Str" + uri + "String_Node_Str");
  Log.d(this.TAG,"String_Node_Str" + match + "String_Node_Str");
  SQLiteQueryBuilder qb=new SQLiteQueryBuilder();
  String orderBy=null;
  boolean didMatch=false;
  long rowID=0;
switch (match) {
case ALERT_GENERIC:
    qb.setTables(TABLE_ALERTS);
  qb.setProjectionMap(GENERIC_PROJECTION_MAP);
if (TextUtils.isEmpty(sortOrder)) {
  orderBy=Alert.Generic.DEFAULT_SORT_ORDER;
}
 else {
  orderBy=sortOrder;
}
break;
case ALERT_LOCATION:
qb.setTables(TABLE_ALERTS);
qb.setProjectionMap(GENERIC_PROJECTION_MAP);
if (TextUtils.isEmpty(sortOrder)) {
orderBy=Alert.Generic.DEFAULT_SORT_ORDER;
}
 else {
orderBy=sortOrder;
}
break;
case ALERT_COMBINED:
qb.setTables(TABLE_ALERTS);
qb.setProjectionMap(GENERIC_PROJECTION_MAP);
if (TextUtils.isEmpty(sortOrder)) {
orderBy=Alert.Generic.DEFAULT_SORT_ORDER;
}
 else {
orderBy=sortOrder;
}
break;
case ALERT_DATE_TIME:
qb.setTables(TABLE_ALERTS);
qb.setProjectionMap(GENERIC_PROJECTION_MAP);
if (TextUtils.isEmpty(sortOrder)) {
orderBy=Alert.Generic.DEFAULT_SORT_ORDER;
}
 else {
orderBy=sortOrder;
}
break;
case ALERT_GENERIC_ID:
qb.setTables(TABLE_ALERTS);
qb.setProjectionMap(GENERIC_PROJECTION_MAP);
qb.appendWhere("String_Node_Str" + uri.getLastPathSegment());
if (TextUtils.isEmpty(sortOrder)) {
orderBy=Alert.Location.DEFAULT_SORT_ORDER;
}
 else {
orderBy=sortOrder;
}
break;
case ALERT_LOCATION_ID:
qb.setTables(TABLE_ALERTS);
qb.setProjectionMap(GENERIC_PROJECTION_MAP);
qb.appendWhere("String_Node_Str" + uri.getLastPathSegment());
if (TextUtils.isEmpty(sortOrder)) {
orderBy=Alert.Location.DEFAULT_SORT_ORDER;
}
 else {
orderBy=sortOrder;
}
break;
case ALERT_DATE_TIME_ID:
qb.setTables(TABLE_ALERTS);
qb.setProjectionMap(GENERIC_PROJECTION_MAP);
qb.appendWhere("String_Node_Str" + uri.getLastPathSegment());
if (TextUtils.isEmpty(sortOrder)) {
orderBy=Alert.Location.DEFAULT_SORT_ORDER;
}
 else {
orderBy=sortOrder;
}
break;
case ALERT_COMBINED_ID:
qb.setTables(TABLE_ALERTS);
qb.setProjectionMap(GENERIC_PROJECTION_MAP);
qb.appendWhere("String_Node_Str" + uri.getLastPathSegment());
if (TextUtils.isEmpty(sortOrder)) {
orderBy=Alert.Location.DEFAULT_SORT_ORDER;
}
 else {
orderBy=sortOrder;
}
break;
case MANAGED_SERVICE:
qb.setTables(TABLE_SERVICES);
qb.setProjectionMap(SERVICE_PROJECTION_MAP);
if (TextUtils.isEmpty(sortOrder)) {
orderBy=Alert.Location.DEFAULT_SORT_ORDER;
}
 else {
orderBy=sortOrder;
}
break;
case MANAGED_SERVICE_ID:
qb.setTables(TABLE_SERVICES);
qb.setProjectionMap(SERVICE_PROJECTION_MAP);
qb.appendWhere("String_Node_Str" + uri.getLastPathSegment());
if (TextUtils.isEmpty(sortOrder)) {
orderBy=Alert.Location.DEFAULT_SORT_ORDER;
}
 else {
orderBy=sortOrder;
}
break;
default :
throw new IllegalArgumentException("String_Node_Str" + uri);
}
Cursor c=qb.query(getDatabase(),projection,selection,selectionArgs,null,null,orderBy);
Log.v(TAG,"String_Node_Str" + selection + "String_Node_Str"+ (selectionArgs != null && selectionArgs.length > 0 ? selectionArgs[0] : selectionArgs)+ "String_Node_Str"+ c.count());
c.setNotificationUri(getContext().getContentResolver(),uri);
return c;
}