Program: 152375
Project: 152375
Buggy source:
/** 
 * Insert or update a non-deleted entry to MetadataSync table, and also parse the data column to update related tables for the raw contact. Returns new upserted metadataSyncId.
 */
private long updateOrInsertDataToMetadataSync(SQLiteDatabase db,Uri uri,ContentValues values){
  final int matchUri=sURIMatcher.match(uri);
  if (matchUri != METADATA_SYNC) {
    throw new IllegalArgumentException(mDbHelper.exceptionMessage("String_Node_Str",uri));
  }
  Integer deleted=values.getAsInteger(MetadataSync.DELETED);
  if (deleted != null && deleted != 0) {
    throw new IllegalArgumentException(mDbHelper.exceptionMessage("String_Node_Str" + values.toString(),uri));
  }
  final String data=values.getAsString(MetadataSync.DATA);
  if (TextUtils.isEmpty(data)) {
    throw new IllegalArgumentException(mDbHelper.exceptionMessage("String_Node_Str",uri));
  }
  final Long accountId=replaceAccountInfoByAccountId(uri,values);
  final String rawContactBackupId=values.getAsString(MetadataSync.RAW_CONTACT_BACKUP_ID);
  deleted=0;
  if (accountId == null || rawContactBackupId == null) {
    throw new IllegalArgumentException(mDbHelper.exceptionMessage("String_Node_Str" + accountId + "String_Node_Str"+ "String_Node_Str"+ rawContactBackupId,uri));
  }
  final long metadataSyncId=mDbHelper.upsertMetadataSync(rawContactBackupId,accountId,data,deleted);
  if (metadataSyncId <= 0) {
    throw new IllegalArgumentException(mDbHelper.exceptionMessage("String_Node_Str" + values.toString(),uri));
  }
  final MetadataEntry metadataEntry=MetadataEntryParser.parseDataToMetaDataEntry(data);
  mContactsProvider.updateFromMetaDataEntry(db,metadataEntry);
  return metadataSyncId;
}

Fixed version (ground truth):
/** 
 * Insert or update a non-deleted entry to MetadataSync table, and also parse the data column to update related tables for the raw contact. Returns new upserted metadataSyncId.
 */
private long updateOrInsertDataToMetadataSync(SQLiteDatabase db,Uri uri,ContentValues values){
  final int matchUri=sURIMatcher.match(uri);
  if (matchUri != METADATA_SYNC) {
    throw new IllegalArgumentException(mDbHelper.exceptionMessage("String_Node_Str",uri));
  }
  Integer deleted=values.getAsInteger(MetadataSync.DELETED);
  if (deleted != null && deleted != 0) {
    throw new IllegalArgumentException(mDbHelper.exceptionMessage("String_Node_Str" + values.toString(),uri));
  }
  final String data=values.getAsString(MetadataSync.DATA);
  if (TextUtils.isEmpty(data)) {
    throw new IllegalArgumentException(mDbHelper.exceptionMessage("String_Node_Str",uri));
  }
  final Long accountId=replaceAccountInfoByAccountId(uri,values);
  final String rawContactBackupId=values.getAsString(MetadataSync.RAW_CONTACT_BACKUP_ID);
  deleted=0;
  if (accountId == null) {
    return 0;
  }
  if (rawContactBackupId == null) {
    throw new IllegalArgumentException(mDbHelper.exceptionMessage("String_Node_Str" + accountId + "String_Node_Str"+ "String_Node_Str"+ rawContactBackupId,uri));
  }
  final long metadataSyncId=mDbHelper.upsertMetadataSync(rawContactBackupId,accountId,data,deleted);
  if (metadataSyncId <= 0) {
    throw new IllegalArgumentException(mDbHelper.exceptionMessage("String_Node_Str" + values.toString(),uri));
  }
  final MetadataEntry metadataEntry=MetadataEntryParser.parseDataToMetaDataEntry(data);
  mContactsProvider.updateFromMetaDataEntry(db,metadataEntry);
  return metadataSyncId;
}