Program: 152553
Project: 152553
Buggy source:
@Override public boolean onCreate(){
  final Context context=getContext();
  mOpenHelper=getOpenHelper(context);
  mGlobalSearchSupport=new GlobalSearchSupport(this);
  mLegacyApiSupport=new LegacyApiSupport(context,mOpenHelper,this,mGlobalSearchSupport);
  mContactAggregator=new ContactAggregator(context,mOpenHelper,mAggregationScheduler);
  final SQLiteDatabase db=mOpenHelper.getReadableDatabase();
  mSetPrimaryStatement=db.compileStatement("String_Node_Str" + Tables.DATA + "String_Node_Str"+ Data.IS_PRIMARY+ "String_Node_Str"+ sSetPrimaryWhere);
  mSetSuperPrimaryStatement=db.compileStatement("String_Node_Str" + Tables.DATA + "String_Node_Str"+ Data.IS_SUPER_PRIMARY+ "String_Node_Str"+ sSetSuperPrimaryWhere);
  mLastTimeContactedUpdate=db.compileStatement("String_Node_Str" + Tables.RAW_CONTACTS + "String_Node_Str"+ RawContacts.TIMES_CONTACTED+ "String_Node_Str"+ RawContacts.TIMES_CONTACTED+ "String_Node_Str"+ RawContacts.LAST_TIME_CONTACTED+ "String_Node_Str"+ RawContacts.CONTACT_ID+ "String_Node_Str");
  mContactDisplayNameUpdate=db.compileStatement("String_Node_Str" + Tables.RAW_CONTACTS + "String_Node_Str"+ RawContactsColumns.DISPLAY_NAME+ "String_Node_Str"+ RawContacts._ID+ "String_Node_Str");
  mRawContactDirtyUpdate=db.compileStatement("String_Node_Str" + Tables.RAW_CONTACTS + "String_Node_Str"+ RawContacts.DIRTY+ "String_Node_Str"+ RawContacts._ID+ "String_Node_Str");
  mGroupDirtyUpdate=db.compileStatement("String_Node_Str" + Tables.GROUPS + "String_Node_Str"+ Groups.DIRTY+ "String_Node_Str"+ Groups._ID+ "String_Node_Str");
  mNameSplitter=new NameSplitter(context.getString(com.android.internal.R.string.common_name_prefixes),context.getString(com.android.internal.R.string.common_last_name_prefixes),context.getString(com.android.internal.R.string.common_name_suffixes),context.getString(com.android.internal.R.string.common_name_conjunctions));
  mDataRowHandlers=new HashMap<String,DataRowHandler>();
  mDataRowHandlers.put(Email.CONTENT_ITEM_TYPE,new EmailDataRowHandler());
  mDataRowHandlers.put(Im.CONTENT_ITEM_TYPE,new CommonDataRowHandler(Im.CONTENT_ITEM_TYPE,Im.TYPE,Im.LABEL));
  mDataRowHandlers.put(Nickname.CONTENT_ITEM_TYPE,new CommonDataRowHandler(StructuredPostal.CONTENT_ITEM_TYPE,StructuredPostal.TYPE,StructuredPostal.LABEL));
  mDataRowHandlers.put(Organization.CONTENT_ITEM_TYPE,new OrganizationDataRowHandler());
  mDataRowHandlers.put(Phone.CONTENT_ITEM_TYPE,new PhoneDataRowHandler());
  mDataRowHandlers.put(Nickname.CONTENT_ITEM_TYPE,new CommonDataRowHandler(Nickname.CONTENT_ITEM_TYPE,Nickname.TYPE,Nickname.LABEL));
  mDataRowHandlers.put(StructuredName.CONTENT_ITEM_TYPE,new StructuredNameRowHandler(mNameSplitter));
  if (isLegacyContactImportNeeded()) {
    if (!importLegacyContacts()) {
      return false;
    }
  }
  return (db != null);
}

Fixed version (ground truth):
@Override public boolean onCreate(){
  final Context context=getContext();
  mOpenHelper=getOpenHelper(context);
  mGlobalSearchSupport=new GlobalSearchSupport(this);
  mLegacyApiSupport=new LegacyApiSupport(context,mOpenHelper,this,mGlobalSearchSupport);
  mContactAggregator=new ContactAggregator(context,mOpenHelper,mAggregationScheduler);
  final SQLiteDatabase db=mOpenHelper.getReadableDatabase();
  mSetPrimaryStatement=db.compileStatement("String_Node_Str" + Tables.DATA + "String_Node_Str"+ Data.IS_PRIMARY+ "String_Node_Str"+ sSetPrimaryWhere);
  mSetSuperPrimaryStatement=db.compileStatement("String_Node_Str" + Tables.DATA + "String_Node_Str"+ Data.IS_SUPER_PRIMARY+ "String_Node_Str"+ sSetSuperPrimaryWhere);
  mLastTimeContactedUpdate=db.compileStatement("String_Node_Str" + Tables.RAW_CONTACTS + "String_Node_Str"+ RawContacts.TIMES_CONTACTED+ "String_Node_Str"+ RawContacts.TIMES_CONTACTED+ "String_Node_Str"+ RawContacts.LAST_TIME_CONTACTED+ "String_Node_Str"+ RawContacts.CONTACT_ID+ "String_Node_Str");
  mContactDisplayNameUpdate=db.compileStatement("String_Node_Str" + Tables.RAW_CONTACTS + "String_Node_Str"+ RawContactsColumns.DISPLAY_NAME+ "String_Node_Str"+ RawContacts._ID+ "String_Node_Str");
  mRawContactDirtyUpdate=db.compileStatement("String_Node_Str" + Tables.RAW_CONTACTS + "String_Node_Str"+ RawContacts.DIRTY+ "String_Node_Str"+ RawContacts._ID+ "String_Node_Str");
  mNameSplitter=new NameSplitter(context.getString(com.android.internal.R.string.common_name_prefixes),context.getString(com.android.internal.R.string.common_last_name_prefixes),context.getString(com.android.internal.R.string.common_name_suffixes),context.getString(com.android.internal.R.string.common_name_conjunctions));
  mDataRowHandlers=new HashMap<String,DataRowHandler>();
  mDataRowHandlers.put(Email.CONTENT_ITEM_TYPE,new EmailDataRowHandler());
  mDataRowHandlers.put(Im.CONTENT_ITEM_TYPE,new CommonDataRowHandler(Im.CONTENT_ITEM_TYPE,Im.TYPE,Im.LABEL));
  mDataRowHandlers.put(Nickname.CONTENT_ITEM_TYPE,new CommonDataRowHandler(StructuredPostal.CONTENT_ITEM_TYPE,StructuredPostal.TYPE,StructuredPostal.LABEL));
  mDataRowHandlers.put(Organization.CONTENT_ITEM_TYPE,new OrganizationDataRowHandler());
  mDataRowHandlers.put(Phone.CONTENT_ITEM_TYPE,new PhoneDataRowHandler());
  mDataRowHandlers.put(Nickname.CONTENT_ITEM_TYPE,new CommonDataRowHandler(Nickname.CONTENT_ITEM_TYPE,Nickname.TYPE,Nickname.LABEL));
  mDataRowHandlers.put(StructuredName.CONTENT_ITEM_TYPE,new StructuredNameRowHandler(mNameSplitter));
  if (isLegacyContactImportNeeded()) {
    if (!importLegacyContacts()) {
      return false;
    }
  }
  return (db != null);
}