First-principles study of the doping effects in bilayer graphene