  We present the first systematic investigation of the morphological and timing
properties of flares in GRBs observed by Swift/XRT. We consider a large sample
drawn from all GRBs detected by Swift, INTEGRAL and HETE-2 prior to 2006 Jan
31, which had an XRT follow-up and which showed significant flaring. Our sample
of 33 GRBs includes long and short, at low and high redshift, and a total of 69
flares. The strongest flares occur in the early phases, with a clear
anti-correlation between the flare peak intensity and the flare time of
occurrence. Fitting each X-ray flare with a Gaussian model, we find that the
mean ratio of the width and peak time is <Delta t / t > = 0.13+/-0.10, albeit
with a large scatter. Late flares at times > 2000 seconds have long durations,
Delta t>300 s, and can be very energetic compared to the underlying continuum.
We further investigated if there is a clear link between the number of pulses
detected in the prompt phase by BAT and the number of X-ray flares detected by
XRT, finding no correlation. However, we find that the distribution of
intensity ratios between successive BAT prompt pulses and that between
successive XRT flares is the same, an indication of a common origin for
gamma-ray pulses and X-ray flares. All evidence indicates that flares are
indeed related to the workings of the central engine and, within the standard
fireball scenario, originate from internal shocks rather than external shocks.
While all flares can be explained by long-lasting engine activity, 29/69 flares
may also be explained by refreshed shocks. However, 10 can only be explained by
prolonged activity of the central engine.
