Heat capacity or thermal capacity depends upon the nature of the body and its mass.
Thermal capacity (S) is given by the relation :
S = s X m
where s is the specific heat of the body and m is the mass of the body.
As we know , mass of water contained in bucket is more than that of the mass of the water contained in mug provided that the both the bucket and the mug are full of water up to the brim. Hence, water filled in bucket has more heat capacity than that the water filled in mug, where bucket and mug both have different volumes.