  The statistics of X-ray flares in the afterglow of gamma-ray bursts (GRBs)
have been studied extensively without considering the possible different
origins of each flare. By satisfying six observational criteria, we find a
sample composed of $16$ long GRBs observed by \textit{Swift} satellite may
share a same origin. By applying the Markov chain Monte Carlo iteration and the
machine learning algorithms (locally weighted regression and Gaussian process
regression), impressively, the flares in these GRBs show strong correlations
with the energy released in the prompt emission. These correlations were never
discovered in previous papers, and they could not be well explained by previous
models. These correlations imply that the prompt emission and the X-ray flare
are not independent, they may be originated following a same sequence. The new
THESUS satellite will provide us a larger sample and more detailed spectra to
refine the results we obtained in this article.
